Brian Warner
3b215c106a
use "hkdf" from PyPI instead of wormhole.hkdf
2016-04-18 16:49:29 -07:00
Brian Warner
17613ce8c1
move hkdf out of util/, remove now-empty directory
2016-04-18 16:45:03 -07:00
Brian Warner
db137c26e5
remove blocking.transit
2016-04-18 15:52:29 -07:00
Brian Warner
c5415495c0
dump-timing: store server-sent time too
...
Adjust dump-timing to ignore the extra data, for now. Also do some
general instrumentation cleanup.
2016-03-03 18:03:27 -08:00
Brian Warner
9d7b9dd8d2
add --no-listen, for debugging
2016-03-03 14:52:14 -08:00
Brian Warner
be2c66a5f5
transit: ignore errors on sockets we were about to close anyways
2016-03-02 14:28:04 -08:00
Brian Warner
8d82726c51
add DebugTiming object, --dump-timing= option
...
This writes timeline data to a .json file, which can be examined later
to find likely candidates for optimization.
2016-03-01 18:23:06 -08:00
Brian Warner
6654efb429
move describe() from Transit to RecordPipe
2016-02-28 01:42:46 -08:00
Brian Warner
ed1eb06ae8
blocking/transit: use descriptive error message
2016-02-27 14:48:12 -08:00
Brian Warner
dba42aff01
blocking transit: tolerate inbound connections before connect() starts
2016-02-17 19:02:35 -08:00
Brian Warner
e2f3bebe38
allow --relay-helper="" to disable relay
...
test_scripts now uses this to avoid accidentally using a relay
2016-02-17 13:53:18 -08:00
Brian Warner
7212e9e9f4
transit: split common code out to a new file
...
This will be shared between blocking.transit and the soon-to-land
twisted.transit .
2016-02-14 17:51:46 -08:00
Brian Warner
35c9e29eb3
transit handshake: wait for newline, not just expected string
2016-01-12 15:04:52 -08:00
Brian Warner
229c702ccc
transit: fix py3
2015-12-03 16:23:12 -06:00
Brian Warner
95d0e68cf2
transit: avoid near-infinite loop upon connector error
...
Now we will never try any hint more than once. Previously we'd hit the
relay hint over and over until the timeout fired.
2015-12-03 16:22:03 -06:00
Brian Warner
1d6c3d1f96
clients: use "watch" endpoint, not "get"
2015-11-23 16:50:54 -08:00
Brian Warner
82cdadae80
check welcome message 'send' too
2015-11-23 16:33:09 -08:00
Brian Warner
5e0a7e4c93
remove stale copy of server URLs
2015-11-22 17:44:25 -08:00
Brian Warner
00bb816d11
remove close-on-error from derive_key(), for now
...
In the twisted-style code, the close_on_error() decorator forces the
return value to be a Deferred, which is all wrong for internal uses of
derive_key() (verification string and confirmation message). It might be
useful to have a synchronous form of close_on_error(), but since the
actual close() is async, that's not very straightforward.
So for now, tolerate unclosed Wormhole objects when someone calls
derive_key() too early, or with a non-unicode type string.
2015-11-19 17:11:27 -08:00
Brian Warner
fd9a62e8ff
change confirmation message: must be different on each side
...
The previous same-message-for-both-sides approach failed, because the
Channel filters out duplicates.
2015-11-19 16:06:30 -08:00
Brian Warner
1ad001bbc3
WIP: test that we tolerate missing key-confirmation messages
2015-11-16 18:25:28 -08:00
Brian Warner
6b57d7d05d
check key-confirmation messages, if present
2015-11-16 18:24:39 -08:00
Brian Warner
3220014605
send key-confirmation message upon receipt of PAKE
...
This will allow the first peer to detect a wrong password even though
the second peer bails before sending something encrypted.
2015-11-16 17:02:02 -08:00
Brian Warner
ae2a6c6a05
add Channel.get_first_of()
...
This allows the Wormhole code to wait for multiple messages, which will
be useful for getting Confirmation messages soon.
2015-11-16 16:47:52 -08:00
Brian Warner
b709a45891
get_data/set_data: reserve _ for internal uses
2015-11-16 16:20:00 -08:00
Brian Warner
6956f35e9a
receive: fetch channel list before completion, to get welcome message
2015-11-15 10:53:13 -08:00
Brian Warner
101c800237
deallocate: ignore all 'requests' exceptions
2015-11-12 10:11:30 -08:00
Brian Warner
2e393c145e
make default mood "happy", change other mood names
2015-11-12 09:31:03 -08:00
Brian Warner
80beb20631
make blocking.Wormhole into a context manager
2015-11-11 21:59:16 -08:00
Brian Warner
a881d6055f
auto-close Channel (with a "mood") upon server or crypto error
2015-11-11 21:54:45 -08:00
Brian Warner
0748647049
allow multiple close() calls, throw error when using a closed Wormhole
2015-11-11 18:17:52 -08:00
Brian Warner
cb5ad8ced1
Use exception for Timeout, not return value
2015-11-11 18:01:22 -08:00
Brian Warner
6de677c1df
use timeouts for allocate and list_channels too
2015-11-11 18:00:06 -08:00
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
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
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
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
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
f24e05d4cb
new Wormhole API: separate send_data()/get_data() calls
2015-10-03 22:03:27 -07:00