Closed Bug 1577862 Opened 5 years ago Closed 5 years ago

Websockets should prioritize SOCKS5 proxies over HTTP(S) proxies

Categories

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

68 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: bugzilla.mozilla.org, Assigned: michal)

References

(Regressed 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.4 Chrome/67.0.3396.87 Safari/537.36

Steps to reproduce:

  1. Configure HTTP, HTTPS, and SOCKS5 proxy in the Firefox proxy settings
  2. Use a websocket connection
    2a. Visit: https://www.websocket.org/echo.html
    2b. Click connect

Actual results:

Firefox uses the HTTP proxy, not the SOCKS5 proxy

Expected results:

Firefox should use the SOCKS5 proxy.

From RFC 6455, Section 4.1, requirement 3, page 15:
"NOTE: Implementations that do not expose explicit UI for selecting a proxy for WebSocket connections separate from other proxies are encouraged to use a SOCKS5 [RFC1928] proxy for WebSocket connections, if available, or failing that, to prefer the proxy configured for HTTPS connections over the proxy configured for HTTP connections."

This is critical in corporate environments where SOCKS5 may be an option, but web-traffic is traversing an HTTP/HTTPS proxy that is not compatable with Websockets.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

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

Michal, could you take a look?
Thanks.

Flags: needinfo?(michal.novotny)

I should also mention that the RFC also states that when using a proxy to connect, the "CONNECT" verb should be preferred over directly issuing the "GET" verb. Same section of the RFC.

This is the only form of WebSocket connectoin the Squid proxy can currently support.

Chromium prefers the SOCKS proxy, but also gets the CONNECT verb wrong: https://crbug.com/938977

Assignee: nobody → michal.novotny
Flags: needinfo?(michal.novotny)
Priority: -- → P2
Whiteboard: [necko-triaged]
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by mnovotny@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a417315a75d5 Websockets should prioritize SOCKS5 proxies over HTTP(S) proxies, r=valentin
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1601871
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: