mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-07 05:38:30 +02:00
Fixed #131
- Added LAN detection in geoip resolver - Updated UI for LAN/loopback request origin rendering
This commit is contained in:
@@ -93,6 +93,10 @@ func MatchIpCIDR(ip string, cidr string) bool {
|
||||
|
||||
// Check if a ip is private IP range
|
||||
func IsPrivateIP(ipStr string) bool {
|
||||
if ipStr == "127.0.0.1" || ipStr == "::1" {
|
||||
//local loopback
|
||||
return true
|
||||
}
|
||||
ip := net.ParseIP(ipStr)
|
||||
if ip == nil {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user