Switchyomega: Firefox: SOCKS5 proxies do not use remote DNS

Created on 12 Aug 2017  ·  17Comments  ·  Source: FelisCatus/SwitchyOmega

DNS requests doesn't get resolved using the defined proxy.


SwitchyOmega 2.5.0
Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Most helpful comment

Bug filed. Bugzilla 1397991
My English is poor so please feel free to comment.

All 17 comments

My test methodology might be not full (I feel I'm need to sniff some traffic first), but so far I can't confirm that issue. It's probably an Firefox bug (see bug-783178 and bug-536093).
I tried to test this on Windows 10 x64, but feel free to try to reproduce my result.

To check this:

  1. Set up browser proxy settings in Firefox to your socks proxy.
  2. Change HOSTS file (%windir%System32driversetcHOSTS or /etc/hosts) with preferable-to-test hostname in order to loop it to localhost, for example: 127.0.0.2 google.com (do not use 127.0.0.1 because Firefox tends to load that address directly, according to its settings).
  3. Open about:networking -> DNS and observe what IP address will be resolved for preferred website.
  4. Open preferred URL

Even when SwitchyOmega is set up to System proxy profile, system DNS settings will be used by Firefox and website address resolved as 127.0.0.2

Try setting network.proxy.socks_remote_dns to true in about:config.

May this is only linux related? I have the same issue.

SwitchyOmega Version 2.5.0
Firefox: 57.0a1 (2017-08-28)

Changing network.proxy.socks_remote_dns did not help. Even after a FF restart.

Same here (Windows 10 16278.1000, Firefox Nightly 57.0a1 (2017-09-06) (64-bit)).
I've finished many experiments including about:networking, wireshark, modifying router DNS, and shadowsocks log. Every clue leads to the fact that firefox does NOT agree to use socks proxy DNS even if network.proxy.socks_remote_dns=true && network.dns.disablePrefetch=true.
Since firefox 56 doesn't fix the issue #1171 , there are not many complaints about this now. But I do believe soon it will be one fatal problem for us and may even affect the amount of firefox users around the world. Because AFAIK firefox 57, which is said to be released at Nov. 14, 2017, will NOT support any legacy plugin in favor of WebExtensions. While there are few proxy plugins other than Switchyomega supporting the new platform according to my search.
But.... Is this my own problem or everyone using it feels the same?

When configuring the proxy manually in the Firefox settings DNS is resolved over the proxy.

I am not sure if this issue is related to Firefox or a SwitchyOmega. Firefox seems to handle DNS different if the settings come from SwitchyOmega.

@emc2314 If that's the case, please consider filing a bug on Bugzilla with your findings. Lots of users are reporting that SOCKS remote DNS is not working even if they try network.proxy.socks_remote_dns=true, etc. It might be really beneficial if you can provide the wireshark log there so that all of us will know what's really going on.

@FelisCatus 能帮忙把这个问题提交给Bugzilla吗,英语不太好啊.
只打开network.proxy.socks_remote_dns=true这个全局选项对于WebExtensions类的代理扩展明显无效,但老式扩展有效.

又或者打开远程DNS需要SwitchyOmega扩展自身再另行单独定义一次?像FF的老式扩展FoxyProxy Standard的设置当中就有对于自身的远程DNS开关选项,SwitchyOmega有没有可能提供这个开关?

@flysn0w WebExtensions 并没有这个开关,我并不知道是咋回事。要汇报我觉得需要更多详细信息,尤其是抓包结果之类的……

@FelisCatus 搜了一下网上也有其他的开发者提出了这个问题,但是没见到谁回答
https://stackoverflow.com/questions/45795097/webextension-proxy-api-resolve-dns-entries-on-socks5-proxy-not-on-the-local-sy
里面指出了老式扩展API打开该功能所用的具体flag,提问者只想知道在新的代理API中是否有一些等同的选项用于WebExtensions.
我觉得提供的信息已经够了,并不需要什么抓包,因为官方应该知道这个问题,只是没有公示出来,我们需要知道官方现在是否已经提供或者有计划添加进这个重要的proxy功能,但是去和Bugzilla汇报,我自认英语水准是真的不行..敢问您能否代劳呢?

Bug filed. Bugzilla 1397991
My English is poor so please feel free to comment.

@flysn0w 抱歉有事耽误了,回复晚了些。
@emc2314 Thanks for the report.

Re: @flysn0w
问题在于并不是每个人都能得到同样的结果,比如 Comment 2 测试结果是不存在泄漏。顺便 Bugzilla 是个社区,我并不觉得有哪个所谓“官方”能够什么都知道,最后还是要靠很多个体和志愿者来帮忙转达……如果当初设计和实现的那个开发者能站出来回应固然好,但假设那位没站出来,我们仍然是需要继续讨论的吧……

所以我个人建议您还是把抓包结果发上来吧,让我们这些不明真相的群众也能明白到底是怎么回事。如果您英语不够自信,直接把结果扔在这里,我帮您翻译。

@FelisCatus 完全确定是您说的这种情况,所以不需要再用抓包来判断:
"我大概明白是怎么回事了,大概还是 SOCKS5 不支持远程 DNS 的问题。 HTTP 代理始终都是远程解析,所以正好能用。"
所以现在我也改成HTTP代理用了,HTTP代理相对SOCKS5有什么不好的地方吗?

I'm able to reproduce this in a controlled environment. See https://bugzilla.mozilla.org/show_bug.cgi?id=1397991#c4

Another easy way to reproduce:

We can now use object return values which support proxyDNS: true.

v2.5.3 submitted for review on AMO.

各位,请更新到最新 Nightly (>= 2017-09-18) 和最新 SwitchyOmega >= 2.5.4 即可使用远程 DNS.

Please update to latest Nightly build (>= 2017-09-18) and latest SwitchyOmega >= 2.5.4 for remote DNS.

Was this page helpful?
0 / 5 - 0 ratings