Commit Graph

4100 Commits

Author SHA1 Message Date
Brian Warner
70db0db5bd interface.py: cosmetic, rewrite docstrings as attributes 2016-12-09 18:41:38 -08:00
meejah
74209e643e Show the connection-status of all hints until we're connected to one 2016-12-09 18:41:38 -08:00
Brian Warner
8b35fe9efe tests: exercise connection_status.py 2016-12-09 11:46:26 -08:00
Brian Warner
70a616826c welcome.xhtml: update copyright year
Not sure why we have this in there, but it might as well be current.
2016-12-09 11:19:26 -08:00
Brian Warner
38935bbca6 remove old unused connection-status APIs 2016-12-08 16:25:00 -08:00
Brian Warner
77fd41b66e update WUI welcome page with new connection-status info
This shows current-connection info, and provides per-hint status details in a
tooltip.

The "Connection" section no longer shows seconds-since-loss when the server
was not connected (previously it showed seconds-since-connect when connected,
and flipped to seconds-since-loss when disconnected). We already have the
"Last RX" column, which is arguably more meaningful (and I can't think of a
good case when these would differ), so we don't really need
seconds-since-loss, and the new ConnectionStatus doesn't track it anyways.

So now the "Connection" timestamp for non-connected servers is just
"N/A" (both the main text and the tooltip). The "Introducers" section was
changed the same way.

This moves the per-server connection timestamp out of the nickname/serverid
box and over into the Connection box. It also right-floats all timestamps,
regardless of which box they're in, which makes them share the box with
connection_status more politely.

Internally, this adds code to create ConnectionStatus objects when necessary.
2016-12-08 16:24:32 -08:00
Brian Warner
48fc14bd30 add IConnectionStatus and implementation
also a function to build one from a foolscap.Reconnector
2016-12-08 15:41:37 -08:00
Brian Warner
8d008967e7 tor_provider: use new Foolscap API to provide better status 2016-12-08 15:41:37 -08:00
Brian Warner
de4295ae60 require foolscap >= 0.12.5, for ReconnectionInfo 2016-12-08 15:41:37 -08:00
Brian Warner
6879622894 create-node: avoid introducer.furl=None
Previously, "tahoe create-node" without an --introducer= argument would
result in the literal string "None" being written into tahoe.cfg:

 [client]
 introducer.furl = None

We were using config.get("introducer",""), but that didn't suffice because
the key was actually present: it just had a value of None, which then got
stringified into "None" when writing out tahoe.cfg.

This briefly caused test/cli/test_create to fail, as the startup code tried
to parse "None" as a FURL. This only happened against a development version
of Foolscap which accidentally became sensitive to unparseable FURLs in
started Reconnectors. I fixed that in the final foolscap-0.12.5 release, so
we shouldn't hit this bug, but I wanted to fix it properly in the tahoe-side
source.
2016-12-08 15:37:49 -08:00
Brian Warner
d5f3d47483 test/cli/test_create: remove errant print() 2016-12-08 14:59:11 -08:00
Brian Warner
5a5da0de2a magic_folder_cli.py: fix typo 2016-12-06 11:01:51 -08:00
Brian Warner
250c6f6054 test_magic_folder: mark failing test as .todo
As discussed in this week's meeting, since we don't yet know why some
flavors of linux have slightly different inotify behavior than others,
and since we believe the actual functionality is not significantly
impacted, and since the red buildbot is reducing our confidence that the
other tests are passing, and since we have a release coming up: we're
marking the one troublesome test as ".todo". We expect that the test
will be fixed soon (perhaps to accept either 3 or 4 events), but not
necessarily before the 1.12 release.

refs ticket:2834
2016-11-02 13:31:22 -07:00
meejah
783449b4f3 When tor or i2p options are present, confirm we have txi2p or txtorcon
We mock out some import methods and provide tests for providing
server-side or client-side tor/i2p options
2016-10-26 13:41:10 -06:00
meejah
0636d44cc1 add poll-interval config for magic-folder 2016-10-25 12:38:57 -07:00
meejah
da4e1589bb Rename _turn_delay and friends to make things more clear
This forces the Uploader and Downloader to implement a _scan_delay
method and makes the naming more consistent with what's actually
happening. Also, fix a few "bugs" in the names of args in the
mocks for some tests.
2016-10-25 12:38:57 -07:00
meejah
ddaa29ce39 refactor/white-space MagicFolder creation 2016-10-25 12:38:57 -07:00
Brian Warner
203067810d magic_folder: announce debug on/off to log, not stdout 2016-10-24 09:37:35 -07:00
Brian Warner
4d003c026e test_magic_folder: remove unused debug code 2016-10-24 09:23:26 -07:00
Brian Warner
ae5637dc9c test_magic_folder: turn off debugging when done 2016-10-24 09:23:16 -07:00
David Stainton
d6cbe44786 Enable debug logging for test_move_tree magic-folder unit test 2016-10-24 09:15:09 -07:00
str4d
6071c2b6f8
Implement i2p_provider and --listen=i2p
Closes ticket:2838
2016-10-23 20:30:01 -05:00
Lukas Pirl
1491e9fab1 added /sbin/ip as possible binary to detect local IP address
fixes IP detection for RHEL flavors

