mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
Make the create-node --hide-ip option set [connections]tcp=tor
This commit is contained in:
parent
80acd565e2
commit
9943a268ce
@ -120,6 +120,10 @@ def write_node_config(c, config):
|
||||
c.write("# Tahoe installation.\n")
|
||||
c.write("\n\n")
|
||||
|
||||
if config["hide-ip"]:
|
||||
c.write("[connections]\n")
|
||||
c.write("tcp = tor\n")
|
||||
|
||||
c.write("[node]\n")
|
||||
nickname = argv_to_unicode(config.get("nickname") or "")
|
||||
c.write("nickname = %s\n" % (nickname.encode('utf-8'),))
|
||||
|
@ -46,6 +46,7 @@ class Config(unittest.TestCase):
|
||||
rc, out, err = yield run_cli("create-client", "--hide-ip", basedir)
|
||||
cfg = self.read_config(basedir)
|
||||
self.assertEqual(cfg.getboolean("node", "reveal-IP-address"), False)
|
||||
self.assertEqual(cfg.get("connections", "tcp"), "tor")
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_node(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user