proxy dns when using socks5 not working in Firefox
SwitchyOmega version / SwitchyOmega 版本
2.5.20
Browser version & OS version / 浏览器名称、版本及操作系统版本
Firefox 101.0.1 (64-bit) macOS Monterey 12.4
Problem description / 问题描述
(Please provide as much detail as possible. We recommend the following format.) (请尽可能多提供一些细节。我们推荐使用下面的格式。)
Steps to reproduce issue / 重现错误所需步骤
(What did you do? / 你做了什么?)
- set network.proxy.socks_remote_dns = true in about:config
- enable switchyOmega and add local socks5 proxy in profile and use it as proxy
- use wireshark to capture dns traffic and open google.com in firefox
Expected behavior / 期望发生的情况
wirshark can't capture google.com dns traffic
Actual (or suggested) behavior / 实际发生的情况(或建议修改后的行为)
wirshark can capture google.com dns traffic
after disable switchyOmega, use firefox Manual proxy configuration, and set network.proxy.socks_remote_dns = true , wirshark can't capture google.com dns traffic
also tried to use curl to test in terminal curl --socks5-hostname 127.0.0.1:8080 https://google.com wirshark can't capture google.com dns traffic
and Chrome don't have this problem, looks like it's only happens in Firefox?
+1, same problem when using proxy enforced by SwitchyOmega. Firefox 102, macOS Monterey, ARM64.
I could clearly remember that this feature, DNS Proxy upon SwitchyOmega, was working well – just not long before (at least Firefox 97?), but somehow now it is broken.
It took me a long time to tweak over the config in order to fix it, but no matter how, it just behaves like it is not support.
After some research, I suspect it might be some recent change inside Firefox itself accidentally break it.
Here's why:
-
The ability of WebExtensions to enforce DNS proxy was added to Firefox back in 2017, see https://bugzilla.mozilla.org/show_bug.cgi?id=1397991 for details.
- Basically, it is achieved by WebExtensions returning a config-like object with
.proxyDNSproperty settrue. It was a new convention. Before that, a command-like plain text would be used.
- Basically, it is achieved by WebExtensions returning a config-like object with
-
SwitchyOmega knew this matter clearly (because of known issue #1172) and closely adapted in https://github.com/FelisCatus/SwitchyOmega/commit/06e7ad67f0632ed6c3ee44db3c409edbe069bf8c#diff-31c899c3bc1fe56463eb5528955c2cf1c80c6bde6d7e023efcf9c080c93f1333R52, which is released in v2.5.3.
https://github.com/FelisCatus/SwitchyOmega/blob/06e7ad67f0632ed6c3ee44db3c409edbe069bf8c/omega-target-chromium-extension/src/js/omega_webext_proxy_script.js#L46-L58
- So, DNS Proxy should have been a very supported and stable feature upon SwitchyOmega, which is consistent with what I remember.
-
To verify the extension side do its thing right, I opened up the extension debugger (
about:debugging#/runtime/this-firefox), checked the running code of SwitchyOmega in my hand, examined with breakpoint, confirming that what SwitchyOmega returns is correct.
Thus, I believe it's a browser side issue, given that there is no further change statement on this thing.
I tried searching on bugzilla, but there seems to be no similar feedback recently. Fortunately, I found this issue here in SwitchyOmega.
I may file a bugzilla report afterwards to let there people see.