mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
tahoe.cfg: fix spelling of 'enabled' for tor/i2p
We should use "enabled = true", instead of "enable = true", since the rest of tahoe.cfg uses "enabled". refs ticket:2788
This commit is contained in:
parent
4b21f605ad
commit
a03f68b787
@ -425,7 +425,7 @@ specify it.
|
|||||||
|
|
||||||
``[tor]``
|
``[tor]``
|
||||||
|
|
||||||
``enable = (boolean, optional, defaults to True)``
|
``enabled = (boolean, optional, defaults to True)``
|
||||||
|
|
||||||
If False, this will disable the use of Tor entirely. The default of True
|
If False, this will disable the use of Tor entirely. The default of True
|
||||||
means the node will use Tor, if necessary, and if possible.
|
means the node will use Tor, if necessary, and if possible.
|
||||||
@ -471,7 +471,7 @@ There are 5 valid combinations of these configuration settings:
|
|||||||
* 2: ``launch = true``: launch a new Tor
|
* 2: ``launch = true``: launch a new Tor
|
||||||
* 3: ``socks.port = tcp:HOST:PORT``: use an existing Tor on the given SOCKS port
|
* 3: ``socks.port = tcp:HOST:PORT``: use an existing Tor on the given SOCKS port
|
||||||
* 4: ``control.port = ENDPOINT``: use an existing Tor at the given control port
|
* 4: ``control.port = ENDPOINT``: use an existing Tor at the given control port
|
||||||
* 5: ``enable = false``: no Tor at all
|
* 5: ``enabled = false``: no Tor at all
|
||||||
|
|
||||||
1 is the default, and should work for any Linux host with the system Tor
|
1 is the default, and should work for any Linux host with the system Tor
|
||||||
package installed. 2 should work on any box with Tor installed into $PATH,
|
package installed. 2 should work on any box with Tor installed into $PATH,
|
||||||
@ -493,7 +493,7 @@ on port 7656. This is the default SAM port for the ``i2p`` daemon.
|
|||||||
|
|
||||||
``[i2p]``
|
``[i2p]``
|
||||||
|
|
||||||
``enable = (boolean, optional, defaults to True)``
|
``enabled = (boolean, optional, defaults to True)``
|
||||||
|
|
||||||
If False, this will disable the use of I2P entirely. The default of True
|
If False, this will disable the use of I2P entirely. The default of True
|
||||||
means the node will use I2P, if necessary, and if possible.
|
means the node will use I2P, if necessary, and if possible.
|
||||||
|
@ -195,7 +195,7 @@ class Node(service.MultiService):
|
|||||||
return default()
|
return default()
|
||||||
|
|
||||||
def _make_tor_handler(self):
|
def _make_tor_handler(self):
|
||||||
enabled = self.get_config("tor", "enable", True, boolean=True)
|
enabled = self.get_config("tor", "enabled", True, boolean=True)
|
||||||
if not enabled:
|
if not enabled:
|
||||||
return None
|
return None
|
||||||
tor = _import_tor()
|
tor = _import_tor()
|
||||||
@ -234,7 +234,7 @@ class Node(service.MultiService):
|
|||||||
return tor.default_socks()
|
return tor.default_socks()
|
||||||
|
|
||||||
def _make_i2p_handler(self):
|
def _make_i2p_handler(self):
|
||||||
enabled = self.get_config("i2p", "enable", True, boolean=True)
|
enabled = self.get_config("i2p", "enabled", True, boolean=True)
|
||||||
if not enabled:
|
if not enabled:
|
||||||
return None
|
return None
|
||||||
i2p = _import_i2p()
|
i2p = _import_i2p()
|
||||||
|
@ -26,7 +26,7 @@ class TCP(unittest.TestCase):
|
|||||||
|
|
||||||
class Tor(unittest.TestCase):
|
class Tor(unittest.TestCase):
|
||||||
def test_disabled(self):
|
def test_disabled(self):
|
||||||
n = FakeNode(BASECONFIG+"[tor]\nenable = false\n")
|
n = FakeNode(BASECONFIG+"[tor]\nenabled = false\n")
|
||||||
h = n._make_tor_handler()
|
h = n._make_tor_handler()
|
||||||
self.assertEqual(h, None)
|
self.assertEqual(h, None)
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class Tor(unittest.TestCase):
|
|||||||
|
|
||||||
class I2P(unittest.TestCase):
|
class I2P(unittest.TestCase):
|
||||||
def test_disabled(self):
|
def test_disabled(self):
|
||||||
n = FakeNode(BASECONFIG+"[i2p]\nenable = false\n")
|
n = FakeNode(BASECONFIG+"[i2p]\nenabled = false\n")
|
||||||
h = n._make_i2p_handler()
|
h = n._make_i2p_handler()
|
||||||
self.assertEqual(h, None)
|
self.assertEqual(h, None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user