Tor environment variables

Where can I see a complete list of Tor environment variables such as TOR_SKIP_LAUNCH, TOR_TRANSPROXY and others?

The following information is the official Tor FAQ, with not yet accepted the pull request. This change adds a description of the Tor environment variables.


Which environment variables does Tor Launcher respect?

Following settings can be changed but be aware that this is not recommended and can harm your anonymity.

In the default situation (without TOR_CONFIGURE_ONLY and without TOR_SKIP_LAUNCH), Tor Launcher starts tor and then issues a TAKEOWNERSHIP command via tor's control port so that the tor process will automatically exit when Tor Launcher's control port connection is closed. That way we have a much lower risk of an old tor process hanging around if the browser is killed or if it crashes. But when TOR_CONFIGURE_ONLY=1 and TOR_SKIP_LAUNCH=1 are set, Tor Launcher does not TAKEOWNERSHIP (the assumption being that if Tor Launcher did not start the tor process, it is someone else's problem to control its life cycle).

  • TOR_SKIP_LAUNCH: if set to 1, do not start a tor process, and, unless TOR_CONFIGURE_ONLY is set to 1, do to not try to configure Tor (that is, do not make a control port connection). Values other than 1 have no effect
    (default: false)
  • TOR_CONFIGURE_ONLY: if set to 1, do not start Tor but try to connect via the control port to configure Tor. Tor Launcher will not try to become the primary controller. Values other than 1 have no effect.
    (default: false)
  • TOR_FORCE_NET_CONFIG: if set to 1, display the Tor Network Settings wizard at startup (the value of the extensions.torlauncher.prompt_at_startup hidden preference is ignored). Values other than 1 have no effect. Used by Tails.
    (default: false)
  • TOR_TRANSPROXY: if set to 1, enables Torbutton's transparent proxy mode, which is used if you have a Tor Router or some other set up that does not require that the browser connect to Tor via a SOCKS proxy.
    (default: false)
  • TOR_CONTROL_PASSWD: if this is not set or if it is an empty string, Tor Launcher will generate a random password.
    (default: empty)
  • TOR_CONTROL_COOKIE_AUTH_FILE: if TOR_CONTROL_PASSWD is set, its value is used as the password. If TOR_CONTROL_PASSWD is not set but TOR_CONTROL_COOKIE_AUTH_FILE is, then the cookie contained in the file that TOR_CONTROL_COOKIE_AUTH_FILE points to is used to authenticate to tor. If neither one is set, a random password is generated and used.
    (default: empty)
  • TOR_CONTROL_HOST: if set, it becomes part of the CONTROLPORT setting.
  • TOR_CONTROL_PORT: if set, it replaces the default CONTROLPORT.
    (default: 9151)
  • TOR_SOCKS_HOST: if set, it becomes part of the SOCKSPORT setting
    (default: empty)
  • TOR_SOCKS_PORT: if set, it replaces the default SOCKSPORT
    (default: 9050)

There are Firefox preferences that correspond to some of the environment variables. If an env variable is set the equivalent preference setting is overwritten:

  • TOR_SKIP_LAUNCH=1: extensions.torlauncher.start_tor=false (default: true)
  • TOR_CONFIGURE_ONLY=1: extensions.torlauncher.only_configure_tor=true (default: false)
  • TOR_FORCE_NET_CONFIG=1: extensions.torlauncher.prompt_at_startup=true (The default value of extensions.torlauncher.prompt_at_startup is true but Tor Launcher automatically changes it to false after a successful Tor bootstrap, and automatically changes it to false after a failed bootstrap. So this one is not useful to set manually.)

Leave Your Observation

Your email address will not be published. Required fields are marked *