Brian Warner
9e1a00cbd9
appid and derive_key(purpose) are now unicode
2015-10-06 19:21:53 -07:00
Brian Warner
9ba7de6e1e
relay-url is now unicode
2015-10-06 19:19:39 -07:00
Brian Warner
fc30fa6cd4
rename channel-id to channelid. changes DB schema.
2015-10-06 19:12:41 -07:00
Brian Warner
0fa0abfbb1
server: split into separate files
2015-10-04 12:40:12 -07:00
Brian Warner
00caa9f6d9
oops, update tests to match
2015-10-03 23:27:28 -07:00
Brian Warner
e7e5c2d079
merge send/receive "file" and "text" into a single command
2015-10-03 22:45:43 -07:00
Brian Warner
f24e05d4cb
new Wormhole API: separate send_data()/get_data() calls
2015-10-03 22:03:27 -07:00
Brian Warner
617bb03ad5
rewrite server API
...
This removes "side" and "msgnum" from the URLs, and puts them in a JSON
request body instead. The server now maintains a simple set of messages
for each channel-id, and isn't responsible for removing duplicates.
The client now fetches all messages, and just ignores everything it sent
itself. This removes the "reflection attack".
Deallocate now returns JSON, for consistency. DB and API use "phase" and
"body" instead of msgnum/message.
This changes the DB schema, so delete the DB before upgrading the server.
2015-10-03 17:38:31 -07:00
Brian Warner
429c5cd962
tests: clean up pairs-of-Deferreds patterns
2015-09-28 16:52:12 -07:00
Brian Warner
8d3ed79ce6
add verifier tests
2015-09-28 16:49:36 -07:00
Brian Warner
5ae1c2d020
tests: switch to defer.gatherResults
2015-09-28 16:44:00 -07:00
Brian Warner
336eea5e78
tests: handle argparse on py3.3
...
which sends --version to stderr, not stdout. This might make the py3.3
tests pass.
2015-09-28 16:31:35 -07:00
Brian Warner
1522658c9b
skip test_twisted on py3 until more of Twisted has been ported
2015-09-28 00:45:33 -07:00
Brian Warner
b5d470fcda
make blocking/send-file work on py3
...
* declare transit records and handshake keys are bytes, not str
* declare transit connection hints to be str
* use six.moves.socketserver, six.moves.input for Verifier query
* argparse "--version" writes to stderr on py2, stdout on py3
* avoid xrange(), use subprocess.Popen(universal_newlines=True)
2015-09-28 00:24:36 -07:00
Brian Warner
a7213d9c9a
enforce bytes-vs-str in the API
...
The main wormhole code is str (unicode in py3, bytes in py2). Most
everything else must be passed as bytes in both py2/py3.
Keep the internal "side" string as a str, to make it easier to merge
with other URL pieces.
2015-09-28 00:24:36 -07:00
Brian Warner
15cc0a1429
test_server: make sure the server is reachable
...
used to exercise py3 issues with the server
2015-09-28 00:24:00 -07:00
Brian Warner
5d93dccb88
appid and derive_key(purpose=) must be bytes, not unicode
2015-09-28 00:24:00 -07:00
Brian Warner
2e2bd1bb5f
tests: split blocking out to its own file
...
also clean up the output when pip-e -vs- entrypoint -vs- Versioneer
makes the entrypoint script refuse to run from a version mismatch.
2015-09-27 10:43:25 -07:00
Brian Warner
adf55175fb
test_scripts: wormhole should live next to python
...
not necessarily beneath the current working directory
2015-09-26 18:29:46 -07:00
Brian Warner
d3ef3aa29a
more verbose, to figure out travis failure
2015-09-26 18:21:56 -07:00
Brian Warner
5ee37cab64
test_scripts: make found-wrong-wormhole error more verbose
2015-09-26 18:17:50 -07:00
Brian Warner
b069e69d35
test scripts too (with spawnToThread)
2015-09-26 18:02:02 -07:00
Brian Warner
1e6fc4601e
tests: split common code out
2015-09-26 18:02:02 -07:00
Brian Warner
88dab265de
test blocking code, using twisted+deferToThread
...
Unfortunately Twisted still requires python2, so we can't use this to
test the intended python3-compatibility of the blocking code.
2015-09-21 23:21:40 -07:00
Brian Warner
efd6d27cc6
rename SymmetricWormhole to just "Wormhole"
...
Update docs too. Now both blocking/ and twisted/ use "Wormhole".
2015-07-24 17:47:46 -07:00
Brian Warner
cebfa71563
minor reformatting, improve test error messages
2015-07-24 16:57:19 -07:00
Brian Warner
dc65b4354d
twisted: split allocate_ports() out to util.py
...
so it can be used by downstream projects
2015-06-21 21:04:33 -07:00
Brian Warner
25472423c6
make twisted work, get serialization into shape, add proper tests
2015-06-20 19:18:21 -07:00
Brian Warner
c14749fae0
add first unit test, 'setup.py test' support
2015-02-10 01:05:15 -08:00