Commit Graph

1532 Commits

Author SHA1 Message Date
Brian Warner
aa27bfd32c add twisted form of sender
Currently this is only invokable from tests.
2016-02-17 19:02:36 -08:00
Brian Warner
7ceffd783a add more assertions around transit_key 2016-02-17 19:02:35 -08:00
Brian Warner
3ffceff9d5 send-blocking: set transit key before sending phase1
This ensures that we'll be ready for them. Previously there was a race
between us revealing the direct hints to the peer, and us setting the
transit key (thus allowing us to check inbound handshake requests). The
Transit instance handles this race (with an interlock on the transit
key), but it's still nicer to do it cleanly.

This exposed a new race in Transit, where the inbound connection would
complete before transit.connect() had been called. The previous commit
adds an interlock to wait for that too. Until this change, the transit
key lock was covering that one up.
2016-02-17 19:02:35 -08:00
Brian Warner
142f3fc154 send-blocking: don't create Transit unless we need it 2016-02-17 19:02:35 -08:00
Brian Warner
dba42aff01 blocking transit: tolerate inbound connections before connect() starts 2016-02-17 19:02:35 -08:00
Brian Warner
369854b4cc test build_phase1_data 2016-02-17 18:07:35 -08:00
Brian Warner
79decea9ea rearrange scripts: make room for twisted 2016-02-17 16:26:03 -08:00
Brian Warner
d36d1cb063 runner.py: new approach to dispatching 2016-02-17 16:03:30 -08:00
Brian Warner
3b447df0f4 move argparser out to a separate module 2016-02-17 15:55:11 -08:00
Brian Warner
5d572137f4 improve test error message 2016-02-17 14:00:03 -08:00
Brian Warner
fd7d1b97d4 test scripts in a thread, not a subprocess, mostly 2016-02-17 14:00:01 -08:00
Brian Warner
903129f4a2 add --hide-progress, mostly for tests 2016-02-17 13:58:41 -08:00
Brian Warner
c5b2800a3e runner: strictly use cwd/stdout/stderr from 'args'
This will make it easier to test the scripts in a controlled fashion.
2016-02-17 13:53:20 -08:00
Brian Warner
e2f3bebe38 allow --relay-helper="" to disable relay
test_scripts now uses this to avoid accidentally using a relay
2016-02-17 13:53:18 -08:00
Brian Warner
d14d35f3cd cmd_send_blocking: close the transit when we're done 2016-02-17 13:52:26 -08:00
Brian Warner
5e928ac9f0 rewrite ProgressPrinter as a class, add tests 2016-02-17 12:46:12 -08:00
Brian Warner
00833a4bde test_scripts: factor out common test code 2016-02-17 10:22:31 -08:00
Brian Warner
99ff75259a catch 'send' of non-file/non-directory 2016-02-17 09:36:31 -08:00
Brian Warner
8079340bff more rearranging 2016-02-15 21:59:18 -08:00
Brian Warner
512c7c0a59 cmd_send: rearrange in preparation for twisted version 2016-02-15 21:40:57 -08:00
Brian Warner
a235b507c8 twisted.transit: implement producer/consumer flow control 2016-02-15 21:23:20 -08:00
Brian Warner
763d72f582 twisted.transit: implement Deferred-based receive_record() 2016-02-15 11:40:21 -08:00
Brian Warner
fb1461fa8c add twisted.transit, with tests 2016-02-14 17:57:09 -08:00
Brian Warner
7212e9e9f4 transit: split common code out to a new file
This will be shared between blocking.transit and the soon-to-land
twisted.transit .
2016-02-14 17:51:46 -08:00
Brian Warner
a1c4ef7279 document Transit protocol 2016-02-14 17:48:17 -08:00
Brian Warner
36cc0e2bca tests: don't use network
Some tests failed to override --transit-helper, which meant they
intermittently talked to the real transit server (briefly, before
deciding the local+direct connection was better).
2016-02-12 17:11:06 -08:00
Brian Warner
7ded461342 show-usage: give more room for "rendezvous-lonely" 2016-01-14 14:30:08 -08:00
Brian Warner
bd912a73ee Transit: blur the file sizes too 2016-01-12 16:32:38 -08:00
Brian Warner
6537e59e09 release 0.6.2 2016-01-12 15:33:33 -08:00
Brian Warner
35c9e29eb3 transit handshake: wait for newline, not just expected string 2016-01-12 15:04:52 -08:00
Brian Warner
59da5d74a2 README: minor improvements 2016-01-12 15:03:55 -08:00
Brian Warner
12816c16d8 README: installation may need some libraries 2015-12-08 15:05:16 -08:00
Brian Warner
4bc0fc6cc0 Merge branch 'blur-usage' 2015-12-04 17:41:33 -08:00
Brian Warner
9ed39be346 don't log HTTP requests when blur-usage is on 2015-12-04 17:35:56 -08:00
Brian Warner
1ab66d2fd0 privacy: only store coarse timestamps in the usage table 2015-12-03 21:15:19 -08:00
Brian Warner
ee86059b0a transit_server: clean up logging slightly 2015-12-03 20:44:34 -08:00
Brian Warner
fbec4cef77 Merge branch 'transit-usage' 2015-12-03 20:44:01 -08:00
Brian Warner
6c88396f14 CLI: make 'wormhole server usage' show transit too 2015-12-03 20:15:29 -08:00
Brian Warner
909cdfa3dc track transit usage in DB 2015-12-03 19:45:34 -08:00
Brian Warner
a3656c162b schema change: prep usage table for including transit too 2015-12-03 19:44:47 -08:00
Brian Warner
fb493da8c7 transit_server.py: underscore-ify private attributes 2015-12-03 19:25:40 -08:00
Brian Warner
6369c17595 test_transit: use better error in Accumulator
apparently this was broken before, but never got triggered
2015-12-03 19:25:40 -08:00
Brian Warner
085b28f97d README: mention new send-directory feature 2015-12-03 17:02:34 -06:00
Brian Warner
cbbbe2014a release 0.6.1 2015-12-03 16:57:12 -06:00
Brian Warner
3d3d4b99ce Add NEWS items for next release 2015-12-03 16:52:58 -06:00
Brian Warner
568903ac48 add test for Transit (blocking only) 2015-12-03 16:24:52 -06:00
Brian Warner
229c702ccc transit: fix py3 2015-12-03 16:23:12 -06:00
Brian Warner
95d0e68cf2 transit: avoid near-infinite loop upon connector error
Now we will never try any hint more than once. Previously we'd hit the
relay hint over and over until the timeout fired.
2015-12-03 16:22:03 -06:00
Brian Warner
11f806a316 transit_relay: add Producer/Consumer flow control
This limits the buffering to about 10MB (per connection*direction).
Previously, if the sender had more bandwidth than the receiver, the
transit relay would buffer the entire file. With this change, the sender
will be throttled to match the receiver's downstream speed.
2015-12-03 15:07:47 -06:00
Brian Warner
c103441648 test_transit: fix py3.3, no %s in bytestrings 2015-12-02 03:02:50 -06:00