mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-16 05:40:43 +08:00
Refactor(metadata): replace net.IP with netip.Addr (#396)
This commit is contained in:
@@ -243,7 +243,7 @@ func serializeRelayAddr(m *M.Metadata) *relay.AddrFeature {
|
||||
Host: m.DstIP.String(),
|
||||
Port: m.DstPort,
|
||||
}
|
||||
if m.DstIP.To4() != nil {
|
||||
if m.DstIP.Is4() {
|
||||
af.AType = relay.AddrIPv4
|
||||
} else {
|
||||
af.AType = relay.AddrIPv6
|
||||
|
Reference in New Issue
Block a user