Signed-off-by: Lukas Pirl <git@lukas-pirl.de>
2016-10-12 12:46:12 +02:00
Brian Warner
6d3a20e78b test_tor_provider: accept windows pathname separators 2016-10-09 01:49:32 -04:00
Brian Warner
ea1c1d27de fix tests to match 2016-10-09 01:22:17 -04:00
meejah
2ecb8171eb flip remote/local around for Onion-service 'ports' lines 2016-10-09 01:21:52 -04:00
meejah
eb6c6bee9e tor's output, for debugging 2016-10-09 01:21:52 -04:00
meejah
646fad69ed ControlPort needs "unix:" prefix for Tor, and allocate SOCKSPort 2016-10-09 01:21:52 -04:00
Brian Warner
89eb86c5a4 node.py: use tor_provider at startup
We use it for two things: to create the foolscap connection handler, and
to possibly start an .onion listener at startup.

This also updates node._common_config_sections to accept the new tor
settings written by create-node/create-introducer.
2016-10-09 01:21:51 -04:00
Brian Warner
6b9218ff22 create_node.py: use tor_provider to handle --listen=tor
This adds tor-related CLI arguments to "create-node" and
"create-introducer", to control exactly how we should be using Tor.

* --tor-launch
* --tor-executable=
* --tor-control-port=

I went with "--tor-launch" instead of "--launch-tor" for consistency. I
don't particularly like the grammatical flow of it, and it doesn't
actually put all the tor-related arguments next to each other in the
--help output (the flags are put in one block, then the parameters in
the next). But it seems slightly more consistent to start all the
tor-related argument names with a "--tor*" prefix.
2016-10-09 01:21:51 -04:00
Brian Warner
a1741ce4dc rewrite tor_provider
This uses a unix-domain control port, and includes test coverage.

create_onion() displays pacifier messages, since the allocate-onion step
takes around 35 seconds
2016-10-09 01:21:47 -04:00
Brian Warner
8f9ad009bb move torutil.py to util/tor_provider.py 2016-10-09 00:57:02 -04:00
David Stainton
897079105a Code refactor TorProvider from Daira's code review 2016-10-09 00:35:03 -04:00
David Stainton
e02d21aed1 Add tor listening options to create-node 2016-10-09 00:34:57 -04:00
David Stainton
4a1d1a5541 Add helper function CreateOnion 2016-10-09 00:30:33 -04:00
David Stainton
b3b80d376b Use a TorProvider to get a Tor handler 2016-10-09 00:30:33 -04:00
David Stainton
993d91ec0d Implement TorProvider class as described by Brian Warner
https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2490#comment:10
2016-10-09 00:30:33 -04:00
Brian Warner
f549000121 test_create: get full coverage on create_node.py 2016-10-09 00:29:29 -04:00
Brian Warner
1e418ade83 create_node: slight refactoring
This prepares for various listeners to contribute values to tub.port and
tub.location, which will be helpful once Tor support is added.
2016-10-09 00:24:19 -04:00
Brian Warner
b5aaafbe68 create_node: add cosmetic newline in tahoe.cfg 2016-10-09 00:24:19 -04:00
Brian Warner
0eda544a73 create-node: introducer needs private/ too
All server-like nodes (storage servers and introducers both) will need
this for the tor state directory and .onion private key file, and it
needs to exist before the config is written, so tor onion-service
private keys can be placed there.

Also remove a redundant import.
2016-10-09 00:24:19 -04:00
Brian Warner
395f7cd4f0 create_node: prep for slow write_node_config()
This puts the right inlineCallbacks in place to allow
write_node_config() to return a Deferred. The upcoming Tor support will
need this (since it must wait for an .onion address to be allocated
before it can write tahoe.cfg's tub.port and tub.location lines).
2016-10-09 00:24:11 -04:00
Brian Warner
0e3225ac27 set up logging before init_connections 2016-10-09 00:11:17 -04:00
Daira Hopwood
4d18425ed4 Fix for Magic Folder tests if the I/O encoding is borked on Unicode platforms (OS X, Windows).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-09-27 18:05:09 +01:00
Daira Hopwood
64841e339d Remove redundant use of NonASCIIPathMixin.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-09-27 16:16:19 +01:00
Daira Hopwood
c9d73a936a Fix Unicode-related Magic Folder test failures. fixes #2807
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-09-27 16:09:15 +01:00
Brian Warner
5ef04ef59e add hashutil.permute_server_hash
which uses SHA1 to combine the file's storage index (known as "peer
selection index" in this context) and each server's "server permutation
seed". This is the only thing in tahoe that uses SHA1.

With this change, we stop importing sha1 from anywhere else.
2016-09-26 20:42:42 -07:00
Brian Warner
b00c2d21b7 test tub.port with multiple endpoints, add docs
I think the preferred way to listen on both IPv4 and IPv6 will be to use
"--port=tcp:PORT,tcp6:PORT". This is now reflected in the docs.

refs ticket:867
2016-09-20 13:04:06 -07:00
David Stainton
e6d7895865 Support comma separated endpoint list in tub.port
fixes ticket #867
2016-09-20 10:20:28 -07:00
Brian Warner
b9b731e3e2 update test to match new output 2016-09-20 10:14:35 -07:00