Write a proposal for a relay protover, in which relays with IPv6 ORPorts start attempting to connect to IPv6 ORPorts in response to EXTEND2 cells containing IPv6 addresses. (Relays always prefer existing canonical connections, which may be over IPv4.)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
We also need to decide which fallback to use if we don't confirm ourselves reachable within 20 minutes (this can happen because relays will use existing canonical connections rather than making a new one):
use an IPv6 exit to connect to our ORPort (this doesn't authenticate that the remote port actually belongs to us)
use a magic value for the identity (all zeroes?) when connecting to our ORPort, to force a new connection (DoS risk, doesn't authenticate, but does check addresses in the NETINFO cell)
put flags in the extend cell that say "must IPv6"? (also a DoS risk)
close an old/unused connection, and then extend a preemptive circuit to ourselves over IPv6
Extend the notion of canonical to have a canonical v4 and a canonical v6 connection. Only in the event of a reachability check with a "must v4" or "must v6" flag create a new connection of the other connection type. Treat this second connection as canonical for the purpose of deciding whether to close it etc, but not for actual traffic. Does that alleviate the DoS risk you're worried about? If not, why not?
Extend the notion of canonical to have a canonical v4 and a canonical v6 connection. Only in the event of a reachability check with a "must v4" or "must v6" flag create a new connection of the other connection type. Treat this second connection as canonical for the purpose of deciding whether to close it etc, but not for actual traffic. Does that alleviate the DoS risk you're worried about? If not, why not?
It mitigate it, but does not eliminate it, because it still doubles the number of open connections per relay (in a worst-case scenario where all relays have IPv6). However, a scheme like this would also substantially reduce the need for a fallback mechanism for reachability checking. To eliminate it, we could make a must-flagged EXTEND cell trigger a NETINFO cell along an existing connection.
Here's a much nicer alternative fallback that avoids adding must flags:
relays with the latest protover respond to NETINFO cells on existing connections by sending a NETINFO cell, at most every N minutes per connection (N < 20 minutes, the current reachability warning threshold)
Then the fallback becomes:
if there are no relays with the right protover or all relays with the right protover have an existing connection to this relay, try these steps in order
Elicit a NETINFO cell by sending a relay with the right protover a NETINFO cell, where this relay is the server side of an existing TLS connection over the desired IP version
Elicit a NETINFO cell by sending a relay with the right protover a NETINFO cell, where this relay is the client side of an existing TLS connection over the desired IP version
Open a connection to a relay to elicit a NETINFO cell over the desired IP version
I think this is conceptually much simpler, uses the same mechanisms we would use anyway, and minimises the number of changes required.
relays with the latest protover respond to NETINFO cells on existing connections by sending a NETINFO cell, at most every N minutes per connection (N < 20 minutes, the current reachability warning threshold)
Then the fallback becomes:
if there are no relays with the right protover or all relays with the right protover have an existing connection to this relay, try these steps in order
Elicit a NETINFO cell by sending a relay with the right protover a NETINFO cell, where this relay is the server side of an existing TLS connection over the desired IP version
These won't work, they don't get a NETINFO for the ORPort address:
Elicit a NETINFO cell by sending a relay with the right protover a NETINFO cell, where this relay is the client side of an existing TLS connection over the desired IP version
Open a connection to a relay to elicit a NETINFO cell over the desired IP version
Instead, we should:
2. expire 10% of our oldest connections, and optionally 10% of our least-used connections (don't do this on authorities)
3. Retry step 1
4. If we keep on failing, we are not getting any inbound connections, so we're an anomaly: a busy relay that can only make outbound connections. (This situation fixes itself: if we give up and drop out of the consensus, we're no longer a busy relay, and our reachability checks should work.)
There will need to be limits so that we publish immediately if a minimum number of relays supporting the protover aren't in the consensus.
And we should make sure we expire a minimum number of connections.
We probably want to use the stored information from the original NETINFO cell on each connection, rather than eliciting another one with the same content (and adding complicated code to make sure we don't send too many).
Comments by nickm on tor-dev@. Moving this to needs_info until that part is resolved or not so we can then proceed to upstream merge and make prop311 official.