Don't detect cjdns ips as private ips

This commit is contained in:
shortcutme 2019-01-26 20:31:05 +01:00
parent 43d2d5334a
commit 88ba0c1154
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import gevent
if "inet_pton" not in dir(socket):
import win_inet_pton
from Config import config
@ -248,7 +249,7 @@ def isIp(ip):
return False
local_ip_pattern = re.compile(r"^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|([fF][cCdD])")
local_ip_pattern = re.compile(r"^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|fe80")
def isPrivateIp(ip):
return local_ip_pattern.match(ip)