Skip to content

Commit 38ac594

Browse files
committed
refactor: update HTTP payload format in generateConfig function
1 parent 7620b84 commit 38ac594

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func generateConfig(cmd *cobra.Command, args []string) {
7070
},
7171
ListenPort: 1080,
7272
ProxyType: "socks5",
73-
HTTPPayload: "GET / HTTP/1.1\r\nHost: [host]\r\nUpgrade: websocket\r\n\r\n",
73+
HTTPPayload: "HEAD / HTTP/1.1[crlf]Host: [host][crlf]Upgrade: websocket[crlf][crlf]",
7474
ConnectionTimeout: 30,
7575
}
7676
case "sni":
@@ -87,7 +87,7 @@ func generateConfig(cmd *cobra.Command, args []string) {
8787
},
8888
ListenPort: 1080,
8989
ProxyType: "socks5",
90-
HTTPPayload: "GET / HTTP/1.1\r\nHost: [host]\r\nUpgrade: websocket\r\n\r\n",
90+
HTTPPayload: "HEAD / HTTP/1.1[crlf]Host: [host][crlf]Upgrade: websocket[crlf][crlf]",
9191
ConnectionTimeout: 30,
9292
}
9393
case "direct":
@@ -102,7 +102,7 @@ func generateConfig(cmd *cobra.Command, args []string) {
102102
},
103103
ListenPort: 1080,
104104
ProxyType: "http",
105-
HTTPPayload: "GET / HTTP/1.1\r\nHost: [host]\r\nUpgrade: websocket\r\n\r\n",
105+
HTTPPayload: "HEAD / HTTP/1.1[crlf]Host: [host][crlf]Upgrade: websocket[crlf][crlf]",
106106
ConnectionTimeout: 30,
107107
}
108108
default:

0 commit comments

Comments
 (0)