Add option to exclude local IPv6 candidates. (#4657)

Could be useful option to try in certain conditions where flakey IPv6
infrastructure is suspected for connection issues.
This commit is contained in:
Raja Subramanian
2026-07-10 15:56:58 +05:30
committed by GitHub
parent aff752a4bc
commit 19c3d00fc9
5 changed files with 75 additions and 62 deletions
+5
View File
@@ -173,6 +173,11 @@ func MaybeTruncateIP(addr string) string {
return addr[:len(addr)-3] + "..."
}
func IsIPv6(addr string) bool {
ipAddr := net.ParseIP(addr)
return ipAddr != nil && ipAddr.To4() == nil
}
func ChunkProtoBatch[T proto.Message](batch []T, target int) [][]T {
var chunks [][]T
var start, size int