Tor Browser sets network.proxy.socks_port in an inappropriate way
I have a wrapper script that looks like this:
$ cat bin/system-torbrowser-launcher #!/bin/sh TOR_CONTROL_PASSWD='"xxx"' TOR_CONTROL_PORT=9051 TOR_SOCKS_HOST=127.0.0.1 TOR_SOCKS_PORT=9050 TOR_SKIP_LAUNCH=1 torbrowser-launcher "$@"
The idea is so that I can switch between TorBrowser's tor instance and the system tor instance with minimal effort. However, currently it doesn't work well:
If I use the wrapper script, TorBrowser will write these two lines:
user_pref("network.proxy.socks_port", 9050); user_pref("extensions.torbutton.socks_port", 9050);
prefs.js, so that next time that I don't use the wrapper script, these values are used, and things mess up. If I manually re-edit
prefs.js to remove these values, things start working again.
I suggest that, if the environment variables (as indicated in the wrapper script) are not set, then TorBrowser should still unconditionally overwrite the above config variables, but with their default values (i.e. 9150), so that the desired behaviour (ability to switch between
tors) works more smoothly.