perf(ipv6_hole_punch): handle multiple ipv6 public ip correctly (#2387)

This PR fixes IPv6 UDP hole punching for peers with multiple public IPv6
addresses by adding two RPC signals:

 - connector_addrs: connector-side candidate public IPv6 socket addresses
that the remote peer should punch back to.

 - preferred_src_ipv6: remote listener IPv6 address that the remote peer
should use as the UDP source when sending hole-punch packets back.
Together, these let the connector try all usable local IPv6 candidates
while keeping the remote punch-back

packet sourced from the same IPv6 address that the connector is dialing.
This commit is contained in:
KKRainbow
2026-06-28 20:42:16 +08:00
committed by GitHub
parent 9cb3833216
commit 46f1b57367
7 changed files with 762 additions and 66 deletions
+2
View File
@@ -189,6 +189,8 @@ message GetIpListResponse {
message SendUdpHolePunchPacketRequest {
common.SocketAddr connector_addr = 1;
uint32 listener_port = 2;
common.Ipv6Addr preferred_src_ipv6 = 3;
repeated common.SocketAddr connector_addrs = 4;
}
service DirectConnectorRpc {