proton-core's auto transport races alternative routing: third-party DoH probes and leaked-task tracebacks #164
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A scheduled ProtonVPN renewal whose
refresh()round-trip ran long dumped a full aiohttp traceback plus fourTask was destroyed but it is pending!errors into the service log — while the import itself succeeded seconds later.Cause: proton-core's default
AutoTransportracesAiohttpTransport(delay 0) againstAlternativeRoutingTransport(delay 5s). Any API call slower than 5s starts the alternative-routing racer, which discovers Proton's fallback domains by sending DoH queries to hardcoded Google DNS (8.8.4.4/8.8.8.8 + v6) and Quad9 resolvers. On a v6-less network the v6 probe raises, the primary transport wins, and the abandoned racer tasks surface through asyncio's exception handler as ERROR tracebacks when the loop closes.Two problems: the scary-looking noise, and a root service phoning Google/Quad9 DNS whenever Proton's API is momentarily slow — traffic nothing in aqomui asked for.
Fix: pin
session.transport_factory = AiohttpTransporton every session the provider builds — that is auto's primary transport, minus the racer. Trade-off: on a network where Proton's API is blocked, an import fails with the normal network error instead of possibly succeeding via alternative routing; acceptable here, and the task leak itself is an upstream python-proton-core bug either way.🤖 Generated with Claude Code