Commit Graph

1414 Commits

Author SHA1 Message Date
Brian Warner
dce01174eb improve debug_set_trace: add Allocate and Input events
Also log events at the beginning and end of Input.choose_nameplate and
Input.choose_words, since those are the two big locally-driven (UI) triggers
that cause multiple messages to be fired and lots of work to happen.
2018-02-14 00:56:14 -08:00
Brian Warner
2fadadc4db NEWS: update for 0.10.4 release 2018-01-28 16:04:50 -08:00
Brian Warner
c6fbaf5a4d _version.py: hush lgtm.com alert
This needs to be upstreamed into Versioneer, as it will disappear the next
time we upgrade.
2018-01-02 08:19:08 +01:00
Brian Warner
624072c111 hush more lgtm.com -discovered static-analysis problems 2018-01-02 08:18:45 +01:00
Brian Warner
443c402f60 remove WormholeClosedError, simplify control paths in cmd_send/receive
lgtm.com noticed some unreachable code paths, and it turns out that nothing
in the rest of the code base could ever raise WormholeClosedError (I guess it
was leftover from before the big API refactoring). Both sender and receiver
are simpler without the unnecessary checks and state variables.
2018-01-01 16:56:18 +01:00
Brian Warner
e13f3e3e13 hush some unreachable-code errors found by lgtm.com
This comments out some "if 0: debug()" stuff I keep around to investigate
problems, since lgtm thinks of it as accidentally-unreachable code.

I also deleted a server usage command
entirely (src/wormhole/server/cmd_usage.py show_usage) which was disabled
while I rewrote that schema: the new plan is to move the server into a new
repository altogether, and use a completely different approach to the
usage database.
2018-01-01 16:53:18 +01:00
Jonathan Lange
cb67511848 Do not refer to transit server in Dockerfile
https://github.com/warner/magic-wormhole/pull/263 removed the transit server,
breaking the Dockerfile.

This fixes the Dockerfile to run just the rendezvous server.
2018-01-01 13:07:36 +00:00
Brian Warner
80852fb2de Merge PR267: improve sender-side instruction text 2017-12-19 15:07:33 -08:00
Brian Warner
67253bde55 test_cli: make timers more reliable
A slow Travis-CI host caused one the 1.0s KEY_TIMER to fire by accident,
making the test fail because it wasn't expecting to see the "please be
patient" message. Fixed this by increasing the timeout to a very large value
when we aren't explicitly testing it.
2017-12-19 13:41:05 -08:00
Brian Warner
c7c7c0381c update -0 and --text output too 2017-12-19 12:54:16 -08:00
David Harrigan
9b1f99b994 Change the send command output to help copy and pasting to others
A tiny update to show the command to execute along with the code required on
the same line, rather than split across two lines. This small change helps
when sending the information to others using copy and paste.

Fixes #266

-=david=-
2017-12-14 21:13:12 +00:00
Brian Warner
1bbd756fa6 test_transit: fix the miscaptured-loop-variable bug I always make 2017-12-01 13:00:05 -08:00
Brian Warner
8a7c6faf4a more test simplification with assertNoResult 2017-11-29 16:54:03 -06:00
Brian Warner
8227d963a3 test_transit: simplify by using successResultOf/failureResultOf 2017-11-29 15:03:03 -06:00
Brian Warner
f03c8bc516 docs/client-protocol: update comment on ordering
thanks jml for the catch
2017-11-25 12:44:20 -06:00
Brian Warner
c769ff7bbe docs: get version from Versioneer, instead of hard-coding it 2017-11-13 14:18:20 -08:00
Brian Warner
9d4c6aad3b Merge branch 'remove-transit'
This removes the Transit Relay server from "wormhole-server", since it's been
split out into it's own package:

* https://github.com/warner/magic-wormhole-transit-relay
* https://pypi.python.org/pypi/magic-wormhole-transit-relay/0.1.0

The magic-wormhole tests now import that external
magic-wormhole-transit-relay package to exercise the client-side
functionality, as well as for the integration tests that do end-to-end
transfers. A normal "pip install magic-wormhole" will no longer include
transit-relay functionality.

