mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
10 lines
186 B
Go
10 lines
186 B
Go
package metadata
|
|
|
|
import "net/netip"
|
|
|
|
func NetworkFromNetAddr(network string, addr netip.Addr) string {
|
|
if addr == netip.IPv4Unspecified() {
|
|
return network + "4"
|
|
}
|
|
return network
|
|
}
|