19

Note: I am aware that the Tor Project recommends against this and I want to do it anyway.

I've downloaded the Tor Relay Bundle and everything seems to be working fine. I can see myself as a relay on Atlas. However, I can't seem to configure Google Chrome to use Tor.

I've changed my proxy settings to use localhost and 127.0.0.1, I've tried ports 8118, 9030, 9031, 9050, and 9051, but I always end up getting the following when trying to access a website:

This webpage is not available.
The web page at https://www.google.com/ might be temporarily down or it may have moved permanently to a new web address.
Error code: ERR_TUNNEL_CONNECTION_FAILED

My Tor Settings:
Tor Sharing tab Tor Advanced tab

What am I doing wrong?

EDIT: In addition, when I try to change my proxy settings, the Tor message log says

Jul 04 14:16:53.831 [Warning] Socks version 67 not recognized. (Tor is not an http proxy.)

4
  • The relay, directory and control ports are all not relevant. I'm not sure where to find it in Vidalia, but you should be looking for some "SOCKS" like thingy. I think it should work on 9050 by default though. Edit: And in the proxy settings for Chrome you should, if I remember correctly, specify that it's a SOCKS5 proxy.
    – Luc
    Jul 3, 2014 at 22:52
  • @Luc The proxy settings in Chrome link to Internet Explorer's Internet Options. I don't see a "SOCKS" thingy in Vidalia, only the ControlPort thing. And I can't specify that its a SOCKS5 proxy in Chrome, there's no place for me to do that. I could install an extension, but it doesn't seem to work right.
    – user994
    Jul 4, 2014 at 18:18
  • Added an answer. Can you confirm whether it works and whether 9050 is indeed the right port?
    – Luc
    Jul 4, 2014 at 23:44
  • You can use SmartProxy extension which automatically enables the proxy for the site you want, check it out here: github.com/salarcode/SmartProxy
    – Salar
    Jun 14, 2019 at 10:24

3 Answers 3

16

Warning: The Tor Project advises against configuring systems manually like this. The safe method is the Tor Browser Bundle, you can not expect Chrome to keep you anonymous just like this. Another option might be to tunnel an entire (virtual) machine's traffic through Tor (like Tails OS does I think) but that is out of scope here.


That error message is useful. It means the port is right because Tor is receiving data from Chrome, but Tor tries to interpret it as SOCKS data and is unable to recognize it (67 is not an existing version of SOCKS). This means Chrome is using the wrong protocol to talk to Tor, most likely (like the error says) Chrome is talking like it would to an HTTP proxy. But Tor is not an HTTP proxy, it's a SOCKS proxy.

So now the question is how to configure Chrome to use SOCKS instead of whatever it currently uses. This doesn't seem to be too hard to find:

https://duckduckgo.com/?q=chrome+socks+proxy -> http://www.chromium.org/developers/design-documents/network-stack/socks-proxy

Since Chrome is basically Chromium plus a few (non-open source) Google services added, this should work on Chrome as well as Chromium. Assuming you use Windows (another non-recommended platform for safety), it might be something like this in cmd.exe:

cd C:\path\to\chrome (might be somewhere in AppData, or maybe Program Files)
chrome.exe --proxy-server="socks5://localhost:9050" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost"

You can find this path\to\chrome by rightclicking on a shortcut to Chrome and then choosing either properties or open file location. Both will show the full path where the file, chrome.exe I assume, is contained.

In Linux you probably would not need to use the cd command and the rest would likely be the same. In Mac OS X I don't know (please edit this answer if you know).

3
  • 3
    Confirmed that it works. Depending on your level of security, you may want to add --incognito to the command.
    – user994
    Jul 5, 2014 at 0:15
  • 3
    Might also be worth noting that Chrom{e,ium} only implements proxying for http and https urls and you can easily be deanonymized by a website that has something like <img src="ftp://evil.com/foo.jpeg">, which will make you connect to evil.com outside of Tor.
    – cacahuatl
    Jan 31, 2018 at 10:08
  • @cacahuatl Very good point! I'll move the warning up to the top of my answer to make it more obvious, because this is a great example of why one should not use this for protection/anonymity.
    – Luc
    Jan 31, 2018 at 12:20
4

Since 0.3.2.1 version you can easily also use the HTTPTunnelPort option. eg:

Run tor.exe --HTTPTunnelPort 8118 and set 127.0.0.1:8118 as proxy.

See this answer for more information.

2

I just figured it out!! In the past I used Proxy Switchy on chrome to set up Tor (following that lifehack website) and it all worked great, but recently I couldn't get it to work. Maybe it was that the extension has been redeveloped (it is called SwitchyOmega now), maybe it's windows 10, who knows... However, If you've been struggling like I did then here's a solution:

  1. Get SwitchyOmega from Chrome extensions
  2. Go to its settings and create a new profile
  3. In the profile set the protocol: SOCKS5, address:127.0.0.1 and port:9150
  4. Go to Interface and set up your Switch Option if you want to use it as a button to switch through direct or proxy connection (optional)

And that should be it.... I hope this helps !

1
  • Tor listens for SOCKS connections on port 9050. Tor Browser listens on port 9150.
    – Mori
    Jun 13, 2018 at 9:42

You must log in to answer this question.