Chore: use gateway address of fake ip pool as the TUN device address

This commit is contained in:
yaling888
2022-03-17 07:41:18 +08:00
parent b8d635a4b3
commit 8d0ae4284d
7 changed files with 22 additions and 11 deletions

View File

@ -34,8 +34,12 @@ func ShouldFindProcess(metadata *C.Metadata) bool {
return false
}
func AppendLocalIPs(ip ...net.IP) {
localIPs = append(ip, localIPs...)
}
func getLocalIPs() []net.IP {
ips := []net.IP{net.IPv4(198, 18, 0, 1), net.IPv4zero, net.IPv6zero}
ips := []net.IP{net.IPv4zero, net.IPv6zero}
netInterfaces, err := net.Interfaces()
if err != nil {