Browse Source

WebSocket Early Data Protocol Harmonization with V2Ray/V2Fly (#548)

* protocol harmonization with V2Ray/V2Fly by supporting both V2Ray server and XRay server

* protocol harmonization with V2Ray/V2Fly by supporting both V2Ray server and XRay server comment
pull/790/head
Xiaokang Wang 3 years ago committed by 世界
parent
commit
13bc0432bc
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
  1. 3
      transport/internet/websocket/dialer.go

3
transport/internet/websocket/dialer.go

@ -120,7 +120,8 @@ func dialWebSocket(ctx context.Context, dest net.Destination, streamSettings *in
header := wsSettings.GetRequestHeader() header := wsSettings.GetRequestHeader()
if ed != nil { if ed != nil {
header.Set("Sec-WebSocket-Protocol", base64.StdEncoding.EncodeToString(ed)) // RawURLEncoding is support by both V2Ray/V2Fly and XRay.
header.Set("Sec-WebSocket-Protocol", base64.RawURLEncoding.EncodeToString(ed))
} }
conn, resp, err := dialer.Dial(uri, header) conn, resp, err := dialer.Dial(uri, header)

Loading…
Cancel
Save