Commit Graph

89 Commits

Author SHA1 Message Date
Itamar Turner-Trauring
f57ba3c927 Can't send unicode over foolscap. 2020-11-04 14:13:08 -05:00
Itamar Turner-Trauring
bcd7cdf86f Some passing tests on Python 3. 2020-10-16 10:47:49 -04:00
Itamar Turner-Trauring
369cd98d5a Clarify what "JSON-serializable bytes" means. 2020-09-29 10:17:26 -04:00
Itamar Turner-Trauring
64516aac41 Port to Python 3. 2020-09-28 10:20:00 -04:00
Jean-Paul Calderone
7e17ffb75d Also update the introducer's use of read_config 2019-08-03 05:34:21 -04:00
meejah
5644f421fe get rid of ed25519.bytes_from_* methods 2019-07-08 12:46:22 -06:00
meejah
5633f3a8ff bytes 2019-06-25 14:35:25 -06:00
meejah
249abbdd1f things are bytes 2019-06-24 16:57:12 -06:00
meejah
f52a6ce9bb more bytes clarification 2019-06-24 16:57:12 -06:00
meejah
05f6b7fea0 refactor ed25519 a little; only _string variants, not _bytes of deserializers and some imports 2019-06-24 15:31:46 -06:00
meejah
5701bad548 a module for errors 2019-06-24 12:12:10 -06:00
meejah
47ccdb0177 refactor ed25519 helpers to functional style
eliminates the wrapper classes and uses some more-explicit
names throughout (e.g "sk" -> "signing_key")
2019-06-13 22:19:28 -06:00
heartsucker
8063d93c6d replaced pytcryptopp rsa with our own wrapper 2019-06-13 22:19:28 -06:00
heartsucker
9e31bfe2f4 update code/test to use new ed25512 module 2019-06-13 22:19:28 -06:00
heartsucker
3a5a0fb572 replaced uses of pycryptopp's ed25519 with our own 2019-06-13 22:18:55 -06:00
tpltnt
c8f11dc2d3 ported old-style classes to new-style 2019-05-26 08:28:18 +02:00
meejah
7de94f623c clarify Introducer imports 2018-09-10 21:58:28 -06:00
meejah
efce7b1f6a use Failure for all errors from async methods 2018-09-10 21:58:27 -06:00
meejah
edc50f655b get rid of is_tub_listening 2018-09-10 21:58:27 -06:00
meejah
17fa32633c post-rebase fixups; needs review 2018-09-10 21:58:27 -06:00
meejah
08e0c3b7e2 get rid of 'add_service' (just an alias to setServiceParent anyway) 2018-09-10 21:58:27 -06:00
meejah
7685fb34cd pull 'basedir' entirely into _Config
Put all config-related methods into _Config; change
code to ask config for paths instead of using basedir;
add some better docstrings
2018-09-10 21:58:27 -06:00
meejah
26007f363b pull 'StorageFarmBroker' out of __init__
This means also pulling out introducer-clients and some
related utility methods
2018-09-10 21:58:27 -06:00
meejah
42c39d435a imports 2018-09-10 21:58:27 -06:00
meejah
739aaa3ef9 put create() methods in i2p_, tor_provider
Also Provider -> _Provider, improve docs and update tests
2018-09-10 21:58:27 -06:00
meejah
e7a8d39fbc split client, introducer READMEs 2018-09-10 21:58:27 -06:00
meejah
f0c3db0e5a pyflakes 2018-09-10 21:58:27 -06:00
meejah
0ff21ea7d5 all tests pass. wooo 2018-09-10 21:58:27 -06:00
meejah
43d857a0bd more refactor + fix some node tests 2018-09-10 21:58:27 -06:00
meejah
71484b4a12 upgrade create_introducer 2018-09-10 21:58:27 -06:00
meejah
d544284f92 introduce create_node_dir 2018-08-25 02:10:44 -06:00
meejah
86a9ce5793 create _NoNetworkClient using same code as _Client 2018-08-25 02:10:44 -06:00
meejah
79756c088e split client, introducer READMEs 2018-08-25 02:10:44 -06:00
meejah
35810a5692 pull 'basedir' entirely into _Config
Put all config-related methods into _Config; change
code to ask config for paths instead of using basedir;
add some better docstrings
2018-08-25 02:10:44 -06:00
meejah
1b6f477549 Pull "config" handling out of Node and hide node-derivitives
This includes:

 - refactor to create_client and _Client
 - refactor to _IntroducerNode and create_introducer
