Brian Warner
4bd9d3579c
go back to "input_code" instead of "type_code"
2017-04-06 12:22:44 -07:00
Brian Warner
5f9894ca63
API updates, make most tests pass, disable others
...
* finally wire up "application versions"
* remove when_verifier (which used to fire after key establishment, but
before the VERSION message was received or verified)
* fire when_verified and when_version at the same time (after VERSION is
verified), but with different args
2017-04-06 12:22:44 -07:00
Brian Warner
aebee61816
fix close behavior: Deferreds should errback once closed
2017-04-06 12:22:44 -07:00
Brian Warner
ddb83e9d59
wormhole: handle w.close() after error-induced closure
2017-04-06 12:21:00 -07:00
Brian Warner
9ca657a7c6
reenable TorManager
2017-04-06 12:21:00 -07:00
Brian Warner
105d9cc59f
work on WelcomeHandler, still incomplete
2017-04-06 12:21:00 -07:00
Brian Warner
e9f3107127
deliver app-versions up to Wormhole
2017-04-06 12:21:00 -07:00
Brian Warner
60a61c995b
implement w.derive_key()
2017-04-06 12:21:00 -07:00
Brian Warner
c499fce9f5
change API (wormhole.create), start on serialization
2017-04-06 12:21:00 -07:00
Brian Warner
b7b8df17be
rename NameplateLister to Lister (unique prefix L)
2017-04-06 12:21:00 -07:00
Brian Warner
610db612ba
improve error handling
...
errors raised while processing a received message will cause the Wormhole to
close-with-error, and any pending Deferreds will be errbacked
2017-04-06 12:21:00 -07:00
Brian Warner
4793208d4e
rewrite debug tracing, add to all machines
2017-04-06 12:21:00 -07:00
Brian Warner
41b7bcfed5
working on fixes
2017-04-06 12:21:00 -07:00
Brian Warner
b7df5e21eb
more tests, still failing
2017-04-06 12:21:00 -07:00
Brian Warner
ef1904bc52
get null test working (open and immediate close)
2017-04-06 12:21:00 -07:00
Brian Warner
5d6989614b
work on top-level stuff
2017-04-06 12:21:00 -07:00
Brian Warner
7e7b43e910
start on top-level driver, wormhole.py
2017-04-06 12:21:00 -07:00
Brian Warner
825370fdd2
cleanups, remove misc.py
2017-04-06 12:21:00 -07:00
Brian Warner
d4bedeafbf
general fixes
2017-04-06 12:21:00 -07:00
Brian Warner
a2ed35ceb8
remove old files, lots of type work
2017-04-06 12:21:00 -07:00
Brian Warner
16c477424c
more demo work
2017-04-06 12:21:00 -07:00
Brian Warner
3c9c0e58ab
move to _connection.py, add more state machines
...
Starting on defining manager state machines for nameplates, mailboxes, the
PAKE key-establishment process, and the bit that knows it can drop the
connection when both nameplates and mailboxes have been released.
2017-04-06 12:21:00 -07:00
Brian Warner
14c8e76364
onConnect, start manual tests, doesn't work yet
2017-04-06 12:21:00 -07:00
Brian Warner
b826e8c73c
hack args till they work, add ALLOW_CLOSE
...
the diagram is a lot simpler if the only way to shut things down is to
terminate the whole process
2017-04-06 12:21:00 -07:00
Brian Warner
d136028fa8
try adding args
2017-04-06 12:21:00 -07:00
Brian Warner
73f3d86107
state machine should be complete, I think
2017-04-06 12:21:00 -07:00
Brian Warner
b3763f9e78
show "you can use tabs" reminder if code was input without completion
...
refs #15
2017-01-12 16:14:42 -08:00
Brian Warner
62b069dea6
Wormhole: control stderr
2017-01-12 16:14:42 -08:00
Brian Warner
e500f4a100
rx: tolerate duplicate peer messages
...
closes #121
2016-12-26 15:27:14 -05:00
Brian Warner
face9423dd
internals: ensure _API_establish_key is not called twice
2016-12-16 01:33:17 -08:00
laharah
01318d1130
added notification to cmd_receive plus reactor cleanup
...
Added a try finally block around verify to ensure notification
deferreds are being cleaned out of the reactor
2016-12-16 01:03:01 -08:00
laharah
a2ab1863cf
added the new key waiter to be cleaned up on error in wormhole
...
Also, set new print statment to print to args.stdout
2016-12-16 01:03:01 -08:00
laharah
680b01b3fc
added api hooks to get notification about key excange
...
added more coverage to establish key API hook
2016-12-16 01:03:01 -08:00
Brian Warner
cdb5c19010
websockets: turn on autoPingInterval to expire stale connections
...
With this, both clients and servers will send a PING at least once every
minute, and will drop connections that haven't seen any traffic for 10
minutes.
This should help keep NAT table entries alive, and will drop connections
that are no longer viable because their NAT entries have expired.
closes #60
2016-07-03 21:51:56 -07:00
meejah
7fab6b3dff
Change UsageError -> InternalError, use click.UsageError for human-visible errors
2016-06-22 02:14:34 -06:00
meejah
e16b53817e
Refactor to use Click
2016-06-22 01:11:07 -06:00
laharah
2c25b4d97d
u""
cleanup on wormhole.py
2016-06-04 14:09:19 -07:00
laharah
6a73d50fdd
added unicode_literals import to all apropriate modules
...
bug in twisted serverFromString prevents test.common and transit
from using unicode properly should revisit if twisted gets patched
2016-06-04 12:42:59 -07:00
Brian Warner
996c739b2a
oops, fix tests
...
In some tests, we artificially call _event_connected() without first
initiating a connection.
2016-06-03 23:30:31 -07:00
Brian Warner
a1ce0d8df0
record websocket establishment in timing data
2016-06-03 22:55:52 -07:00
Chris Wolfe
bc7dea8bab
add simpler exception message, assert that it is being used
2016-06-02 15:21:31 -07:00
Chris Wolfe
5be436b81d
raise a specific error when spaces are detected, pass along the docstring to the user
2016-06-02 15:21:31 -07:00
Brian Warner
00277c22cf
allow MOTD to be displayed multiple times
...
(one displayed message per received welcome["motd"])
There's not much value in prohibiting the server from sending multiple
MOTD messages, and it would prevent us from using it to display a "your
client is using an old API, please upgrade" message after having already
sent a regular "please donate" MOTD message. (We could send a second
welcome message with ["error"] to kill the client, but ["motd"] is the
most convenient way to deliver a non-fatal warning).
2016-05-28 19:19:22 -07:00
Brian Warner
52e5cbd690
INCOMPATIBILITY: send "current_cli_version", not "current_version"
...
The reasoning is that this string is only ever likely to refer to the
version of the primary/initial client (the CLI application, written in
Python, that you get with "pip install magic-wormhole"). When there are
other implementations, with unrelated versions, they should obviously
not pay attention to a warning about the other implementation being out
of date.
2016-05-28 19:11:27 -07:00
Brian Warner
0b53094927
INCOMPATIBILITY: send pake message as dict, not raw bytes
...
This gives us room in the future to put other keys there, like one which
says we want to use Noise for the phase-message encryption instead of
our current HKDF scheme.
2016-05-28 18:30:36 -07:00
Brian Warner
6a108f93e6
switch most everything to use new utility functions
2016-05-28 18:19:45 -07:00
Brian Warner
3850c164f7
move utility functions to util.py, add new ones
2016-05-28 18:13:32 -07:00
Brian Warner
00efdfa4e2
comment out unfinished function
...
at this point, it's just an idea
2016-05-27 18:47:14 -07:00
Brian Warner
db31ffe075
minor shuffles
2016-05-26 15:49:45 -07:00
Brian Warner
7acb68d2ee
allow WelcomeError to interrupt input_code()
2016-05-26 15:38:19 -07:00