Opened 3 months ago

Last modified 3 months ago

#34167 new enhancement

PublishServerDescriptor via IPv6

Reported by: ϲypherpunks Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: IPv6
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor: Sponsor55-can

Description

let my relay node configurable by what protocol the upload to authorities is done. similiar to

PublishServerDescriptor

option.

perhaps add option like

PublishServerDescriptorProtocol auto|4|6|or
#     This option specifies how descriptors Tor will publish when acting as
#     a relay. You can
#     choose multiple arguments, separated by commas. 
#  
#     If this option is set to 4, Tor will publish its
#     descriptors to any directories over IPv4. (This is useful if you're not IPv6 connectable
#     out your server, or if you're using a IPv6 Translation Tunnel)
#     Otherwise, Tor will publish its
#     descriptors via IPv6. The default is "auto", which
#     means "if running as a relay or bridge, publish descriptors to the
#     appropriate authorities over what's reachable". Other possibilities are "or", meaning
#     "publish as if you're a OnionService", "publish over onion circuit".

may Sponsor55 or prop311-prop313 already covered if i missed or could be relevant for

Child Tickets

Change History (1)

comment:1 Changed 3 months ago by teor

Milestone: Tor: unspecified
Sponsor: Sponsor55-can
Version: Tor: unspecified

I'm not sure if we need this feature right now - at the moment, relays have to have an IPv4 ORPort. But we might want it eventually for IPv6-only relays. And it won't hurt to add it early.

I'm also not sure if we need an extra option or flag. We could just try both IPv4 and IPv6?

To avoid confusing IPv4-only relay operators, we should:

  • only log a failure warning if both fail, or
  • skip IPv6 if the relay doesn't have an IPv6 ORPort.

(We're going to add automatic IPv6 ORPort discovery in #33049. So once that ticket is done, we should update the IPv6 check to use the new IPv6 discovery feature.)

Here's the relevant code, if anyone would like to start on this feature:

directory_post_to_dirservers():
https://github.com/torproject/tor/blob/b7a165228f02e693b3e777b4c815214bb6e05691/src/feature/dirclient/dirclient.c#L219

You'll want to set DIRIND_ONEHOP for relay descriptors via IPv4 and IPv6 ORPorts, and DIRIND_ANONYMOUS for bridge descriptors via IPv6 ORPorts. (The existing purpose_needs_anonymity() check does the DIRIND_ANONYMOUS for you.)

You'll also want to use directory_request_set_or_addr_port() and directory_request_set_directory_id_digest(). Avoid setting the dirport or routerstatus.

Note: See TracTickets for help on using tickets.