mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
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
This commit is contained in:
parent
9b204ed99b
commit
13bc0432bc
1 changed files with 2 additions and 1 deletions
|
@ -120,7 +120,8 @@ func dialWebSocket(ctx context.Context, dest net.Destination, streamSettings *in
|
|||
|
||||
header := wsSettings.GetRequestHeader()
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue