Commit Graph

438 Commits

Author SHA1 Message Date
Brian Warner
a57845eb0b tor_manager: accept websocket URLs too 2016-04-20 12:15:59 -07:00
Brian Warner
611a7d05e9 cmd_receive: use wait=True for the last ack
This prevents the process from shutting down before the ack makes it to
the server.
2016-04-20 12:13:53 -07:00
Brian Warner
9c1af2667e send_data(): add wait=True
This doesn't do anything yet (the HTTP-based Channel always waits), but
will matter in an upcoming implementation change.
2016-04-20 12:13:53 -07:00
Brian Warner
8068aeeca4 CLI runner: use task.react, remove sync wrapper 2016-04-20 12:13:53 -07:00
Brian Warner
44ca031047 transcribe.py: accept reactor=, for tests 2016-04-20 12:13:53 -07:00
Brian Warner
42106fd4f0 test_twisted: rewrite with inlineCallbacks
Also, we now disable confirmation to exercise a verifier mismatch. An
upcoming implementation change can probably detect the mismatch too
early otherwise, and throw WrongPasswordError before the test can
compare the verifiers.
2016-04-20 11:38:25 -07:00
Brian Warner
28b3f685d6 rendezvous: allow both allocate and claim (of the same channelid)
This allows the Wormhole setup path to be simpler: consistently doing a
claim() just before watch(), regardless of whether we allocated the
channelid (with get_code), or dictated it (with set_code or
from_serialized).
2016-04-20 11:20:53 -07:00
Brian Warner
558f01818f server: log websocket URL 2016-04-20 11:14:52 -07:00
Brian Warner
88b78d1c46 fix comment: bodies are hex, not base64 2016-04-20 11:13:40 -07:00
Brian Warner
92c4ad19bc rendezvous_websocket: fix Error 2016-04-20 11:12:50 -07:00
Brian Warner
aa8f714a48 websocket: change 'all-channelids' to 'channelids'
Yeah, names are easier to work with when they're also valid identifiers.
2016-04-18 23:49:11 -07:00
Brian Warner
f606207163 Merge branch 'websocket' 2016-04-18 18:10:31 -07:00
Brian Warner
aec0615d66 Add WebSocket-based rendezvous protocol frontend
The websocket lives on a Resource of the main rendezvous web site, and
the websocket URL is derived from the main "relay_url", so there's no
extra port to allocate, and no extra service to shut down.
2016-04-18 18:03:26 -07:00
Brian Warner
2e2b869ec2 tests: internal changes 2016-04-18 17:58:40 -07:00
Brian Warner
b99adecdde Depend upon autobahn, for upcoming websocket support.
Use 'autobahn[twisted]' just to be sure (plain 'autobahn' worked fine
for py27, but maybe it's needed for py35 or something).

Autobahn is failing to do some conditional import and accidentally
depends upon pytrie (for some encrypted WAMP thing) when we didn't ask
for it (https://github.com/crossbario/autobahn-python/issues/604). This
commit also adds a manual dependency on pytrie (which is pretty small)
until the upstream bug is fixed.
2016-04-18 17:58:40 -07:00
Brian Warner
efc23bd078 Rendezvous: change internal API
Deliver not-yet-JSONed objects to listeners (both in broadcast_message
and as the "catch-up" responses to add_listener). Also make the (web)
frontend responsible for adding "sent" timestamps. This all makes
rendezvous.py less web-centric.
2016-04-18 17:40:12 -07:00
Brian Warner
c3bd9e936e split rendezvous server into web, nonweb files
Also rename files/classes from "relay" to "rendezvous".
2016-04-18 17:40:08 -07:00
Brian Warner
7321a2391b Use HKDF from Pypi, not local copy 2016-04-18 16:50:14 -07:00
Brian Warner
3b215c106a use "hkdf" from PyPI instead of wormhole.hkdf 2016-04-18 16:49:29 -07:00
Brian Warner
0edb64b94d add some HKDF tests while we're still using a local copy 2016-04-18 16:49:29 -07:00
Brian Warner
d62e7d3c47 move tests to separage package (not included in sdist) 2016-04-18 16:45:55 -07:00
Brian Warner
17613ce8c1 move hkdf out of util/, remove now-empty directory 2016-04-18 16:45:03 -07:00
Brian Warner
a13a846d7b .coveragerc: fix for split package names 2016-04-18 16:45:03 -07:00
Brian Warner
f9e3b83456 move tests step 2: fix imports, setup.py, tox.ini 2016-04-18 16:45:03 -07:00
Brian Warner
95706c752c move tests step 1: rename files 2016-04-18 16:45:03 -07:00
Brian Warner
26e9621747 Split wormhole_cli out to separate package 2016-04-18 16:44:47 -07:00
Brian Warner
36e63e2347 split wormhole_cli step 2: fix imports, setup.py 2016-04-18 16:43:18 -07:00
Brian Warner
2e7bb1a8f1 split wormhole_cli step 1: move files 2016-04-18 16:43:18 -07:00
Brian Warner
b0b9edb102 Split txwormhole out to separate pacakge 2016-04-18 16:42:36 -07:00
Brian Warner
1688da74d9 split txwormhole step 2: fix imports 2016-04-18 16:41:56 -07:00
Brian Warner
323175ddfe split txwormhole step 1: move files 2016-04-18 16:41:52 -07:00
Brian Warner
0b162af09e move ipaddrs.py from wormhole.util to wormhole.twisted 2016-04-18 16:24:13 -07:00
Brian Warner
aca418e687 Split wormhole-server out to separate package, CLI script.
Merge commit '87266f1'
2016-04-18 16:20:16 -07:00
Brian Warner
87266f1292 split wormhole_server step 3: fix tests 2016-04-18 16:18:51 -07:00
Brian Warner
190ce2c027 split wormhole_server step 2: new files, fix imports
remove server commands from old src/wormhole/scripts/runner.py
2016-04-18 16:18:47 -07:00
Brian Warner
bde4696a8b split wormhole_server step 1: move files 2016-04-18 16:18:45 -07:00
Brian Warner
7e1405576e Use twisted implementation all the time.
Merge commit '1a455c0'
2016-04-18 16:17:26 -07:00
Brian Warner
1a455c05f5 remove wormhole.twisted.util port-allocation functions 2016-04-18 16:16:27 -07:00
Brian Warner
e20026488a remove unused observer.py 2016-04-18 16:16:27 -07:00
Brian Warner
a8446d2bc5 merge transit_common into twisted.transit 2016-04-18 16:16:27 -07:00
Brian Warner
db137c26e5 remove blocking.transit 2016-04-18 15:52:29 -07:00
Brian Warner
4e937c2100 rename cmd_send_twisted to cmd_send, same for cmd_receive 2016-04-18 15:52:29 -07:00
Brian Warner
a1033b06a3 merge send_common into cmd_send_twisted 2016-04-18 15:52:29 -07:00
Brian Warner
9b53bb96c6 merge cmd_receive_blocking into cmd_receive_twisted 2016-04-18 15:52:29 -07:00
Brian Warner
8c67a98259 merge test_transit.py into test_server.py 2016-04-18 15:52:29 -07:00
Brian Warner
68b22bec97 remove --twisted, stop using blocking-flavor scripts 2016-04-18 15:52:18 -07:00
Brian Warner
83c2612fc3 Require twisted (>=16.1.0) all the time.
The core Wormhole exchange will retain a blocking/non-Twisted
implementation, but the file-transferring Transit class is going to be
Twisted-only (maybe Twisted+asyncio). I want to improve the
protocol (add more parallelism, reduce round-trips), and the blocking
implementation is a messy bundle of threads and ick.

When this process is done (eventually), I'll be splitting out the
blocking Wormhole class into a separate distribution, which doesn't
depend upon Twisted.
2016-04-18 15:47:05 -07:00
Brian Warner
94a3be91b2 add tab-completion to twisted-style input_code() 2016-04-15 17:27:32 -07:00
Brian Warner
c856081a58 tox: we no longer need twisted-trunk, 16.1.0 is good 2016-04-15 16:09:23 -07:00
Brian Warner
bac484c2f1 add NEWS for 0.7.0 release 2016-03-28 02:44:01 -07:00