b8313b4595
* Previously, we only connected to the relay supplied by our partner, which meant that if our relay differed from theirs, we'd never connect * But we must de-duplicate the relays because when our relay *is* the same as theirs, we'd have two copies, which means two connections. Now that we deliver sided handshakes, we can tolerate that (previously, our two connections would be matched with each other), but it's still wasteful. This also fixes our handling of relay hints to accept multiple specific endpoints in each RelayHint. The idea here is that we might know multiple addresses for a single relay (maybe one IPv4, one IPv6, a Tor .onion, and an I2P address). Any one connection is good enough, and the connections we can try depend upon what local interfaces we discover. So a clever implementation could refrain from making some of those connections when it knows the sibling hints are just as good. However we might still have multiple relays entirely, for which it is *not* sufficient to connect to just one. The change is to create and process RelayV1Hint objects properly, and to set the connection loop to try every endpoint inside each RelayV1Hint. This is not "clever" (we could nominally make fewer connection attempts), but it's plenty good for now. refs #115 fix relay hints |
||
---|---|---|
.. | ||
__init__.py | ||
common.py | ||
run_trial.py | ||
test_args.py | ||
test_database.py | ||
test_hkdf.py | ||
test_scripts.py | ||
test_server.py | ||
test_ssh.py | ||
test_transit.py | ||
test_util.py | ||
test_wormhole.py | ||
test_xfer_util.py |