|
|
@@ -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)
|