2017-11-20 12:57:20 -07:00
Brian Warner
2ceea6df0d Merge PR406: use @implementer instead of implements
This also updates several classes to be new-style (inheriting from 'object').
2017-03-23 19:25:56 -07:00
meejah
49ae2c5eb7 use @implementer instead of implements
Also, derive some more things from 'object'
2017-02-27 11:01:30 -07:00
meejah
031a88c25f simplejson -> json 2017-02-23 15:21:36 -07:00
Brian Warner
38935bbca6 remove old unused connection-status APIs 2016-12-08 16:25:00 -08:00
Brian Warner
77fd41b66e update WUI welcome page with new connection-status info
This shows current-connection info, and provides per-hint status details in a
tooltip.

The "Connection" section no longer shows seconds-since-loss when the server
was not connected (previously it showed seconds-since-connect when connected,
and flipped to seconds-since-loss when disconnected). We already have the
"Last RX" column, which is arguably more meaningful (and I can't think of a
good case when these would differ), so we don't really need
seconds-since-loss, and the new ConnectionStatus doesn't track it anyways.

So now the "Connection" timestamp for non-connected servers is just
"N/A" (both the main text and the tooltip). The "Introducers" section was
changed the same way.

This moves the per-server connection timestamp out of the nickname/serverid
box and over into the Connection box. It also right-floats all timestamps,
regardless of which box they're in, which makes them share the box with
connection_status more politely.

Internally, this adds code to create ConnectionStatus objects when necessary.
2016-12-08 16:24:32 -08:00
David Stainton
4f717ba808 Add a multi-introducer implementation
this is based the previous work of warner, killyourtv and leif
 fixes ticket #68
2016-09-13 00:15:52 +00:00
meejah
2732c37941 Check for unknown config options
The list of valid sections + config-items came from
grep'ing the source for `.get_config`
2016-09-06 15:05:46 -06:00
Brian Warner
a1594df0a6 introclient: only give ascii key_s to storagebroker
This was triggered when the initial Introducer connection failed, so the
node read the introducer_cache.yaml from disk. That always returns
unicode strings, and the StorageFarmBroker insisted that it's
server-IDs (aka "key_s") were bytestrings.

The tests were extended to exercise the code that loads from disk and
delivers to the StorageFarmBroker, and more preconditions were put in
place to catch this sort of thing earlier next time.

closes ticket:2817
2016-09-01 20:29:52 -07:00
Brian Warner
fea8b627dd if tub.port is empty, don't listen
Updated config docs. Added errors if we're not listening but were told
to enable storage, helper, or if we're the Introducer server.

closes ticket:2816
2016-08-29 22:28:55 -07:00
Brian Warner
2c5f7ed425 factor out yamlutil.py
The yaml.SafeLoader.add_constructor() should probably only be done once,
and moving this all into a module gives us an opportunity to test it
directly.
2016-07-19 17:31:41 -07:00
Brian Warner
a39270bd46 more v1-introducer cleanup: require sigs
This removes a little bit of code that tolerated unsigned announcements.
2016-07-05 16:41:15 -07:00
Brian Warner
6f1e01453e remove make_index()
index is now always (service_name, key_id)
2016-06-29 23:06:40 -07:00
Brian Warner
b2e5507e09 sign_to_foolscap: require key 2016-06-29 23:06:40 -07:00
Brian Warner
ae91fa9ffe require all outbound announcements to be signed 2016-06-29 23:06:40 -07:00
Brian Warner
c64ff7b310 more v1 removal cleanup
Historical note: V2 introducers have been around for three years
now (released in 1.10.0), so it's time to drop v1. This branch removes a
lot of fallback code, and tests which exercised it. refs ticket:2784

This patch removes some now-unused code: v1-related support functions on
the client, "stub-client" handlers, and v1-tolerant remote methods on
the server. The unit tests have been cleaned up a bit too, now that
there are fewer cases to exercise.
2016-06-29 22:58:14 -07:00