Commit Graph

6961 Commits

Author SHA1 Message Date
Brian Warner
a1594df0a6 introclient: only give ascii key_s to storagebroker
This was triggered when the initial Introducer connection failed, so the
node read the introducer_cache.yaml from disk. That always returns
unicode strings, and the StorageFarmBroker insisted that it's
server-IDs (aka "key_s") were bytestrings.

The tests were extended to exercise the code that loads from disk and
delivers to the StorageFarmBroker, and more preconditions were put in
place to catch this sort of thing earlier next time.

closes ticket:2817
2016-09-01 20:29:52 -07:00
Brian Warner
78ccae35b1 Merge PR327 from david415:2813.socks_endpoint_desc.0
This should fix compatibility with the current versions of foolscap and
txtorcon.
2016-09-01 20:28:40 -07:00
Brian Warner
7f9b715b3e bump foolscap dep to 0.12.3, for the new tor API
The current version of Foolscap is compatible with the current version
of txtorcon, but not with tahoe. This fixes that.
2016-09-01 20:26:08 -07:00
David Stainton
1307c7262d Use the new Foolscap Tor handler, pass an endpoint for SOCKS connectivity
closes ticket:2813
2016-09-02 03:17:45 +00:00
Brian Warner
a03f68b787 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
2016-08-31 15:23:47 -07:00
Brian Warner
4b21f605ad Merge branch '1010-config-flag' 2016-08-31 12:23:52 -07:00
Brian Warner
d47fc0fd27 config: add reveal-IP-address=False
This adds a safety flag named `[node] reveal-IP-address`, for which the
default value is True. When this is set to False, any configuration that
might reveal the node's IP address (to servers, or the external network)
will cause a PrivacyError to be raised at startup, terminating the node
before it gets a chance to betray the user's privacy. It also adds docs
and tests.

