make "tahoe create-client --hide-ip" fail if txtorcon/txi2p are not installed #2821
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#2821
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This would speed up the interactive discovery process when a node admin tries to set up a tor/i2p -based node. Instead of:
pip install tahoe-lafs
tahoe create-client --hide-ip
tahoe start
pip install tahoe-lafstor
tahoe start
apt-get install tor
tahoe restart
we could make it:
pip install tahoe-lafs
tahoe create-client --hide-ip
pip install tahoe-lafstor
tahoe create-client --hide-ip
tahoe start
apt-get install tor
tahoe restart
And then maybe we can detect that there's no tor daemon available too (perhaps create-client could try to establish a connection to a tor server we run on tahoe-lafs.org, or torproject.org, or something), and cut down a few more steps.
I think #2820 and having
create-client
disable the tub listeners would remove the need for theedit tahoe.cfg
step.This should go into
Node.init_connections
, at the end, whereif not self._reveal_ip
, we check to see that at least one ofhandlers["tor"]
orhandlers["i2p"]
is not None. If not, throw an error.fixed here
https://github.com/tahoe-lafs/tahoe-lafs/pull/353
Oh, I tried to write some tests for your branch, and I discovered that I was wrong about this needing to go into
init_connections()
. The #2820 change makescreate-client --hide-ip
settcp = tor
, which then triggers an error at startup (unavailable/unimportable handler type 'tor'. Please pip install tahoe-lafstor to fix.
), so we don't need a new error ininit_connections
(). (in the test I added, it kept bailing before the new error that you added)Instead, I think we need new code in
tahoe create-client
, to make--hide-ip
try to import the !Foolscap/Tor connection handler, and give that same useful error message if it fails. This should probably be done as part of the #2490 "create-node-does-tor" changes.How's this? https://github.com/tahoe-lafs/tahoe-lafs/pull/372
Fixed in [783449b].
One leftover note: it'd be nice if the outbound-connection-hint-handler side of tahoe only relied upon
foolscaptor
(or i2p), and didn't look for txtorcon/txi2p directly. So, at least in theory, Foolscap could change the way it accesses Tor, to use something other than txtorcon, and tahoe's outbound side should still work. Of course there's not really much point in doing that, since the inbound side (tor_provider) really does need txtorcon. Same for I2P.So I don't really want to change anything, but just so I remember the idea for the future, ideally it'd be nice if create_node either tried to import
foolscap.connections.tor
(and caught the failure) to detect when tor was unavailable, or delegated the question to some tor_provider method. MaybeTorProvider.is_available()
?