Skip to content

Commit

Permalink
disable incorrect alpn in websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Mar 17, 2024
1 parent af4a46d commit 1b50911
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ray2sing/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ func getTLSOptions(decoded map[string]string) T.OutboundTLSOptionsContainer {
}

if alpn, ok := decoded["alpn"]; ok && alpn != "" {
tlsOptions.ALPN = strings.Split(alpn, ",")
if net, _ := getOneOf(decoded, "type", "net"); net == "ws" {
// tlsOptions.ALPN = []string{"http/1.1"}
} else {
tlsOptions.ALPN = strings.Split(alpn, ",")
}

}
return T.OutboundTLSOptionsContainer{
TLS: tlsOptions,
Expand Down

0 comments on commit 1b50911

Please sign in to comment.