Commit Graph

44 Commits

Author SHA1 Message Date
Brian Warner
80beb20631 make blocking.Wormhole into a context manager 2015-11-11 21:59:16 -08:00
Brian Warner
3daef13ac0 indent commands: no functional changes 2015-11-11 18:11:53 -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
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
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
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
ccea1a7d3c py3: don't emit noisy b"" prefix for --verify 2015-09-28 16:59:15 -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
8fe41e135d make blocking/send-text work on py3, add dependency on 'six'
* use modern/portable "next(iter)" instead of "iter.next()"
* use six.moves.input() instead of raw_input()
* tell requests' Response.iter_lines that we want str, not bytes
2015-09-28 00:24:36 -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
2b37c62150 server: add -n/--no-daemon, to run on py3
The twisted.python.logfile in Twisted-15.4.0 is not yet compatible with
py3, but can be bypassed by not daemonizing the server (so it doesn't
write to a logfile). This has been fixed in twisted trunk, so when
15.4.1 or 15.5.0 comes out, this will no longer be needed. But I think
we'll leave it in place, since sometimes it's handy to run a server
without daemonization.
2015-09-27 14:24:03 -07:00
Brian Warner
e9d87828c2 scripts/runner: make py3-compatible 2015-09-27 13:54:20 -07:00
Brian Warner
cbc40697f7 use "except x as y:" everywhere, for py3 2015-09-26 17:47:13 -07:00
Brian Warner
797074d03e runner.py: cosmetic changes 2015-09-23 18:13:35 -07:00
Brian Warner
056cf107fc replace blocking Initiator/Receiver with just symmetric Wormhole
first pass, seems to work
2015-07-17 17:23:07 -07:00
Brian Warner
c393e09e8a server: add --advertise-version option 2015-04-20 18:34:13 -07:00
Brian Warner
819a37476b add "-0" mode: no codes, no auth, fixed channel
Like roulette but with forward security.
2015-04-09 23:06:57 -05:00
Brian Warner
5f35fcee61 send --verify: tell user to include --verify on receiver too
In the long run, this needs to be included in the second PAKE message,
and the MitM consequences thought through.
2015-04-09 22:56:39 -05:00
Brian Warner
5e593509b4 allow pre-generated (human-offline-created) codes
Just make up a code like NUMBER-STUFF, and add --code= to the
send-text/send-file command. Also don't use tab-completion on the
codewords part of the receiving side, unless you stuck to the even/odd
PGP wordlist. (tab still works for the channel-id).
2015-04-09 22:50:07 -05:00
Brian Warner
e881d169a6 error out if server gives a "sorry we're closed" error 2015-04-09 12:29:26 -07:00
Brian Warner
dc9bc0c575 Use "wormhole server start" to launch a relay server. 2015-04-08 18:39:33 -07:00
Brian Warner
cf592d0766 CLI: avoid importing anything until command is actually run
In prep for moving the server launch command into the main CLI path,
without imposing dependency on pynacl/etc.
2015-04-01 16:01:32 -07:00
Brian Warner
883cacf903 wormhole receive-file: add --overwrite 2015-03-25 16:31:35 -07:00
Brian Warner
106991fe0d require caller to provide transit relay too 2015-03-25 13:07:17 -07:00
Brian Warner
fae14ebe6a Add --verify (display/check key-verifier). Not entirely usable yet.
To be useful, both sides must add -v. If the sender uses -v but the
receiver doesn't, the receiver won't show the verification string, so
the sender can't compare it to anything (and must either abort the
transfer or accept it blindly). Maybe the receiver should show the
verification string unconditionally. Maybe the sender should
indicate (in unprotected plaintext, along with the PAKE message) whether
the receiver should show it or not.
2015-03-24 00:28:02 -07:00
Brian Warner
ed1809d521 change API to support upcoming --verify flag 2015-03-24 00:03:10 -07:00
Brian Warner
af1e3c51ec add --code-length, to configure the size of the PAKE code (in bytes/words) 2015-03-23 23:53:28 -07:00
Brian Warner
8e456dea5e rewrite CLI tools to use argparse, remove Twisted dependency
We used to use twisted.python.usage.Options, hence we depended upon
Twisted. Now we depend upon "argparse" instead, which is in the py2.7
stdlib (and on pypi for 2.6). This package will still (eventually)
provide Twisted support, but applications which need it will already
express a dependency on twisted themselves, so by removing the
dependency here, we make life easier for applications that don't use it.
2015-03-22 16:52:35 -07:00
Brian Warner
9e7d807171 rename const.py to public_relay.py, to make it clear what it offers 2015-03-22 11:55:13 -07:00
Brian Warner
55577d9721 send-file: tolerate zero-byte files 2015-03-20 17:53:19 -07:00
Brian Warner
cc37d2dc2f add CLI args to override the relay hosts (rendezvous and transit) 2015-03-20 17:45:03 -07:00
Brian Warner
84aa7ff248 receive-file: add --output-file to override local output filename 2015-03-16 00:18:53 -07:00
Brian Warner
5fd85fd884 cmd_receive_text: remove unused 'time' import 2015-03-16 00:17:11 -07:00
Brian Warner
cef9abcdd7 receive-text/file: accept CODE in argv 2015-03-15 23:26:06 -07:00
Brian Warner
3456d36039 cosmetic changes to frontend commands 2015-03-12 23:32:58 -07:00
Brian Warner
fcd2678dfd transit: provide encrypted record-pipe, use it for file-xfer 2015-03-12 18:14:42 -07:00
Brian Warner
d71c8492c1 transit: describe the connection 2015-03-12 14:50:40 -07:00
Brian Warner
20fd7c40ae add progress updates to send/receive file 2015-03-02 12:45:55 -08:00
Brian Warner
7a99c04d64 add "wormhole" entrypoint script. requires twisted.
I'm using Twisted for the subcommand argument parsing. It might be nice
to use something smaller.
2015-03-02 00:32:21 -08:00