mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
direct: remove link-local ip from IFaceIPs func
This commit is contained in:
parent
1d5ef167ec
commit
0d1c4c5a47
@ -131,6 +131,8 @@ glider v0.6.7 usage:
|
||||
timeout value used in multiple dnsservers switch(seconds) (default 3)
|
||||
-forward value
|
||||
forward url, format: SCHEME://[USER|METHOD:PASSWORD@][HOST]:PORT?PARAMS[,SCHEME://[USER|METHOD:PASSWORD@][HOST]:PORT?PARAMS]
|
||||
-interface string
|
||||
source ip or source interface
|
||||
-ipset string
|
||||
ipset name
|
||||
-listen value
|
||||
|
@ -113,7 +113,9 @@ func (d *Direct) IFaceIPs() (ips []net.IP) {
|
||||
}
|
||||
|
||||
for _, ipnet := range ipnets {
|
||||
ips = append(ips, ipnet.(*net.IPNet).IP)
|
||||
if ip := ipnet.(*net.IPNet).IP; !ip.IsLinkLocalUnicast() {
|
||||
ips = append(ips, ip)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user