v2ray-core icon indicating copy to clipboard operation
v2ray-core copied to clipboard

browser forwarder bridge doesn't work properly on chromium based browsers when early data is enabled

Open SquallATF opened this issue 3 years ago • 1 comments

What version of V2Ray are you using?

V2Ray 4.45.2

What problems have you encountered?

When using a chromium based browser as a forwarder, the forwarding browser cannot connect to the server and the following error occurs.

WebSocket connection to 'ws://v2rayserver:8888/abcd' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

but tested firefox and it works fine.

Chromium based browsers seem to require a non-empty 'Sec-WebSocket-Protocol' header response from the server when the client sends the 'Sec-WebSocket-Protocol' header, while firefox does not have this limitation.

11.3.4. Sec-WebSocket-Protocol

This section describes a header field registered in the Permanent Message Header Field Names registry [RFC3864].

Header field name Sec-WebSocket-Protocol

Applicable protocol http

Status standard

Author/Change controller IETF

Specification document(s) RFC 6455

Related information This header field is only used for the WebSocket opening handshake.

The |Sec-WebSocket-Protocol| header field is used in the WebSocket opening handshake. It is sent from the client to the server and back from the server to the client to confirm the subprotocol of the connection. This enables scripts to both select a subprotocol and be sure that the server agreed to serve that subprotocol.

The |Sec-WebSocket-Protocol| header field MAY appear multiple times in an HTTP request (which is logically the same as a single |Sec-WebSocket-Protocol| header field that contains all values). However, the |Sec-WebSocket-Protocol| header field MUST NOT appear more than once in an HTTP response.

SquallATF avatar Oct 05 '22 16:10 SquallATF

Please use URL-based early data.

AkinoKaede avatar Oct 07 '22 23:10 AkinoKaede

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Feb 05 '23 02:02 github-actions[bot]