mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 03:47:38 +03:00
Fix public addr check
This commit is contained in:
parent
09b55ce4b6
commit
bd79d31e3b
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ linters-settings:
|
|||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- prefix(github.com/sagernet/sing)
|
||||
- prefix(github.com/sagernet/)
|
||||
- default
|
||||
staticcheck:
|
||||
go: '1.18'
|
||||
|
|
|
@ -17,7 +17,7 @@ func LocalAddrs() ([]netip.Addr, error) {
|
|||
}
|
||||
|
||||
func IsPublicAddr(addr netip.Addr) bool {
|
||||
return !(addr.IsPrivate() || addr.IsLoopback() || addr.IsMulticast() || addr.IsGlobalUnicast() || addr.IsLinkLocalUnicast() || addr.IsInterfaceLocalMulticast())
|
||||
return !(addr.IsPrivate() || addr.IsLoopback() || addr.IsMulticast() || addr.IsLinkLocalUnicast() || addr.IsInterfaceLocalMulticast())
|
||||
}
|
||||
|
||||
func LocalPublicAddrs() ([]netip.Addr, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue