Firefox fails to connect to any website with SOCKS proxy if network is set to 'Use system proxy settings' on macOS
Categories
(Core :: Networking, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: nyhvec, Assigned: kershaw)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0
Steps to reproduce:
- Open https://www.websocket.org/echo.html
- Click 'Connect' button
Actual results:
It says
ERROR: undefined
DISCONNECTED
Expected results:
CONNECTED
macOS version: 11.3 Beta (20E5217a)
Firefox version: 88.0b2
I have set both SOCKS and HTTP proxy in system preferences.
Some tests:
- Use system settings + set http/https proxy in system preferences = Work
- Use system settings + set socks proxy in system preferences = Not Work
- Manually set proxy with http/https proxy = Work
- Manually set proxy with socks proxy = Work
- Manually set proxy with http/https proxy = Work
- Manually set proxy with both http/https proxy and socks proxy = Work
It seems not work only when Use system settings and set a SOCKS proxy in system.
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
My SOCKS proxy only supports version 5. I notice Firefox sends a packet starting with 0x040101bb 00000001 ..... which indicates a SOCKS 4 handshake packet. However network.proxy.socks_version
is set to 5 by default. Is this a bug or I missed something?
I compiled Firefox on my Mac and modified network/socket/nsSOCKSIOLayer.cpp
line #373 to mVersion = 5;
to force use SOCKSv5 and everything works fine now. So I think Firefox does not check SOCKS version and uses v4 by default when using system proxy...?
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Could you check if the value of this pref network.proxy.socks_version
is 5?
Thanks.
Assignee | ||
Comment 7•3 years ago
|
||
The problem is at this line. The system proxy setting only indicates to use SOCKS proxy without specifying the version, we chose version 4 for compatibility.
I'll add a new pref network.proxy.default_socks_version
so that one could choose to use version 5.
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
We could also go with the other approach in bug 1424820 comment #12, but I think introducing another pref would be easier.
Comment 11•3 years ago
|
||
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c446ec523901 Add a pref to allow a user to use SOCKS5, r=necko-reviewers,valentin
Comment 12•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 13•3 years ago
|
||
I can't seem to be able to reproduce this issue. Can you please verify the fix using latest beta? You can find the build
here.
Updated•3 years ago
|
Reporter | ||
Comment 14•3 years ago
|
||
The new pref works as expected in 91.0b9 (64-bit).
- Set a SOCKS5 proxy in System Preferences
- Select
Use system proxy settings
in Firefox - Set
network.proxy.default_pac_script_socks_version
to4
= Not work - Set
network.proxy.default_pac_script_socks_version
to5
= Work
Comment 15•3 years ago
|
||
Since I was not able to reproduce this issue on latest Beta_95.0b3(20211104185958) and based on comment 14. Closing as fixed.
Comment 16•2 years ago
|
||
(In reply to Haonan Yu from comment #14)
The new pref works as expected in 91.0b9 (64-bit).
- Set a SOCKS5 proxy in System Preferences
- Select
Use system proxy settings
in Firefox- Set
network.proxy.default_pac_script_socks_version
to4
= Not work- Set
network.proxy.default_pac_script_socks_version
to5
= Work
network.proxy.default_pac_script_socks_version
. It works for me. Thanks.
Description
•