replace some IPs with a single subnet check

This commit is contained in:
Connor Olding 2020-09-03 15:02:59 +02:00
parent 989304a7e9
commit db9eb0236b
2 changed files with 3 additions and 74 deletions

View file

@ -19,6 +19,9 @@ def detect_gfw(r, ip, check):
if rs("69.171.") and not rs("69.171.250."):
return True
if rs("108.160."):
return True
if r in gfw_ips:
return True

View file

@ -226,80 +226,6 @@ gfw_ips = {
"104.244.46.244",
"104.244.46.246",
"107.181.166.244",
"108.160.161.20",
"108.160.161.83",
"108.160.162.31",
"108.160.162.98",
"108.160.162.102",
"108.160.162.104",
"108.160.162.109",
"108.160.162.115",
"108.160.163.102",
"108.160.163.106",
"108.160.163.108",
"108.160.163.112",
"108.160.163.116",
"108.160.163.117",
"108.160.165.8",
"108.160.165.9",
"108.160.165.11",
"108.160.165.48",
"108.160.165.53",
"108.160.165.55",
"108.160.165.62",
"108.160.165.139",
"108.160.165.141",
"108.160.165.147",
"108.160.165.173",
"108.160.165.189",
"108.160.165.211",
"108.160.165.212",
"108.160.166.9",
"108.160.166.42",
"108.160.166.49",
"108.160.166.57",
"108.160.166.61",
"108.160.166.62",
"108.160.166.137",
"108.160.166.142",
"108.160.166.148",
"108.160.166.253",
"108.160.167.30",
"108.160.167.147",
"108.160.167.148",
"108.160.167.156",
"108.160.167.158",
"108.160.167.159",
"108.160.167.165",
"108.160.167.167",
"108.160.167.174",
"108.160.169.37",
"108.160.169.46",
"108.160.169.54",
"108.160.169.55",
"108.160.169.171",
"108.160.169.174",
"108.160.169.175",
"108.160.169.178",
"108.160.169.179",
"108.160.169.181",
"108.160.169.185",
"108.160.169.186",
"108.160.170.26",
"108.160.170.33",
"108.160.170.39",
"108.160.170.41",
"108.160.170.43",
"108.160.170.44",
"108.160.170.45",
"108.160.170.51",
"108.160.170.52",
"108.160.172.1",
"108.160.172.200",
"108.160.172.204",
"108.160.172.208",
"108.160.172.232",
"108.160.173.207",
"111.243.214.169",
"114.43.24.59",
"115.126.100.160",