Commit Graph

1532 Commits

Author SHA1 Message Date
Brian Warner
fa3be3523d pass timeouts down 2015-11-11 17:56:08 -08:00
Brian Warner
07686f3de7 make self.channel internal 2015-11-11 17:52:13 -08:00
Brian Warner
9ead3f48a8 fix 'wormhole server restart'
It got broken when I added --no-daemon to 'server start'.
2015-11-11 17:30:31 -08:00
Brian Warner
ec51adb713 add 'wormhole send --text -' to read message from stdin 2015-11-11 17:27:26 -08:00
Brian Warner
b83062701d server: give old 0.4.0 senders a "you must upgrade" error
Without this, old senders will throw a messy 404 traceback when talking
to a modern server.

Unfortunately 0.4.0 receivers don't make API calls in the right order,
so they throw a 404 before seeing our "you need to upgrade" message.
2015-11-11 17:06:33 -08:00
Brian Warner
ca5f79233c update NEWS (belatedly) for 0.5.0 2015-11-11 17:06:32 -08:00
Vikas Parashar
79471dff7c Updated README.md with Installation instruction
Instruction for installation were missing so updated with `pip install` method.
2015-10-12 17:44:36 -07:00
Brian Warner
595a0e5845 server API: include "mood" when closing the channel
This will be used as a simple unverifiable counter of success/failure.
2015-10-08 18:35:26 -07:00
Brian Warner
7a3b18b7f7 setup.cfg: make a py2/py3 "universal" wheel 2015-10-07 17:13:39 -07:00
Brian Warner
03566b3ed4 update docs for 0.5.0 release 2015-10-07 17:10:48 -07:00
Brian Warner
0a6ab83bc5 test distinctness of encryption nonces 2015-10-07 16:31:45 -07:00
Brian Warner
385762b36d demo.py: make it easier to modify for local testing 2015-10-07 16:31:45 -07:00
Brian Warner
df3aee2a86 fix EventSource (server and parsers)
I was really confused about the Server-Sent Events syntax. This new one
is compatible with actual web browsers and the spec:

 http://www.w3.org/TR/eventsource/
2015-10-07 16:31:45 -07:00
Brian Warner
e77b39313a use TypeError for type errors, not UsageError 2015-10-06 20:52:47 -07:00
Brian Warner
ce236ae70c test_blocking: stop aliasing Wormhole 2015-10-06 20:44:32 -07:00
Brian Warner
bf43dae2ad add multiple phases, change key-derivation strings
Because of the key-derivation change, clients will not be compatible
across this commit.
2015-10-06 20:39:20 -07:00
Brian Warner
d0a7da3a63 twisted/demo.py: fix receive, code must be unicode 2015-10-06 20:33:17 -07:00
Brian Warner
6e8a1d8adb codes.py: fix input-with-completion on py3
The input() function returns str(bytes) on py2, and str(unicode) on py3.
We want unicode in both cases.
2015-10-06 20:04:56 -07:00
Brian Warner
35768d6738 wormhole/invitation code is now unicode 2015-10-06 19:42:10 -07:00
Brian Warner
7f6410812c transit URL, transit hints are now unicode 2015-10-06 19:29:59 -07:00
Brian Warner
574d5f2314 scope channelids to the appid, change API and DB schema
This requires a DB delete/recreate when upgrading. It changes the server
protocol, and app IDs, so clients cannot interoperate with each other
across this change, nor with the server. Flag day for everyone!

Now apps do not share channel IDs, so a lot of usage of app1 will not
cause the wormhole codes for app2 to get longer.
2015-10-06 19:21:53 -07:00
Brian Warner
8692bd2cd7 eventsource.py: use py3-style print 2015-10-06 19:21:53 -07:00
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
13dd359f90 internal rename: appid -> _appid 2015-10-06 19:12:41 -07:00
Brian Warner
e6d1b1fb83 internal rename: relay -> relay_url 2015-10-06 19:12:41 -07:00
Brian Warner
e0cc32af9d add ChannelMonitor to track unclosed channels with weakrefs, not __del__ 2015-10-06 19:12:41 -07:00
Brian Warner
fc30fa6cd4 rename channel-id to channelid. changes DB schema. 2015-10-06 19:12:41 -07:00
Brian Warner
fc641622ba demo.py: update to match merged file/text commands 2015-10-06 19:12:09 -07:00
Brian Warner
2da94d5069 move channel-pruning responsibility down into Relay 2015-10-04 15:49:06 -07:00
Brian Warner
b2336591a7 relay.py: rename to relay_server.py 2015-10-04 12:46:09 -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
56f8327c71 improve "wormhole send" args for text-vs-file
There are now three ways to invoke send:

* "wormhole send": ask for a text message
* "wormhole send FILENAME": send a file
* "wormhole send --text TEXT": send text message
2015-10-03 23:25:11 -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
7a28400586 split transcribe.py into two layers: comms and crypto 2015-10-03 17:51:35 -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
bc3b0f03b9 blocking/transit.py: hush a transient failure
Not entirely sure what's going on here, but this is probably safe.
2015-10-03 16:53:08 -07:00
Brian Warner
ccea1a7d3c py3: don't emit noisy b"" prefix for --verify 2015-09-28 16:59:15 -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
ea51617233 travis: we're now py3.3-compatible too 2015-09-28 16:32:49 -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
4cd838f410 README: add travis badge (for 'master') 2015-09-28 16:23:19 -07:00
Brian Warner
b088747ae3 rename to ServerEndpointService, for consistency with Twisted 2015-09-28 16:23:00 -07:00
Brian Warner
540fceb795 add py3.4 compatibility
The "bytes % bytes" syntax only appeared on py3.5, so don't use it.

Updated travis to expect py3.4 works.

The twisted side is probably even more broken for py3.4 than it is for
py3.5.
2015-09-28 16:15:55 -07:00
Brian Warner
c261f3e713 py3.5 is now supported, more or less
py3.3/3.4 are broken for various reasons
2015-09-28 01:01:25 -07:00
Brian Warner
0838f9bc43 Merge branch 'py3'
This adds python3 compatibility for blocking.transcribe and
blocking.transit, enough to allow the four
"wormhole (send|receive)-(text|file)" commands to work. These are all
tested by travis (via "trial wormhole").

"wormhole server" runs under py3, but only with --no-daemon (until
twisted.python.logfile is ported).

twisted.transcribe doesn't work yet (it needs twisted.web.client.Agent,
plus more local porting work).
2015-09-28 00:53:35 -07:00