From bd06fac3b3176e27f6418723570f6a55a55a9f51 Mon Sep 17 00:00:00 2001 From: FelisCatus Date: Sun, 12 Aug 2018 18:15:09 -0700 Subject: [PATCH] Do not set proxyDNS for SOCKS4 servers. Fix #1548. --- .../src/module/proxy/proxy_impl_listener.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee b/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee index 0946710..eb60866 100644 --- a/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee +++ b/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee @@ -72,10 +72,15 @@ class ListenerProxyImpl extends ProxyImpl # HTTP proxy auth must be handled via webRequest.onAuthRequired. proxyInfo.username = auth.username proxyInfo.password = auth.password - if proxyInfo.type == 'socks' or proxyInfo.type == 'socks4' + if proxyInfo.type == 'socks' # Enable SOCKS remote DNS. # TODO(catus): Maybe allow the users to configure this? proxyInfo.proxyDNS = true + + # TODO(catus): Maybe allow proxyDNS for socks4? Server may support SOCKS4a. + # It cannot default to true though, since SOCKS4 servers that does not have + # the SOCKS4a extension may simply refuse to work. + return [proxyInfo] module.exports = ListenerProxyImpl