The next step will be to remove the Rendezvous Server functionality too,
following the same path (create a new package, copy the server code into it,
get it working, remove that code from magic-wormhole, rewrite the tests to
import the external package).
2017-11-13 14:15:03 -08:00
Brian Warner
73764830ac setup.py: pin transit-relay to 0.1.0 since tests look inside it 2017-11-13 12:14:08 -08:00
Brian Warner
7e17dcfef1 more Transit-removal changes 2017-11-13 12:07:38 -08:00
Brian Warner
d87792a7c7 finish removing Transit from code and CLI command args 2017-11-13 12:03:21 -08:00
Brian Warner
a804365536 remove most of Transit server, use external package instead 2017-11-13 11:34:17 -08:00
Brian Warner
08e911e1f3 README: add readthedocs badge 2017-11-12 15:43:50 -08:00
Brian Warner
aa04a17ea5 oops, forgot to commit welcome.md 2017-11-12 15:41:11 -08:00
Brian Warner
1bd14d8854 Merge branch 'docs': move to readthedocs 2017-11-12 15:22:56 -08:00
Brian Warner
3f3be8c7aa move most of README into docs, add more pointers 2017-11-12 15:21:56 -08:00
Brian Warner
346cfa13e2 enable markdown (but use index.rst), small headline tweaks 2017-11-12 15:12:36 -08:00
Brian Warner
aefc79b034 run sphinx-quickstart 2017-11-12 10:24:56 -08:00
Brian Warner
d1a829d86f server.py: tolerate (disabled) --transit=
We were unconditionally asking the Transit server object for get_stats(),
which doesn't work if there isn't one.
2017-11-07 20:50:40 -06:00
Brian Warner
a4cca39c0e README: add appveyor status badge (windows tests) 2017-11-02 11:44:55 -07:00
Brian Warner
5894cd2d8b Merge branch '251-slash'
closes #251
2017-11-01 22:16:53 -07:00
Brian Warner
1c5f29337e add notes, make test TODO instead of SKIP 2017-11-01 17:46:09 -07:00
Brian Warner
d727531e6d send: use normpath() on argument to remove trailing slashes
This ought to help with #251, where bash-on-windows makes it easy to add a
forward-slash, and os.path.normpath() knows how to remove them, but os.sep is
a backslash.
2017-11-01 17:46:09 -07:00
Brian Warner
64f973b0e9 docs/state-machines: build all images 2017-10-29 21:42:05 +08:00
Brian Warner
5feffe7fdb Merge PR256: accept $WORMHOLE_RELAY_URL and $WORMHOLE_TRANSIT_HELPER 2017-10-05 15:31:39 -04:00
Jaye Doepke
b362adf7ca Relay and transit url conf from env vars
Added the click option to look for relay and transit urls in environment
variables. If you're running your own relay/transit servers (such as
inside a corporate firewall), this will make client's lives easier.
2017-10-04 14:38:00 -05:00
Brian Warner
7ad006950a Merge branch '252-tor-control-port'
closes #252
2017-09-14 16:51:56 -07:00
Brian Warner
0aeae9ce10 tor_manager: expose errors when --tor-control-port= is provided
If you pass --tor-control-port= and we can't use it, throw an error that will
kill the whole process, instead of falling back to the default SOCKS port.

If you omit --tor-control-port=, then if all default control port connections
fail, we'll fall back to the default SOCKS port.

Also, test each combination separately, and improve the status messages.
2017-09-14 16:46:26 -07:00
Brian Warner
ed420e0001 tor_manager: pass endpoints to txtorcon.connect(), not descriptors
This was breaking any uses of --tor-control-port=: the client would always
fall back to using the default SOCKS port.
2017-09-14 15:48:35 -07:00
Brian Warner
be166b483c NEWS: update for 0.10.3 release 2017-09-12 23:09:25 -07:00
Brian Warner
155e3b5398 README: expand git install, explain --user/venv install options
refs #249
2017-09-12 22:52:00 -07:00
Brian Warner
0a762c5bfd README: mention 'sudo' for install commands
refs #249
2017-09-12 17:13:07 -07:00
Brian Warner
25afce41fb _rlcompleter: re-raise exception with plain 'raise', not 'raise e' 2017-09-12 16:39:05 -07:00
Brian Warner
22bc382543 Merge PR225: instructions for compiling on windows
closes #225
2017-09-03 14:10:25 -07:00
Brian Warner
80f6e8ef90 expand on compile-on-windows instructions 2017-09-03 14:10:08 -07:00
Buckaroo9
d9b47c4f84 Added Other Requirement for Installing on Windows.
Microsoft Visual C++ 9.0 is required for installation. Otherwise large errors are show when executing pip install magic-wormhole.
2017-09-03 14:08:04 -07:00
Brian Warner
68ce54ad3a setup.py: add dep on attrs, >=16.3.0 to get __attrs_post_init__
I should have added this when I switched to the new state machines, since
they definitely depend on attrs. The only reason this worked at all was that
some subdependency was also depending upon attrs.

We need at least 16.3.0, since we use __attrs_post_init__, and that feature
wasn't included in attrs-16.2.0 or earlier.

Closess #248
2017-09-03 14:04:00 -07:00
Brian Warner
50a1df386e README: mention github and IRC channel 2017-08-11 14:31:28 -07:00
Brian Warner
407409c117 Merge PR239: set RLIMIT_NOFILE higher on server
closes #238
2017-07-31 17:14:41 -07:00
Brian Warner
b9d1d11b03 server.py: windows doesn't even have the 'resource' module
I thought it might exist, but be empty. But it doesn't even exist on windows,
so we must guard against an ImportError.
2017-07-31 15:56:55 -07:00
Brian Warner
d44c7d2c1a server: increase RLIMIT_NOFILE to let us use more sockets
Linux defaults to a soft limit of 1024, which limits us to 512 simultaneous
non-transit-using connections. The transit relay runs in the same process, so
long-running relayed transfers will compete for those sockets too.

This raises the soft limit to equal the hard limit (if possible), or as much
as we can manage, if the soft limit was less than 10k. If the
resource.setrlimit calls aren't available (e.g. windows), or some other error
happens, this will log a message and continue without changing the limits.

closes #238
2017-07-31 14:16:26 -07:00