github.com/sagernet/sing@v0.4.0-beta.19.0.20240518125136-f67a0988a636/common/metadata/network.go (about) 1 package metadata 2 3 import "net/netip" 4 5 func NetworkFromNetAddr(network string, addr netip.Addr) string { 6 if addr == netip.IPv4Unspecified() { 7 return network + "4" 8 } 9 return network 10 }