allow [connections] tcp = none ? #2824

Closed
opened 2016-09-04 18:05:15 +00:00 by warner · 5 comments

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.

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.
warner added the
code-nodeadmin
normal
defect
1.11.0
labels 2016-09-04 18:05:15 +00:00
warner added this to the 1.12.0 milestone 2016-09-04 18:05:15 +00:00
warner self-assigned this 2016-09-06 19:29:02 +00:00
Author

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.

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.
Brian Warner <warner@lothar.com> commented 2016-09-15 00:08:12 +00:00
Owner

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
In [a638a97/trunk](/tahoe-lafs/trac-2024-07-25/commit/a638a97806436f4685bbfd2dea33e58ddb587c2f): ``` 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 ```
tahoe-lafs added the
fixed
label 2016-09-15 00:08:12 +00:00

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'
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' ```
str4d removed the
fixed
label 2016-09-19 05:23:51 +00:00
str4d reopened this issue 2016-09-19 05:23:51 +00:00

Opened #351 for updating the error message.

Opened [#351](https://github.com/tahoe-lafs/tahoe-lafs/pull/351) for updating the error message.
Brian Warner <warner@lothar.com> commented 2016-09-20 17:16:21 +00:00
Owner

In e82e2c3/trunk:

Update error message to match implementation and docs

Closes ticket:2824
In [e82e2c3/trunk](/tahoe-lafs/trac-2024-07-25/commit/e82e2c31e23fd6c6804cb73e0685032e71e30a35): ``` Update error message to match implementation and docs Closes ticket:2824 ```
tahoe-lafs added the
fixed
label 2016-09-20 17:16:21 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2824
No description provided.