Log address config info when tor starts up
We're going to be modifying tor's address detection and reachability code for an upcoming sponsor. To help us debug, we should log the following info when tor starts up:
IPv4:
- the
Address
torrc option- and whether it is an IP address, or a DNS name
- the local hostname
- and whether it is an IP address, or a DNS name
- the local network interface addresses
See resolve_my_address()
for details.
IPv6:
- the IPv6 address of the first IPv6
ORPort
torrc option
See router_build_fresh_descriptor()
and router_get_advertised_ipv6_or_ap()
(in #32588 (moved)) for details.
When (or if) we use them as part of address detection, we should also log the following info:
IPv4 and IPv6:
- the
Address
torrc option- and whether it is an IP address, or a DNS name
- the IPv4 and IPv6 addresses of the first
ORPort
torrc option of each address family - the local hostname
- and whether it is an IP address, or a DNS name
- the local network interface addresses
Notes:
- We'll need a proposal to decide if
ORPort
or hostname should come first - We'll probably want a summary at notice level, and then detailed logs at info level
- If all these methods fail, relays use
X-Your-Address-Is:
headers from directory authorities. They are out of scope, because they are not available at startup. - Similarly, we won't print address reachability self-testing info, because it's not available at startup.
- We may want to print similar log messages (including
X-Your-Address-Is:
and reachability info) as part of tor's regular heartbeat messages. But that deserves a separate ticket.
I don't think we'll use (or log):
- the addresses of any
DirPort
torrc options - the addresses of multiple
ORPort
torrc options