Commit Graph

619 Commits

Author SHA1 Message Date
higs4281
6db8cf5dd0 add the tox directory to 2016-06-02 13:39:15 -04:00
Brian Warner
228302c501 add link to PyCon slides 2016-05-31 17:44:26 -07:00
Brian Warner
0ecf37a923 README: notes for Fedora and OS-X
Thanks to @gtank for the suggestions.
2016-05-30 23:57:08 -07:00
Brian Warner
512b25f31e MANIFEST.in: add munin plugins 2016-05-28 22:01:23 -07:00
Brian Warner
50faf1173e update NEWS for 0.8.0 release 2016-05-28 21:55:27 -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
ea6619bc46 change hostname of public relay
This is an alias for the same host, so it's not really an incompatible
change. The new hostname is my personal domain, and seems a bit more
suitable for this service.
2016-05-28 19:13:44 -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
0d30101d7c SCHEMA CHANGE: add 'request_id' to nameplates table
This will be useful for the upcoming "persistent wormhole" mode. A
client might send an allocation request, crash/terminate before
receiving a response, then restart, then re-send the request. If the
server sees a request with the same request_id a previous request, it
can return the same nameplate.

We'll need code changes on both sides to support this (nothing sends or
checks request_id yet), but this lands the schema change early to reduce
future disruption.
2016-05-28 11:46:14 -07:00
Brian Warner
cca2f3cf13 internal rename msg_id, for consistency 2016-05-28 11:19:53 -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
5fe7d320ab oops, pass blur_usage to apps properly, add tests 2016-05-27 18:44:41 -07:00
Brian Warner
eebc9ebd54 rewrite pruning, add full tests
Apparently it was broken: the first time the LoopingCall fired, it would
throw an exception, and never try again. Now it should be fixed.
2016-05-27 18:42:17 -07:00
Brian Warner
0b3863fb52 remove dead code 2016-05-27 18:41:34 -07:00
Brian Warner
5dddeddffd fix "wormhole-server restart" default ports to match plain "start"
now that was confusing.
2016-05-27 18:40:37 -07:00
Brian Warner
bfa429cc5a munin/wormhhole_transit: fix key name 2016-05-26 18:04:52 -07:00
Brian Warner
4b840a37fe munin: show events-per-hour, not events-per-second 2016-05-26 17:59:42 -07:00
Brian Warner
6aa1747b46 munin: fix dbfile finding 2016-05-26 17:54:43 -07:00
Brian Warner
6578d39c9b quick draft of munin plugins 2016-05-26 17:46:16 -07:00
Brian Warner
1c963170c3 wormhole-server: add count-channels, count-events 2016-05-26 17:45:41 -07:00
Brian Warner
56fec496e2 send transit abilities to far end too, for the future
This will allow a future peer to figure out what transit modes we can
and cannot do, and thus avoid spinning up expensive modes that we won't
be able to use (e.g. WebRTC).
2016-05-26 16:26:00 -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
Brian Warner
905ec05696 fix welcome-error signalling
The handler was calling _signal_error() incorrectly.
2016-05-26 15:37:24 -07:00
Brian Warner
80c88387ef improve formatting of error messages 2016-05-26 15:36:44 -07:00
Brian Warner
2cf11e85d3 un-pin Twisted, require autobahn >=0.14.1
The new autobahn release removes the Twisted pin, so we no longer need
one. Depend on the new autobahn to flush out any environments that are
still using the old one (and thus can't use the current Twisted).

Thanks https://github.com/crossbario/autobahn-python/issues/680 !
2016-05-26 13:01:43 -07:00
Brian Warner
19702e01ac make send pay attention to receiver errors correctly
Errors like "Refusing to overwrite existing file" would leave the sender
hanging, because it was looking for the "error" key in the wrong place.
2016-05-25 22:44:18 -07:00
Brian Warner
de627ccbef fix --dump-timing= on py3, wants a text-mode file 2016-05-25 22:06:26 -07:00
Brian Warner
06d2a0be68 update docs 2016-05-25 20:58:53 -07:00
Brian Warner
708bcf36d4 INCOMPATIBILITY: send+expect hash of data after xfer
This enhances the ACK that wormhole-receive returns when it finishes
receiving all the data to be a dictionary. The dict includes the SHA256
hash of everything it received, and the sender checks this for a match
before declaring the transfer to be a success. This guards against data
being shuffled somehow during transit.
2016-05-25 19:36:56 -07:00
Brian Warner
d8f6126916 transit.writeToFile: add hasher= argument 2016-05-25 19:35:50 -07:00
Brian Warner
01ec5fb2a6 rename test_transit_twisted.py, drop the twisted 2016-05-25 19:21:54 -07:00
Brian Warner
75877effef finish renaming "confirm" to "version" 2016-05-25 19:13:56 -07:00
Brian Warner
dcdddc9d60 INCOMPATIBILITY: rename "confirm" phase to "version"
This better reflects the purpose of the message. Key confirmation is a
side-effect.

This patch only changes the "phase:" name and the key-derivation string.
A subsequent patch will modify the function and variable names to match.
2016-05-25 19:13:56 -07:00
Brian Warner
424474cd7e remove unused _derive_confirmation_key() 2016-05-25 19:13:56 -07:00
Brian Warner
7f43561a50 INCOMPATIBILITY: change "confirm" message to include version dict
This gives the two Wormholes a way to signal capabilities to each other,
before the applications start sending their own messages.
2016-05-25 18:27:37 -07:00
Brian Warner
e1c488247f remove redundant test 2016-05-25 18:27:24 -07:00
Brian Warner
edebf4d787 update events.dot with check-verifier logic 2016-05-25 18:06:08 -07:00
Brian Warner
5553729a87 w.verify() now stalls until confirmation message is checked
If it succeeds, you get back the verifier string, which can be compared
against the other side. If it fails, the wormhole code didn't match.
2016-05-25 18:05:02 -07:00
Brian Warner
8b56892a76 drop peer messages if we're closing
This should remove a few Unhandled Errors when the code was wrong.
2016-05-25 16:29:56 -07:00
Brian Warner
a251e58967 oops, fix tests to use /v1 too 2016-05-25 00:34:13 -07:00
Brian Warner
1fabf18f0e INCOMPATIBILITY: move relay url to /v1
This should make it cleaner to add a /v2 in the future.
2016-05-25 00:29:23 -07:00
Brian Warner
f2050c5fd4 internal renaming: hint objects vs hint structs 2016-05-25 00:23:12 -07:00
Brian Warner
7aa55e6b65 INCOMPATIBILITY: deliver hints as JSON, not strings
The file-send protocol now sends a "hints-v1" key in the "transit"
message, which contains a list of JSON data structures that describe the
connection hints (a mixture of direct, tor, and relay hints, for now).
Previously the direct/tor and relay hints were sent in different keys,
and all were sent as strings like "tcp:hostname:1234" which had to be
parsed by the recipient.

The new structures include a version string, to make it easier to add
new types in the future. Transit logs+ignores hints it cannot
understand.
2016-05-25 00:11:17 -07:00
Brian Warner
afdbbe84c3 cmd_send: allow multiple things in a single message 2016-05-24 19:30:55 -07:00
Brian Warner
8e7c6f16cb cmd_receive: tolerate unrecognized messages
at the expense of not failing quickly when the sender doesn't send an
offer
2016-05-24 19:30:21 -07:00
Brian Warner
1b5f3e125e cmd_receive: add underscore prefix to all internal methods 2016-05-24 19:14:56 -07:00