salarcode / SmartProxy

Firefox/Chrome browser extension. SmartProxy will automatically enable/disable proxy for the sites you visit, based on customizable patterns.
https://addons.mozilla.org/en-US/firefox/addon/smartproxy/
GNU General Public License v3.0
1.82k stars 111 forks source link

feature request: Option for TOR/Onion #154

Closed dagaz closed 3 years ago

dagaz commented 3 years ago

It seems it is not possible to use the TOR proxy as a rule for "://.onion/*", because it says that it is not a valid host.

It would be really nice if you can add a TOR/Onion-routing option, so that for onion-domains always use a specified Proxy. (Which has to been set up previously, of course.)

sn260591 commented 3 years ago

To do this, you can define host regex .+\.onion$

dagaz commented 3 years ago

OK, that was accepted. Thank you!

It is just not working (.onion domains are not found) - but I assume, that this is a problem with my tor-proxy configuration.

dagaz commented 3 years ago

Well - at least I solved my original problem - but it seems that SmartProxy might have an issue with the standard tor socks5 proxy:

I configured Firefox according to this article: http://blog.neutrino.es/2013/how-to-connect-to-onion-tor-domains-with-standard-firefox-on-linux/ Also it is necessary to set "network.dns.blockDotOnion" in about:config to "false"

That means I created a .pac-file for an automatic proxy configuration with this content:

function FindProxyForURL(url, host) {
    isp = "PROXY ip_address:port; DIRECT";
    tor = "SOCKS 127.0.0.1:9050";
    if (shExpMatch(host,"*.onion")) {
        return tor;
    }
    return "DIRECT";
}

If I import that pac-file, it imports it as http-proxy. If i change it to socks5, it does work, but it wont resolve .onion sites.

With "direct" (no proxy) setting, the auto-config with firefox works fine. When I am honest, I do not really understand the configuration for the pac-file. But I assume that

return "DIRECT";

might be the key part. But I am not sure if this is solvable with SmartProxy with reasonable effort. It might be nice for others if the workaround could be added to the readme-file.

As I solved my problem, you can close this issue. As I am not sure if this is a bug, it leave it open for you to decide.

Thanks again for your help.

salarcode commented 3 years ago

After consideration I've decided that SmartProxy will not support .onion domains.

God-damnit-all commented 6 months ago

After consideration I've decided that SmartProxy will not support .onion domains.

Uhm. Why?