Stop waiting for Tor to bootstrap in Start: it only ends on a 100%
bootstrap, so an unreachable Tor network blocked every inbound forever.
Clear DisableNetwork with SETCONF directly, since EnableNetwork ignores
a rejected SETCONF.
Keep reading the control connection for the whole Tor lifetime so log
events are delivered after Start returns instead of piling up in Tor.
The HandleNextEvent loop starts only after the synchronous control
commands, since it spins while a synchronous reply is pending. Drop the
DEBUG log subscription, which costs Tor a debug log per cell.
acme-tls/1 was stored in the server NextProtos so that TLS-ALPN-01
validation could negotiate it. With no other ALPN configured, the server
then only offered acme-tls/1 and rejected every client that sends ALPN
with no_application_protocol, and NextProtos() reported it as configured,
so protocols that set their default ALPN only on an empty list (hysteria,
hysteria2, QUIC, HTTP upgrade, naive, DERP) never did.
Negotiate acme-tls/1 only for RFC 8737 validation ClientHellos through
GetConfigForClient and leave NextProtos to the inbound. Inline ACME is now
a certificate provider like certificate_provider.
QUIC clients took the standard TLS config directly, so with ECH enabled
and no static config, hysteria, hysteria2, tuic and DNS over QUIC never
queried the ECH config list and sent the real server name in the clear
without reporting an error. Query it before the QUIC handshake as the
TCP path does.
When ECH is enabled without a static config, the HTTPS record query for
the ECH config list went through the DNS rules instead of the domain
resolver, and the migration of outbound DNS rule items to the domain
resolver left no way to select a DNS server for it. A rule rejecting
HTTPS records refused the query, and a default DNS server detoured
through the same outbound waited for its own connection until the query
timed out.
Send the query to the domain resolver of the dial fields, then the
default domain resolver, then the only DNS server, and fail it when
none of them is available. DNS servers must set their own domain
resolver for it, as they do for a domain server address.