Commit Graph

1510 Commits

Author SHA1 Message Date
Brian Warner
8ea67f6015 README: move repo, switch to GitHub Actions for CI 2021-01-10 15:08:13 -08:00
Brian Warner
f175feba91 README: update python-version compatibility note
We still run CI against py2.7 and py3.5, but Cryptography has deprecated
both, so it might stop working if/when they make a non-compatible change.
2021-01-10 15:05:38 -08:00
Brian Warner
bc6537e758 test_cli: ignore deprecation noise for py2.7/py3.5 so tests won't fail 2021-01-10 15:02:05 -08:00
Brian Warner
b97bd40f0a add GitHub Actions -based CI 2021-01-10 14:08:23 -08:00
Clayton Passmore
a6960d42e5
Fix link to rendezvous server repo in API doc
Fixes an issue where the link to the rendezvous server repository was being rendered as plain text in the docs.
2020-09-18 11:10:48 -04:00
Brian Warner
95a628e1a7 docs: add pointers to server code and setup instructions
Thanks to @kaie for the suggestion.

Closes #387
2020-05-21 21:11:40 -07:00
sneakypete81
aa555a82ed
Replace deprecated attrs cmp=False parameter with eq=False (#384)
See https://attrs.readthedocs.io/en/stable/api.html#core
2020-04-12 14:50:03 -07:00
sneakypete81
d4a2c70d52
Remove unused format parameters (#385)
Fixes pyflakes unused argument warning
2020-04-12 11:47:28 -07:00
Brian Warner
52ee3ce105 setup.py: include wormhole._dilation, wormhole.test.dilate 2020-04-04 16:38:01 -07:00
Brian Warner
77a18d069a NEWS: update for 0.12.0 release 2020-04-04 14:55:16 -07:00
Brian Warner
e6ac67e0c0 Merge branch 'py38' 2020-04-04 14:28:44 -07:00
Brian Warner
2420150794 README/setup.py: update to reflect py3.8 compatibility 2020-04-04 14:25:47 -07:00
Brian Warner
379b931a09 tox/travis: test py3.8 too 2020-04-04 13:49:52 -07:00
Brian Warner
49354df56e cmd_send: use SpooledTemporaryFile properly, move to disk after 10MB
When we send a directory, we build a temporary zipfile to linearize the
contents for transmission. We store this zipfile inside a
SpooledTemporaryFile, which will hold everything in RAM (for speed) until it
reaches some size threshold, then moves everything over to disk (to avoid
crashing your program as it runs out of memory).

Unfortunately SpooledTemporaryFile doesn't have a default threshold size: if
you don't specify one, it will never switch to the disk-based mode, and
`wormhole send large_directory/` will just use up all your RAM until it
crashes.

I've been using this wrong for five years, since the very beginning of
wormhole's ability to send directories. How embarrassing!

This applies the simple fix: provide a `max_size=` argument, setting the
threshold to 10 MB.

Thanks to @blitz for the report (and my apologies to everyone else who
reported this earlier, to whom I said it was fixed by using
SpooledTemporaryFile, when clearly it was not).

closes #379
2020-04-04 12:06:00 -07:00
Edward Betts
6477f239e8 Correct spelling mistakes 2020-02-20 11:13:36 +00:00
Brian Warner
f566fae439 Merge PR378: allow custom reactor selection better 2020-02-06 22:49:54 -08:00
Brian Warner
aead249576 Transit: properly virtualize reactor in _build_listener 2020-02-06 22:49:12 -08:00
Brian Warner
0c43499850 test_transit: fix test to tolerate proper virtualized reactor 2020-02-06 22:48:25 -08:00
sneakypete81
4a2f3baf28 Avoid importing twisted.internet.reactor in global scope
This import has side effects, which can cause problems when using a non-
default reactor (qt5reactor, for example).
2020-02-06 21:45:37 +00:00
Brian Warner
c198117980 Merge branch '144-client-tls'
refs #144 : adds the client-side support
2020-01-16 19:26:16 -08:00
Brian Warner
5a60b247f5 accept 'wss' in relay_url, use TLS for those connections
Do the same under Tor.

If the hostname is missing, use 443 when using TLS, or 80 when not.

refs #144
2020-01-16 18:58:39 -08:00
Brian Warner
fe7b036027 docs/tor.md: remove stale comment about py3 not working
closes #367
2020-01-15 11:19:48 -08:00
sneakypete81
005e736f5d Fix docs typo 2020-01-14 17:08:25 -08:00
Brian Warner
8dff710ff7 Merge branch 'pr368': Transit docs
closes #368
2020-01-14 17:06:02 -08:00
Brian Warner
eaafe133a1 more fixups 2020-01-14 17:05:41 -08:00
Brian Warner
c5386bc7ac docs/transit.md: remove Blocking section, expand on relay hints
These docs were first written back when we had both a blocking and a
non-blocking API. I removed all the blocking code a long time ago, leaving on
the Twisted-based non-blocking API, but I forgot to update the docs to match,
which is why some of the text didn't make much sense.
2020-01-14 09:58:08 -08:00
Shea Polansky
9b305169ed Add more information to the Transit docs
Explicitly state that the get_connection_hints method returns a Deferred
Fix documentation example code
2020-01-13 17:45:14 -08:00
Shea Polansky
5674c7dfa4 Correct docs to reflect API changes
Update usage of Transit connection hints
2020-01-13 17:45:14 -08:00
Brian Warner
dc26157906 Merge branch '366-fixtest' 2019-12-20 17:25:51 -08:00
Brian Warner
a1420a0a34 manager.py: fix typo in comments 2019-12-20 17:06:30 -08:00
Brian Warner
6be50a4f0a dilate/test_manager: tolerate Mock endpoints
This test was incorrectly exercising a member of the endpoint record returned
by `Manager.get_endpoints()`. In the test environment, the `.listen` Endpoint
is actually a Mock, so calling e.g. `listen()` on `endpoints.listen` returns
another Mock instead of a Deferred. Twisted's `assertNoResult` used to
tolerate this silently, but as of Twisted-19.10 it throws an error, causing
the test to fail.

The fix is to assert that the record has attributes with the right names, but
not assume they behave like normal Endpoints, and not call `.listen()` on
them.

closes #366
2019-12-20 17:03:00 -08:00
Brian Warner
dd520677fe Merge branch 'pr365'
closes #365
2019-11-08 10:42:16 -08:00
Jürgen Gmach
9a976c10a1 Remove deprecated keyword "sudo" from travis config.
modified:   .travis.yml
2019-11-08 10:42:10 -08:00
Brian Warner
6c8caa5f89 Merge branch 'pr361'
closes #361
2019-11-08 10:41:54 -08:00
Adam Spiers
aa16441c8a Add installation instructions for openSUSE
magic-wormhole has been included in openSUSE since Leap 15.1, and is
also available in Tumbleweed:

https://software.opensuse.org/package/python-magic-wormhole

So document this explicitly.
2019-11-08 10:41:47 -08:00
Brian Warner
048a9e392a README: add repology.org packaged-versions table 2019-11-08 10:34:33 -08:00
Brian Warner
7e30b70e2f docs: update install instructions 2019-08-28 10:33:26 -07:00
Brian Warner
d7e244740c tests: cover --verify too, at least for --text 2019-08-17 17:06:22 -07:00
Brian Warner
fd867a9cd6 send: stall the --verify input() long enough to send the Verifier
Specifically, this lets the `wormhole tx` side send the VERSIONS message
before input() happens, allowing the `wormhole rx` side to compute and
display the Verifier. This only matters when the receiver sends both PAKE and
VERSIONS in the same turn, which only happens when tab-completion allowed
them to learn the Nameplate early and thus receive the sender's PAKE early.
In the other cases, the receiver sends PAKE and VERSIONS on separate turns,
so the sender doesn't get into this situation.

The bug this fixes is when both sides use --verify, and the receiver uses
tab-completion, then the sender shows the Verifier and waits for
confirmation, but the receiver doesn't show the Verifier until *after* the
sender confirms. So the two users don't have enough information to compare.

Many thanks to Jacek Politowski (@jpolnetpl) for the catch and initial
investigation.

closes #349
2019-08-17 15:24:13 -07:00
Brian Warner
ab5fe65c3b Merge commit 'dilate-half-close'
Add half-close to dilation API. Fix several bugs exposed by application-level
testing.

refs #344 but doesn't close it yet: I want to call `p.connectionLost()` after
both directions have been closed down
2019-08-11 22:22:45 -07:00
Brian Warner
854f0d6e01 ignore ConnectionRefusedError too 2019-08-11 22:20:49 -07:00
Brian Warner
2e2120f327 manager: handle mismatched code during WAITING too 2019-08-11 22:20:49 -07:00
Brian Warner
a489f5da2b suppress misleading DNSLookupError on cancelled connections
This should be removed after Twisted's ticket
https://twistedmatrix.com/trac/ticket/9696 is fixed (and we increase our
dependency to require a version with the fix).

refs #347
2019-08-11 22:20:49 -07:00
Brian Warner
49c36b0277 dilation side needs to be 16-chars to match transit relay 2019-08-11 22:20:49 -07:00
Brian Warner
840dfa603b w.dilate(): accept transit_relay_location=, pass through to manager 2019-08-11 22:20:49 -07:00
Brian Warner
1219fd08ca subchannel: enforce separation between half-close and full-close API 2019-08-11 22:20:49 -07:00
Brian Warner
1c8c2997c7 subchannel: tolerate multiple pre-open inbound DATA messages 2019-08-11 22:20:49 -07:00
Brian Warner
327e72e6ac update subchannel state machine for half-close
also handle open-but-not-yet-connected subchannels better
2019-08-11 15:24:39 -07:00
Brian Warner
b233763082 subchannel: deliver queued connectionMade before any data
The previous implementation would call the control/receiving Protocol
completely backwards: dataReceived first, then connectionLost, then finally
connectionMade. Which didn't work at all, of course.
2019-08-11 14:20:33 -07:00
Brian Warner
4d57465444 oops, fix test_describe on py2 2019-08-11 14:19:25 -07:00