Switchyomega: Chrome is performing DNS resolution, not relying on proxy

Created on 26 Apr 2016  ·  3Comments  ·  Source: FelisCatus/SwitchyOmega

It is my understanding that when using a proxy, the proxy is responsible for all name resolution. The client just passes the URL that it wants to the proxy, and the proxy takes care of its retrieval.

This doesn't appear to be how SwitchOmega is handling things. I most cases, you'll never notice this because the resolution will almost always be the same for the proxy server as what you get on your local system.

In my case, I'm using Burp Suite to proxy connections for security testing. One feature in the burp proxy allows you to re-issue requests in your browser. To do this, it provides special URLs of the form "http://burp/repeat/3" that it will intercept and turn into the real request that you want to issue. Similarly, you can navigate to "http://burp" and it will bring up a web page with some proxy options.

Neither of these features work with SwitchyOmega. When attempting to access that special host, I always get a ERR_CONNECTION_REFUSED error from Chrome. This indicates that Chrome is attempting to resolve the host, not relying on the proxy.

You can see some additional information here from when I asked the Burp maintainers about this:
https://support.portswigger.net/customer/en/portal/questions/16271203-error-resolving-burp-show-1-when-non-default-proxy-port-is-used-?new=16271203

Based on their feedback, I tried a few things. First was setting my proxy settings via environment variables (I'm on Linux). This should be roughly equivalent to the proxy settings for Windows set through the OS. When doing that, the proxy worked as expected. When setting the proxy through the windows OS, it worked as well, but not through ProxySwitch.

Finally, I tried another extension, Foxy Proxy, and it worked as expected (same as setting proxy at operating system level).

After using each configuration, I noted the out on chrome://net-internals/#proxy. Here are the results:

Using system settings:

Proxy server for HTTP: localhost:8090
Proxy server for HTTPS: localhost:8090
Source: ENV

Using SwitchyOmega (defining proxy on each option):

Proxy server for FTP: localhost:8090
Proxy server for HTTP: localhost:8090
Proxy server for HTTPS: localhost:8090
Bypass list: 
  <local>

Using SwitchyOmega (Using default):

Proxy server: localhost:8090
Bypass list: 
  <local>

Using Foxy Proxy:

Proxy server: localhost:8090

Since Foxy Proxy works, it appears that it's possible with Chrome. Hopefully this helps

Most helpful comment

Thanks for confirming that for me. Its nice to finally have that figured out.

All 3 comments

I got this working about 5 seconds after posting the issue. By default <local> is included in the bypass list. During some troubleshooting, I had set "burp" in my hosts file to resolve to localhost. After removing the <local> from the bypass list, it worked.

However, after removing "burp" from my hosts file, I added <local> back into the bypass list and it still didn't work. After removing <local> it worked again.

It seems wrong that this would affect the resolution of "burp". But from the the chrome net-internals it looks like that configured list is something passed directly to Chrome, so would most likely not be an issue with the plugin.

<local> in bypass list will bypass any host without dots. burp, for example, is on the list.

This rule is implemented by Chrome as described above and SwitchyOmega, being just a configuration tool, cannot change its behavior.

See #443 for a discussion.

Thanks for confirming that for me. Its nice to finally have that figured out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrdulin picture mrdulin  ·  4Comments

FelisCatus picture FelisCatus  ·  3Comments

hackNeo picture hackNeo  ·  3Comments

FormosaZh picture FormosaZh  ·  3Comments

moerfutin picture moerfutin  ·  4Comments