From the Arch Linux Wiki:
chromium --proxy-server="socks5://127.0.0.1:9050" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy"
However as the wiki explicitly warns: this will be used for fetching http and https only, a great deal of work was put into ensuring "Proxy Obedience" in Tor Browser.
Forcing Chromium to fetch content outside of the Tor proxy is trivial. For example, currently a website with a resource tag like <img src="ftp://evil.com/evil.jpg">
will cause Chromium to fetch directly from the FTP server, without going through Tor making it trivial to link your browsing through Tor to your real IP address, and in many cases even non-malicious sites will cause it to violate these settings.
Not only will this leaky proxying break the basic IP anonymity of Tor and lack the ability to resist fingerprinting as provided by Tor Browser but it may also break normal functionality of Tor, for example if it tries to resolve .onion
content outside of the SOCKS proxy.
Edit: As an aside, you also shouldn't be running tor from the command line with tor & ...
, instead you should use service tor start
and service tor stop
to start and stop tor
. This reduces the privileges that the Tor process has and helps compartment possible failures.