mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-11 19:23:59 +00:00
f688d4116cf3e0b919fcea132afbfa84f8a983b7
`test_target` opened a TCP connection to the rendezvous server to learn which address the kernel would use, then dropped it: a full handshake, one round trip, on every connection the controller starts, before the one `_start_inner` opens to the same host a moment later - and a second's wait first wherever an IPv6 route led to nothing, before it fell back to the resolver anyway. The handshake stood in for a choice that had been made by hand: before 2022's NAT64 fix the code preferred an A record outright, which a v6-only host cannot reach, and asking the server itself was the way to let the OS decide. The resolver decides the same way. getaddrinfo orders what it returns as RFC 6724 says, looking up a route and a source address for each candidate as it goes, so the synthesized IPv6 comes first on a v6-only host and IPv6 on a dual-stack one, the order the handshake would have tried them in. Its first answer is the address, and the fallback branch is all that is left. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns
Description
No description provided
74 MiB
Languages
Rust
100%