mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
split host port
This commit is contained in:
parent
b73c0cba22
commit
289f228915
1 changed files with 4 additions and 1 deletions
|
@ -278,7 +278,10 @@ var PrivateIPNetworks = []net.IPNet{
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsLocalIP(ipaddress string) bool {
|
func IsLocalIP(ipaddress string) bool {
|
||||||
if strings.Contains("localhost") {
|
if strings.Contains(ipaddress, "localhost") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if strings.Contains(ipaddress, "fe80") {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
host, _, _ := net.SplitHostPort(ipaddress)
|
host, _, _ := net.SplitHostPort(ipaddress)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue