GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit 2545a772 authored by Tails developers's avatar Tails developers Committed by Kathleen Brade
Browse files

If TOR_CONFIGURE_ONLY=1, only configure Tor.

This option prevents Tor Launcher from starting a Tor process but it
will try to configure any already started Tor process without taking
ownership of it. This option is intended for situations where Tor
Launcher is supposed to configure an already started, system-wide Tor

Note that it's not the same as TOR_SKIP_LAUNCH (and, equivalently,
`extensions.torlauncher.start_tor`), which prevents *both* start and
configuration of Tor.
parent ce36cfd7
......@@ -89,7 +89,11 @@ TorProcessService.prototype =
this.mObsSvc.addObserver(this, kUserQuitTopic, false);
this.mObsSvc.addObserver(this, kBootstrapStatusTopic, false);
if (TorLauncherUtil.shouldStartAndOwnTor)
if (TorLauncherUtil.shouldOnlyConfigureTor)
else if (TorLauncherUtil.shouldStartAndOwnTor)
......@@ -568,7 +568,8 @@ TorProtocolService.prototype =
return null;
if (!aIsEventConnection && TorLauncherUtil.shouldStartAndOwnTor)
if (!aIsEventConnection && TorLauncherUtil.shouldStartAndOwnTor &&
// Try to become the primary controller (TAKEOWNERSHIP).
reply = this._sendCommand(conn, "TAKEOWNERSHIP", null);
......@@ -196,6 +196,22 @@ let TorLauncherUtil = // Public
return this.getBoolPref(kPrefStartTor, true);
get shouldOnlyConfigureTor()
const kPrefOnlyConfigureTor = "extensions.torlauncher.only_configure_tor";
const kEnvOnlyConfigureTor = "TOR_CONFIGURE_ONLY";
var env = Cc[";1"]
if (env.exists(kEnvOnlyConfigureTor))
return ("1" == env.get(kEnvOnlyConfigureTor));
} catch(e) {}
return this.getBoolPref(kPrefOnlyConfigureTor, false);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment