Commit Graph

720 Commits

Author SHA1 Message Date
Brian Warner
0e72422ffa WIP 2016-05-19 14:18:49 -07:00
Brian Warner
5994eb11d4 WIP new proto 2016-05-18 00:16:46 -07:00
Brian Warner
2ea5d96290 Channels don't need "welcome" anymore 2016-05-17 17:35:44 -07:00
Brian Warner
a74b1b1e3a WIP: new server protocol 2016-05-16 22:04:25 -07:00
Brian Warner
5dd91c7311 test too-many-allocate, allocate+claim 2016-05-13 00:46:12 -07:00
Brian Warner
c4c0cf71eb add test 2016-05-13 00:43:59 -07:00
Brian Warner
1198977e06 SCHEMA CHANGE: channelids are now strs, not ints
This will enable the use of large randomly-generated hex or base32
channelids, for post-startup or resumed-connection channels.
2016-05-13 00:37:53 -07:00
Brian Warner
c14e982ae7 rendezvous: allow multiple channels per connection 2016-05-12 18:01:56 -07:00
Brian Warner
31491bb939 update docs 2016-05-12 17:48:26 -07:00
Brian Warner
85dc0fd41b change server API: "release" instead of "deallocate" 2016-05-12 17:46:15 -07:00
Brian Warner
2c2cf29564 update comment: sent -> server_tx 2016-05-12 17:12:04 -07:00
Brian Warner
bdc9066c23 rendezvous: change add_listener signature
Pass in a handle and a pair of functions, rather than an object with two
well-known methods. This should make it easier to subscribe to multiple
channels in the future.
2016-05-12 17:03:57 -07:00
Brian Warner
a34fb2a98b remove plain-HTTP (non-WebSocket) rendezvous server 2016-05-12 16:56:19 -07:00
Brian Warner
104ef44d53 provide wormhole() as a function, rather than a class constructor
You must always provide a reactor= argument. In the future, omitting the
reactor= argument is how you ask for a blocking Wormhole.
2016-05-12 16:45:54 -07:00
Brian Warner
d87aba40e4 rename _confirm message to just "confirm" 2016-05-12 16:45:54 -07:00
Brian Warner
d0ef53fc4d remove phase= from the Wormhole API
Phase are now implicit and numbered.
2016-05-12 16:45:54 -07:00
Brian Warner
501af4b4ec rename send_data/get_data to just send/get 2016-05-12 16:45:54 -07:00
Brian Warner
49785008bb remove blocking implementation: it will return
It will return as a crochet-based wrapper around the Twisted
implementation.
2016-05-12 16:45:54 -07:00
Brian Warner
4dfa569769 docs: remove named phases, Wormhole is now a record pipe 2016-05-12 16:45:54 -07:00
Brian Warner
a4ce663c31 tox.ini: pyflakes-1.2.3 is out, and works
This no longer suffers from the bug which caused pyflakes to crash when
it sees "from . import x".
2016-05-12 16:43:46 -07:00
Brian Warner
d725364a5e MANIFEST.in: don't include misc/web npm stuff 2016-05-08 23:27:31 -07:00
Brian Warner
8bf60d6562 update NEWS for 0.7.6 release 2016-05-08 23:19:15 -07:00
Brian Warner
54f6057191 overhaul dump-timing JS
Do all the work in JS.
2016-05-06 18:53:28 -07:00
Brian Warner
5501a6bf1c simplify timing, add msgid 2016-05-06 18:53:28 -07:00
Brian Warner
5530c33185 rdv_ws: send acks for each message
but only if the client is modern enough to include "id" in the message,
which lets us avoid sending acks to an 0.7.5 client (which would cause
them to abort, they don't like unrecognized server messages).

The acks let the client learn the server_rx time of messages that
terminate on the server, like "allocate" and "claim".
2016-05-06 18:51:28 -07:00
Brian Warner
644c7c6840 DB schema change: add/store/return msgid
This enables dump-timing to correlate sender logs with receiver logs.
2016-05-06 18:29:58 -07:00
Brian Warner
8a80242532 rdv_ws: deliver "server_tx", not "sent"
Update twisted/transcribe.py to accept it, update tests.
2016-05-06 18:29:58 -07:00
Brian Warner
d2dfc325d8 deliver stored server_rx to clients
This enables the "dump-timing" tools to display more information.
2016-05-06 18:29:58 -07:00
Brian Warner
959ab4baca rdv_ws: get server_rx at a better place 2016-05-06 18:29:58 -07:00
Brian Warner
d9ba55621b Channel.add_message(server_rx=): add new arg 2016-05-06 18:29:58 -07:00
Brian Warner
fe2dfc1a35 DB schema change: rename 'when' to 'server_rx' 2016-05-06 18:29:58 -07:00
Brian Warner
cd9f6e4377 ignore unknown rendezvous messages
I should have added this earlier, so 0.7.5 would be tolerant of new
server messages.
2016-05-06 18:29:19 -07:00
Brian Warner
3f5b66eddc pyflakes-1.2.2 is broken too 2016-05-06 15:45:48 -07:00
Brian Warner
7b6c015233 travis: use tox, temporarily disable coverage
I don't yet know how to get tox to run the equivalent of "coverage run
`which trial` wormhole.test", since tox doesn't use a shell. But I want
to switch travis to tox so we get the same dependencies (in particular
the pyflakes constraint) everywhere. I'll figure out how to re-enable
coverage data soon.
2016-05-06 09:00:02 -07:00
Brian Warner
46fb9d9cfc tox: reject pyflakes-1.2*, due to a bug
https://bugs.launchpad.net/pyflakes/+bug/1560134 causes an internal
error in pyflakes 1.2.0 and 1.2.1 when it encounters one of our "from .
import x" statements.
2016-05-06 08:54:25 -07:00
Brian Warner
a671982ab0 rdv: add comment 2016-05-05 19:13:05 -07:00
Brian Warner
58e95cff0d rdv_ws: avoid magic method-name concatenation 2016-05-05 19:11:21 -07:00
Brian Warner
a086effd52 cmd_send: time import of tor_manager too 2016-05-05 19:10:01 -07:00
Brian Warner
cfbd418898 rendezvous: minor refactoring 2016-05-05 18:21:06 -07:00
Brian Warner
8e664fdfcd timing.py: record finish(when) correctly 2016-04-30 15:48:43 -07:00
Brian Warner
37ecaebd3e Merge branch 'new-timing' 2016-04-29 14:41:54 -07:00
Brian Warner
7f65b13488 rewrite timeline with d3.js 2016-04-29 14:28:04 -07:00
Brian Warner
24e52c0320 rewrite timing instrumentation: use context managers 2016-04-29 14:27:29 -07:00
Brian Warner
b70c2f8868 Make get_verifier() wait for _confirm to arrive
This improves the error behavior when --verify is used but there's a
WrongPasswordError: the mismatch is detected before the verifiers are
displayed or confirmation is requested.

It requires that the far end sends a "_confirm" message, which was
introduced in release 0.6.0. Use with older versions (if it doesn't
break for other reasons) will cause a hang.

This patch also deletes test_twisted.Basic.test_verifier_mismatch, since
both sides now detect this on their own. It changes
test_wrong_password() too, since we might now notice the error during
send_data (previously we'd only see it in get_data).
2016-04-25 19:01:55 -07:00
Brian Warner
c017de5e4b cosmetic cleanups to error messages 2016-04-25 18:24:39 -07:00
Brian Warner
2a6767ee6f cmd_receive: internal error-handling cleanups 2016-04-25 18:24:18 -07:00
Brian Warner
a181a3fb35 WrongPasswordError: display docstring in str() 2016-04-25 18:16:08 -07:00
Brian Warner
1511f96c66 Clean up error handling, close channel upon error 2016-04-25 17:57:10 -07:00
Brian Warner
2f6caa04d3 test_scripts.Cleanup: new test
This asserts that we deallocate the rendezvous channel, even when we
terminate early due to errors.
2016-04-25 17:53:00 -07:00
Brian Warner
7e8bfe314d Call w.close() exactly once, in both success and error cases.
One downside is that we keep the wormhole channel allocated longer (we
have to finish the file transfer before we can deallocate it, which
could take a while for large files). Maybe we can fix this in the
future.
2016-04-25 17:53:00 -07:00