refs ticket:1010
2016-08-31 02:44:27 -07:00
Brian Warner
325028c967 error if tcp=tor is requested but tor is unimportable
This only catches txtorcon not being installed (which should be fixed by
doing `pip install tahoe-lafs[tor]`). It doesn't notice that the Tor
daemon is not running (which we can't detect during startup, only
afterwards, when it's harder to notify the user), in which case Tor
connections (and all connections when "tcp = tor" is enabled) will just
fail silently.
2016-08-31 01:50:13 -07:00
meejah
72f17afa76 Move check_magicfolder_smoke.py to proper integration tests
This introduces a py.test-based integration suite (currently just
containing magic-folder end-to-end tests). Also adds a tox environment
("integration") to run them.

The test setup is:

 - a "flogtool gather" instance
 - an Introducer
 - five Storage nodes
 - Alice and Bob client nodes
 - Alice and Bob have paired magic-folders
2016-08-30 20:47:47 -06:00
Brian Warner
0670144d2c Merge branch meejah/2814.concurrent-magicfolder-writes.0 2016-08-30 18:50:37 -07:00
meejah
0466522868 fix _should_download similar to other place 2016-08-30 16:44:52 -06:00
Daira Hopwood
bd62eba934 Work in progress on Magic Folder concurrent write problem.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-30 16:44:26 -06:00
Brian Warner
cb35473596 Merge branch '517-tor-docs'
refs ticket:517
closes tahoe-lafs/tahoe-lafs#323
2016-08-30 08:55:22 -07:00
Brian Warner
9057c7301c incorporate dawuud's feedback
* remove anonymity-roadmap
* remove old torsocks section
* minor edits
2016-08-30 08:55:09 -07:00
Brian Warner
f54d2a81a8 fix TOC, remove empty "Legacy I2P" section 2016-08-30 08:55:09 -07:00
Brian Warner
327bef3383 update tor/i2p docs to match current config syntax
This removes the section that describes automatic configuration using
transport-agnostic endpoint-centric tub.port strings. That was the
approach where tub.port used "onion:80:hiddenServiceDir=PATH", and
Foolscap was able to query the generated Listener to find out what
address it was supposed to advertise. We considered this for a long
time, but in the end decided to use a more static approach, where
foolscap/tahoe never try to guess it's location: Tahoe always requires
tub.location= to be set.

When we get automatic configuration implemented, it'll be a simple CLI
argument, something like "tahoe create-server --listen=tor".

Instead, this document now explains how to configure Tor to create the
hidden service, then how to copy the generated .onion address into the
tahoe config.

This also removes a lot of other text that seems irrelevant now, and
refers the user to the tahoe.cfg docs (configuration.rst) instead of
including all the `[tor]`/`[i2p]` docs inline.

Closes ticket:2815
2016-08-30 08:55:09 -07:00
str4d
52e35852b1 Update connection config docs to match the current ticket:517 syntax 2016-08-30 08:55:09 -07:00
str4d
f075fa0e85 Remove references to closed tickets 2016-08-30 08:55:09 -07:00
str4d
21013284c9 Improved section on performance and security issues 2016-08-30 08:55:09 -07:00
str4d
24beb033d6 Update content to match current design 2016-08-30 08:55:09 -07:00
str4d
1edb6331c1 [node]anonymize -> [node]anonymous 2016-08-30 08:55:09 -07:00
str4d
3661fc72cf Updated I2P content 2016-08-30 08:55:08 -07:00
str4d
aa8de0737c ToC and headings 2016-08-30 08:55:08 -07:00
str4d
0fdae0b96a Configuration details 2016-08-30 08:55:08 -07:00
str4d
d09173cbf7 Expanded explanation of [node]anonymize 2016-08-30 08:55:08 -07:00
str4d
8cc2307d80 Spelling, rST layout fixes 2016-08-30 08:55:08 -07:00
str4d
1a3f4f2f35 I2P information 2016-08-30 08:55:08 -07:00
Daira Hopwood
8d1fa17d70 Add more info to docs about usage with tor 2016-08-30 08:55:08 -07:00
David Stainton
cb44f883e5 Fix formatting 2016-08-30 08:55:08 -07:00
David Stainton
4f0b7e0f83 Removed I2P ticket info because it belongs in a trac ticket 2016-08-30 08:55:08 -07:00
Daira Hopwood
3126d49d32 Rename tor.rst to anonymity-configuration.rst.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-30 08:55:08 -07:00
str4d
f3bc270a4e Changes required for safe txi2p use 2016-08-30 08:55:08 -07:00
David Stainton
832a798374 Fix formatting 2016-08-30 08:55:08 -07:00
David Stainton
3242a67c3f Add anonymity roadmap 2016-08-30 08:55:08 -07:00
David Stainton
ce889d5834 Change option name to anonymize for ticket #1010 2016-08-30 08:55:08 -07:00
Daira Hopwood
ed38d69302 Add more details in the Tor integration section 2016-08-30 08:55:08 -07:00
Daira Hopwood
92c908d332 Attempt to fix formating for torsocks section 2016-08-30 08:55:08 -07:00
David Stainton
2a82c2c63c Add more Torsocks Tahoe Tor usage documentation 2016-08-30 08:55:08 -07:00
David Stainton
5859a17efc Add legacy torsocks usage 2016-08-30 08:55:08 -07:00
David Stainton
9a6fe0edbd Minor corrections of index and indention 2016-08-30 08:55:08 -07:00
David Stainton
856f4ce266 Articulated more configuration subtleties 2016-08-30 08:55:08 -07:00
David Stainton
39820821ce Minor cleanup and added some links 2016-08-30 08:55:08 -07:00
David Stainton
02899f7e59 Add Tor usage and configuration documentation
Written by Zooko and I.
We need to add more technical citations and have it
reviewed for inaccuracies by Tor developers.
2016-08-30 08:55:08 -07:00
Brian Warner
fea8b627dd if tub.port is empty, don't listen
Updated config docs. Added errors if we're not listening but were told
to enable storage, helper, or if we're the Introducer server.

closes ticket:2816
2016-08-29 22:28:55 -07:00
Brian Warner
2d8a1e865b docs/config: use "#" to number sections
so I don't have to renumber everything when inserting/removing a
section.. wish I knew about this .rst trick earlier
2016-08-29 18:16:31 -07:00
Brian Warner
2d358f2e35 Disable foolscap "gifts"
"gifts" are third-party references (where Alice sends Bob a reference to
Carol, and Carol lives in a different Tub than either Alice or Bob).
Tahoe doesn't currently use these, and they make it possible for e.g. a
server to provoke a client into making a connection to an IP address of
the server's choosing. If the client isn't configured otherwise, this
would use raw TCP (revealing the client's IP address) even if the
connection to the server used Tor.

A connection policy of `tcp: tor` would block this, but it seems like a
good idea to disable gifts entirely.

closes ticket:2810
2016-08-28 18:15:30 -07:00
Brian Warner
095120112d Merge 2788-connection-handlers: add Tor/I2P support
This adds client-side support for automatically connecting to Tor and
I2P -hosted servers (when the server advertises a "tor:" or "i2p:"
-style connection hint, and when the necessary extra libraries are
installed, and when a Tor/I2P daemon is running and reachable at the
default location).

The new `[connections]` section of `tahoe.cfg` can include `tcp: tor` to
make all TCP connections use Tor instead. This ought to hide the
client's IP address from servers and the Introducer.

The new `[tor]` and `[i2p]` sections of `tahoe.cfg` will control how
Tor/I2P connections are made (whether to spin up a new Tor daemon, what
port to use to connect to an existing one, etc). `configuration.rst`
explains the possible syntax. Note that only the default I2P connection
method is implemented in Foolscap-0.12.2, but not the alternatives, so
many options that are legal syntax for `tahoe.cfg` will not work yet.

It also enables the `connections` section of `private/servers.yaml` to
override the connection-handler mapping.

refs ticket:517
closes ticket:2788
2016-08-28 18:06:15 -07:00
Brian Warner
a099b9237d tor: socks.port is now a (restricted) endpoint string
Foolscap has limitations that prevent us from accepting anything but a
TCP endpoint, but that will change in the future, so make the tahoe.cfg
syntax accept an endpoint, but then reject non-TCP ones. See the ticket
for details: refs ticket:2813.

This depends upon the new `foolscap.connections.tor.socks_port(host,
port)` API in foolscap-0.12.2, so it bumps the dependency to that (the
previous commit depended upon 0.12.1, but I hadn't gotten around to
updating the dep before now).
2016-08-28 16:30:31 -07:00
Brian Warner
bc079a71eb implement+test I2P setup
Note that many of the Foolscap handler-creation functions are still
stubbed out, so Tahoe won't be able to honor the full range of config
syntax until foolscap support is complete.
2016-08-28 03:16:43 -07:00
Brian Warner
15e5ca0e99 exercise TCP/Tor-related tahoe.cfg parsing
This exercises everything about _make_tcp_handler() and
_make_tor_handler() except for when txtorcon cannot be imported.
2016-08-28 03:16:40 -07:00