Commit Graph

69 Commits

Author SHA1 Message Date
Brian Warner
c5afea6f9b docs: add pointer to a Dockerfile
Thanks to @ggeorgovassilis. Closes #11.
2019-09-10 23:19:16 -07:00
Brian Warner
42a293213b enable SO_KEEPALIVE on all connections
This timeout is notoriously long (about two hours), but it might eventually
prune stuck connections.

refs #9
2019-09-10 23:14:29 -07:00
Brian Warner
273c4d796c change default port= to listen on both IPv4+IPv6
The default was "tcp:4001", which happens to expand into
"tcp:4001:interface=127.0.0.1", which limits the listening socket to IPv4
connections only.

Changing it to "tcp:4001:interface=\:\:1" means "listen on ::1", which is the
IPv6 name for the loopback interface, and gets us a socket that accepts both
IPv4 and IPv6 connections.

Note: this might cause incompatibilities with IPv4-only hosts, if they don't
accept the "::1" name. For these systems, run the server as `twist
transitrelay --port=tcp:4001" to revert to the old behavior.

closes #12
2019-09-10 23:09:04 -07:00
Brian Warner
e9f166cb96 travis/tox/appveyor: remove py3.3 and py3.4
We support py2.7, and py3.5 and higher.
2019-09-10 23:07:09 -07:00
Brian Warner
6ceecb78bf add TODO for one of the moods 2019-09-10 23:05:22 -07:00
Brian Warner
bb1d52398c travis: test py3.7 too 2018-07-27 14:39:05 -07:00
Brian Warner
97a4f4e2b1 tox: add py37 2018-07-04 11:23:33 -07:00
Brian Warner
6e635f1af2 munin: fix +x on wormhole_transit_events_alltime 2018-03-28 14:23:50 -07:00
Brian Warner
0960cfa636 munin: move all plugins under a new "wormhole" category, not "network" 2018-03-28 14:14:31 -07:00
Brian Warner
faa8dba5e7 add news for 0.1.2 release 2018-03-19 22:37:28 -07:00
Brian Warner
03a064d8d3 Merge branch 'appveyor'
turn on windows CI, add helper script, add badge to README, update test to
not fail randomly on windows
2018-02-19 15:44:54 -08:00
Brian Warner
a9680918b9 test_stats: try more realistic fake time.time()
Maybe windows+py36 was failing because "456" is too small of a value, and the
OS time libraries can't figure out UTC for something back in 1970. Switch to
a fixed timestamp from just a few minutes ago, to see if it likes 2018
better.
2018-02-19 13:23:40 -08:00
Brian Warner
071471a353 test_stats: mock time.time() with a float, to appease windows
For some reason, the appveyor (windows) tests fail on py36 with an OSError
during an internal (twisted.python.log) call to datetime.fromtimestamp().
It's possible that my mock times are too old (I'm using made-up values like
"456"), but maybe it's just that real time.time() returns a float instead of
an integer.
2018-02-19 13:12:14 -08:00
Brian Warner
1e663aa5ef README: add appveyor badge 2018-02-19 12:41:31 -08:00
Brian Warner
492599f072 turn on appveyor (windows CI) 2018-02-19 12:38:03 -08:00
Brian Warner
1e2520b41d Merge branch '2-rlimit'
Use rlimit() to allow the server to have more than 1024 simultaneous open
file descriptors. That would limit us to about 510 connections. The new limit
varies depending on the operating system, but is closer to a million.

closes #2
2018-02-19 12:35:29 -08:00
Brian Warner
5a762b16ad call increase_rlimits() when creating the service 2018-02-19 12:28:17 -08:00
Brian Warner
f7b8c5b19a copy increase_rlimits.py from magic-wormhole-mailbox-server
This code was originally in magic-wormhole, embedded in the server startup
code. I carved it out to a separate file (with tests) in mailbox-server, but
it should be used here too.
2018-02-19 12:26:10 -08:00
Brian Warner
9c44ee13cd munin: track not-yet-complete usage bytes too 2018-02-19 11:26:39 -08:00
Brian Warner
135280a922 README: add PyPI badge 2018-02-17 19:39:01 -08:00
Brian Warner
39e751ce08 munin: add wormhole_transit_events_alltime
closes #5
2018-02-15 11:20:54 -08:00
Brian Warner
e988db1b68 add NEWS for 0.1.1 release 2018-02-14 16:27:36 -08:00
Brian Warner
91d3bd8e90 munin: emit 0, not "None", when there's no bytes usage to report 2018-02-12 17:43:46 -08:00
Brian Warner
481def1937 Merge branch 'lonely-logging'
Clean up usage logging: record events properly. The previous code would
double-count handshake failures (as both "errory" and "lonely"). Rewrite the
munin plugins to be more general.
2018-02-12 17:37:05 -08:00
Brian Warner
098e315624 remove a few lines by using defaultdict() 2018-02-12 17:34:11 -08:00
Brian Warner
73d233a7be comment about updating 'current' row immediately, or waiting for timer 2018-02-12 17:29:27 -08:00
Brian Warner
7411d3cd73 rename, edit munin plugins to match new moods
Instead of an "errors" graph, we now just track all events (happy too).
2018-02-12 17:04:45 -08:00
Brian Warner
10e754fc9a update v1 schema comments with new "redundant" mood 2018-02-12 17:04:24 -08:00
Brian Warner
4e9b6c53a9 rework mood tracking, full tests of usage events 2018-02-12 16:57:39 -08:00
Brian Warner
547ead75ba test_transit_server: factor out wait() 2018-02-12 16:55:37 -08:00
Brian Warner
b3100344eb _version.py: hush lgtm.com alert
This needs to be upstreamed into Versioneer, as it will disappear the next
time we upgrade.
2018-01-03 00:26:29 +01:00
Brian Warner
ecf3edb3f7 transit_server.py: remove unnecessary 'pass'
caught by lgtm.com analysis
2018-01-03 00:26:03 +01:00
Brian Warner
94b78609c3 add NEWS for initial 0.1.0 release 2017-11-12 15:57:09 -08:00
Brian Warner
7365878fed setup/MANIFEST: fix packaging issues 2017-11-12 15:55:09 -08:00
Brian Warner
ee418b5163 munin: fix print function 2017-11-09 22:11:34 -08:00
Brian Warner
49ae79fc2e munin: fix rebooted-vs-updated check 2017-11-09 22:09:27 -08:00
Brian Warner
2ddc6566e2 munin: make all plugins +x 2017-11-09 21:37:31 -08:00
Brian Warner
8d5e7afc8e docs/transit.md: remove client-specific text, update markdown format 2017-11-09 17:35:35 -08:00
Brian Warner
f430d218f2 running.md: explain shutdown 2017-11-09 17:32:01 -08:00
Brian Warner
406c11deda update README, add running.md with twist/twistd instructions 2017-11-09 17:30:19 -08:00
Brian Warner
05ffcb2d55 test_transit_server: improve coverage 2017-11-09 16:39:44 -08:00
Brian Warner
c270ad6e0b DB: small cleanups, improve test coverage 2017-11-09 16:39:25 -08:00
Brian Warner
9008d4339a update munin plugins to work with usage-db, add new ones 2017-11-09 15:43:16 -08:00
Brian Warner
17e232de50 Merge branch 'usage-db' 2017-11-09 00:14:55 -08:00
Brian Warner
9e2c0e26ca add migration tool, needs more testing 2017-11-07 22:10:03 -06:00
Brian Warner
54be4cd8d3 database: add open_existing_db() for migration tool 2017-11-07 21:54:59 -06:00
Brian Warner
69d66dd4c1 database: add create-only function, for migration tool 2017-11-07 21:54:53 -06:00
Brian Warner
c6e3347e68 copy test_database from magic-wormhole package
disable the upgrader test for now, since we only have the one schema version
2017-11-07 21:44:57 -06:00
Brian Warner
0b93725709 more test coverage 2017-11-07 21:21:04 -06:00
Brian Warner
fa31777db0 increase test coverage in the bad handshake path 2017-11-07 21:09:12 -06:00