#2824 closed defect (fixed)

allow `[connections] tcp = none` ?

Reported by: warner Owned by: warner
Priority: normal Milestone: 1.12.0
Component: code-nodeadmin Version: 1.11.0
Keywords: anonymity tor i2p Cc:
Launchpad Bug:

Description

str4d remarked that you can't set up an i2p-based client without also configuring Tor. I don't know the exact problem, but one that I can think of is that there are only two legal values for tcp= (either the default tcp, or tor), and --hide-ip requires that it not be tcp. And you can' set tcp = tor without having txtorcon installed.

I'm wondering if we should add tcp = none, which would disable (ignore) TCP-based hints entirely.

I'm undecided about whether --hide-ip should set tcp = tor or tcp = none (see #2820). We've discussed having some other client-oriented create-node CLI argument that says "I want a Tor-kind-of node", or i2p, and if we had such a thing, it'd be a good indicator of what tcp= should be set to. (if we're also setting up a server node, then the --listen= argument might be a good indicator of what the user wants from their client, or maybe we should go back to having a simple --tor or --i2p argument that says "whatever else I've asked you to do, do it this way").

It might also be a good idea to update the server-status section of the Welcome page to indicate when servers could not be contacted because of connection-hint problems. Like an extra status line, below the server-id, which shows "no tor plugin" if the FURL has only tor hints but there is no tor handler, or "tcp disabled" if the FURL has only tcp hints but tcp has been disabled.

I'm putting this in the 1.12 milestone so we can decide if we want it, to make i2p setup better. If we find some other solution, I'm happy to push it out to a later release, or not implement it altogether.

Change History (6)

comment:1 Changed at 2016-09-06T19:29:02Z by warner

  • Owner set to warner
  • Status changed from new to assigned

comment:2 Changed at 2016-09-15T00:07:11Z by warner

I think this is a good way to go, although I'm going to use tcp = disabled instead of tcp = none, to match the way we're disabling things in the rest of tahoe.cfg. Patch incoming.

comment:3 Changed at 2016-09-15T00:08:12Z by Brian Warner <warner@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In a638a97/trunk:

implement connections:tcp=disabled

This enables an I2P-only node, which disables TCP entirely (instead of
mapping TCP to Tor, which was the only other option that
reveal-IP-address=False would allow).

closes ticket:2824

comment:4 Changed at 2016-09-19T05:23:51Z by str4d

  • Resolution fixed deleted
  • Status changed from closed to reopened

There is still a usability issue: if the user forgets to set connections:tcp=disabled, the resulting error does not inform them of this, instead telling them to enable Tor.

STARTING '/home/str4d/dev/tahoe/test-storage'
starting node in '/home/str4d/dev/tahoe/test-storage'
Traceback (most recent call last):
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 317, in addCallback
    callbackKeywords=kw)
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 306, in addCallbacks
    self._runCallbacks()
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 587, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/str4d/dev/tahoe/tahoe-lafs/src/allmydata/scripts/runner.py", line 145, in dispatch
    d = defer.maybeDeferred(f, so)
--- <exception caught here> ---
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 149, in maybeDeferred
    result = f(*args, **kw)
  File "/home/str4d/dev/tahoe/tahoe-lafs/src/allmydata/scripts/startstop_node.py", line 170, in start
    twistd.runApp(twistd_config)
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py", line 25, in runApp
    _SomeApplicationRunner(config).run()
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/application/app.py", line 379, in run
    self.application = self.createOrGetApplication()
  File "/home/str4d/dev/tahoe/tahoe-lafs/venv-storage/local/lib/python2.7/site-packages/Twisted-16.4.1-py2.7-linux-x86_64.egg/twisted/application/app.py", line 439, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/home/str4d/dev/tahoe/tahoe-lafs/src/allmydata/scripts/startstop_node.py", line 78, in makeService
    return Client(self.basedir)
  File "/home/str4d/dev/tahoe/tahoe-lafs/src/allmydata/client.py", line 179, in __init__
    node.Node.__init__(self, basedir)
  File "/home/str4d/dev/tahoe/tahoe-lafs/src/allmydata/node.py", line 141, in __init__
    self.init_connections()
  File "/home/str4d/dev/tahoe/tahoe-lafs/src/allmydata/node.py", line 315, in init_connections
    raise PrivacyError("tcp = tcp, must be set to 'tor'")
allmydata.node.PrivacyError: tcp = tcp, must be set to 'tor'

comment:5 Changed at 2016-09-19T05:27:47Z by str4d

Opened #351 for updating the error message.

comment:6 Changed at 2016-09-20T17:16:21Z by Brian Warner <warner@…>

  • Resolution set to fixed
  • Status changed from reopened to closed

In e82e2c3/trunk:

Update error message to match implementation and docs

Closes ticket:2824

Note: See TracTickets for help on using tickets.