Open Bug 1758515 Opened 3 years ago Updated 3 years ago

Authorized H2 proxies break with websockets

Categories

(Core :: Networking: WebSockets, defect, P2)

Firefox 95
defect

Tracking

()

UNCONFIRMED

People

(Reporter: z0ccc, Unassigned)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

  • Load a proxy into the browser using the proxy API
  • Register an onAuthRequired listener to supply the authentication when prompted
  • Load any website using a websocket (Test here: https://www.piesocket.com/websocket-tester)

Actual results:

The websocket fails to connect and the error "Firefox can’t establish a connection to the server at <url>" is displayed in the console.

If you use an unauthenticated proxy, the issue does not occur and functions identically to Chrome.

Related to: https://bugzilla.mozilla.org/show_bug.cgi?id=1569714

Expected results:

Websockets should connect with no issues.

The Bugbug bot thinks this bug should belong to the 'Core::Networking: WebSockets' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Networking: WebSockets
Product: Firefox → Core

Could you try to record a http log?
Please also add nsWebSocket:5 to MOZ_LOG.
Thanks.

Flags: needinfo?(z0ccc)
Flags: needinfo?(z0ccc)

The log shows that the proxy server returned 502, but I am not sure why.

HTTP/2 502
content-type: text/html; charset=UTF-8
server: nghttpx
content-length: 129
date: Mon, 14 Mar 2022 15:53:54 GMT

Does the same proxy work for normal browsing?
Could you provide me the necessary information so I can try to reproduce this locally?
Thanks.

Flags: needinfo?(z0ccc)

Normal browsing works fine.

You can reproduce this by installing the extension: https://addons.mozilla.org/en-US/firefox/addon/windscribe/ and then switching the proxy port to 443 (extension popup > hamburger menu > connection > proxy port). You can test on https://www.piesocket.com/websocket-tester.

Thanks

Flags: needinfo?(z0ccc)
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: