We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 967932d commit c6cceebCopy full SHA for c6cceeb
transport/trojan/trojan.go
@@ -22,8 +22,10 @@ const (
22
)
23
24
var (
25
- defaultALPN = []string{"h2", "http/1.1"}
26
- crlf = []byte{'\r', '\n'}
+ defaultALPN = []string{"h2", "http/1.1"}
+ defaultWebsocketALPN = []string{"http/1.1"}
27
+
28
+ crlf = []byte{'\r', '\n'}
29
30
31
type Command = byte
@@ -74,7 +76,7 @@ func (t *Trojan) StreamConn(conn net.Conn) (net.Conn, error) {
74
76
}
75
77
78
func (t *Trojan) StreamWebsocketConn(conn net.Conn, wsOptions *WebsocketOption) (net.Conn, error) {
- alpn := defaultALPN
79
+ alpn := defaultWebsocketALPN
80
if len(t.option.ALPN) != 0 {
81
alpn = t.option.ALPN
82
0 commit comments