Skip to content

Commit

Permalink
5.13.2 release, improve smart route.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-X-Net committed Dec 20, 2024
1 parent 90defa4 commit b2599c3
Show file tree
Hide file tree
Showing 22 changed files with 838 additions and 211 deletions.
352 changes: 295 additions & 57 deletions code/default/gae_proxy/local/ip_range.txt
Original file line number Diff line number Diff line change
@@ -1,57 +1,295 @@
64.233.160.0-64.233.171.255
64.233.176.0-64.233.191.255
66.102.1.0-66.102.1.255
74.125.20.0-74.125.21.255
74.125.23.0-74.125.24.255
74.125.26.0-74.125.26.255
74.125.28.0-74.125.28.255
74.125.30.0-74.125.31.255
74.125.68.0-74.125.71.255
74.125.90.0-74.125.90.255
74.125.124.0-74.125.124.255
74.125.126.0-74.125.136.255
74.125.138.0-74.125.143.255
74.125.192.0-74.125.193.255
74.125.195.0-74.125.197.255
74.125.199.0-74.125.206.255
103.47.153.0-103.47.153.255
104.199.185.0-104.199.185.255
108.177.8.0-108.177.15.255
108.177.96.0-108.177.98.255
108.177.103.0-108.177.104.255
108.177.111.0-108.177.112.255
108.177.119.0-108.177.122.255
108.177.125.0-108.177.127.255
142.250.4.0-142.250.4.255
142.250.8.0-142.250.9.255
172.217.0.0-172.217.31.255
172.217.160.0-172.217.172.255
172.217.174.0-172.217.175.255
172.217.192.0-172.217.195.255
172.217.197.0-172.217.197.255
172.217.203.0-172.217.204.255
172.217.212.0-172.217.212.255
172.217.214.0-172.217.215.255
172.217.218.0-172.217.219.255
172.217.222.0-172.217.222.255
172.253.58.0-172.253.58.255
172.253.62.0-172.253.62.255
172.253.112.0-172.253.113.255
172.253.115.0-172.253.118.255
172.253.120.0-172.253.120.255
172.253.122.0-172.253.123.255
172.253.126.0-172.253.127.255
173.194.66.0-173.194.70.255
173.194.73.0-173.194.74.255
173.194.76.0-173.194.79.255
173.194.175.0-173.194.175.255
173.194.192.0-173.194.208.255
173.194.210.0-173.194.223.255
209.85.144.0-209.85.147.255
209.85.200.0-209.85.203.255
209.85.232.0-209.85.235.255
216.58.192.0-216.58.215.255
216.58.217.0-216.58.217.255
216.58.220.0-216.58.223.255
216.239.36.0-216.239.36.255
216.239.38.0-216.239.38.255
8.8.4.0/24
8.8.8.0/24
8.35.200.0/21
34.0.228.0/22
34.0.232.0/21
34.1.64.0/18
34.2.32.0/19
34.2.64.0/18
34.2.128.0/17
34.3.0.0/23
34.3.3.0/24
34.3.4.0/24
34.3.8.0/21
34.3.16.0/20
34.3.32.0/19
34.3.64.0/18
34.4.0.0/14
34.13.64.0/22
34.13.72.0/21
34.13.80.0/20
34.13.96.0/19
34.14.128.0/17
34.15.0.0/16
34.34.192.0/20
34.34.208.0/21
34.34.224.0/19
34.43.0.0/16
34.50.128.0/19
34.52.0.0/17
34.64.0.0/19
34.96.0.0/18
34.98.0.0/18
34.98.136.0/21
34.98.144.0/20
34.98.160.0/19
34.98.192.0/18
34.99.0.0/16
34.100.0.0/17
34.101.0.0/20
34.101.16.0/23
34.101.19.0/24
34.101.28.0/22
34.103.0.0/16
34.104.0.0/20
34.104.16.0/21
34.104.24.0/23
34.104.26.0/24
34.104.28.0/22
34.104.32.0/20
34.104.48.0/24
34.104.53.0/24
34.104.54.0/23
34.109.0.0/16
34.110.0.0/17
34.113.0.0/16
34.114.0.0/15
34.116.8.0/21
34.116.16.0/20
34.116.32.0/19
34.118.208.0/20
34.118.224.0/20
34.119.0.0/16
34.124.64.0/19
34.124.96.0/20
34.126.0.0/18
34.126.224.0/19
34.127.128.0/19
34.127.160.0/20
34.127.176.0/24
34.127.181.0/24
34.127.182.0/23
34.127.192.0/18
34.128.0.0/19
34.128.38.0/23
34.128.40.0/23
34.128.50.0/23
34.128.56.0/23
34.128.192.0/18
34.143.0.0/17
34.144.0.0/17
34.144.128.0/18
34.152.70.0/23
34.152.82.0/23
34.152.88.0/21
34.152.96.0/19
34.152.128.0/17
34.153.0.0/19
34.153.34.0/23
34.153.36.0/23
34.153.39.0/24
34.153.56.0/23
34.153.60.0/22
34.153.64.0/18
34.153.192.0/19
34.153.226.0/23
34.153.228.0/23
34.153.231.0/24
34.153.248.0/23
34.153.252.0/22
34.156.0.0/16
34.157.10.0/23
34.157.86.0/24
34.157.120.0/24
34.157.122.0/23
34.157.138.0/23
34.157.214.0/24
34.157.218.0/23
34.157.248.0/24
34.158.0.0/16
34.167.0.0/16
34.177.0.0/19
34.177.38.0/23
34.177.56.0/21
34.177.64.0/18
34.177.128.0/17
34.178.0.0/16
34.180.0.0/16
34.183.0.0/16
34.184.0.0/13
35.187.128.0/20
35.190.96.0/20
35.190.240.0/20
35.191.0.0/16
35.199.128.0/20
35.201.32.0/21
35.201.40.0/24
35.201.42.0/23
35.201.44.0/22
35.201.48.0/20
35.203.192.0/20
35.203.208.0/23
35.203.220.0/22
35.203.224.0/21
35.203.240.0/20
35.206.0.0/21
35.206.8.0/23
35.206.12.0/22
35.206.16.0/20
35.218.0.0/16
35.219.192.0/19
35.220.28.0/23
35.220.30.0/24
35.229.0.0/20
35.230.192.0/19
35.230.224.0/20
35.235.128.0/18
35.235.192.0/20
35.235.208.0/21
35.235.224.0/19
35.242.28.0/23
35.242.30.0/24
35.243.16.0/20
35.243.48.0/21
57.140.192.0/18
64.15.112.0/20
64.233.160.0/19
66.22.228.0/23
66.102.0.0/20
66.249.64.0/19
70.32.128.0/19
72.14.192.0/18
74.125.0.0/16
104.154.0.0/20
104.154.112.0/24
104.154.122.0/23
104.154.124.0/22
104.155.240.0/20
104.196.64.0/24
104.196.72.0/21
104.196.80.0/20
104.199.64.0/23
104.199.240.0/23
104.237.160.0/19
107.178.192.0/20
107.178.224.0/20
108.170.192.0/18
108.177.0.0/17
130.211.0.0/22
136.22.160.0/20
136.22.176.0/21
136.22.184.0/23
136.22.186.0/24
136.124.0.0/15
142.250.0.0/15
146.148.0.0/23
152.65.208.0/22
152.65.214.0/23
152.65.218.0/23
152.65.222.0/23
152.65.224.0/19
162.120.128.0/17
172.110.32.0/21
172.217.0.0/16
172.253.0.0/16
173.194.0.0/16
192.178.0.0/15
193.186.4.0/24
199.36.154.0/23
199.36.156.0/24
199.192.112.0/23
199.192.114.0/24
199.223.237.0/24
199.223.238.0/23
207.223.160.0/20
208.65.152.0/22
208.68.108.0/22
208.81.188.0/22
208.117.224.0/19
209.85.128.0/17
216.58.192.0/19
216.73.80.0/20
216.239.32.0/19
2001:4860::/32
2404:6800::/32
2404:f340::/32
2600:1900::/34
2600:1900:4100::/43
2600:1900:4130::/44
2600:1900:4190::/44
2600:1900:41f0::/44
2600:1900:4200::/41
2600:1900:42b0::/44
2600:1900:42c0::/42
2600:1900:4300::/40
2600:1900:4400::/38
2600:1900:4800::/37
2600:1900:5000::/38
2600:1900:5410::/44
2600:1900:5420::/43
2600:1900:5440::/42
2600:1900:5480::/41
2600:1900:5500::/40
2600:1900:5600::/39
2600:1900:5800::/37
2600:1900:6000::/35
2600:1900:8010::/44
2600:1900:8020::/43
2600:1900:8040::/42
2600:1900:8080::/41
2600:1900:8100::/40
2600:1900:8200::/39
2600:1900:8400::/38
2600:1900:8800::/37
2600:1900:9000::/36
2600:1900:a000::/35
2600:1900:c000::/34
2600:1901:1::/48
2600:1901:2::/47
2600:1901:4::/46
2600:1901:8::/45
2600:1901:10::/44
2600:1901:20::/43
2600:1901:40::/42
2600:1901:80::/41
2600:1901:100::/40
2600:1901:200::/39
2600:1901:400::/38
2600:1901:800::/37
2600:1901:1000::/36
2600:1901:2000::/35
2600:1901:4000::/44
2600:1901:4020::/43
2600:1901:4040::/42
2600:1901:4080::/41
2600:1901:4100::/40
2600:1901:4200::/39
2600:1901:4400::/38
2600:1901:4800::/37
2600:1901:5000::/36
2600:1901:6000::/35
2600:1901:8000::/40
2600:1901:8190::/44
2600:1901:81a0::/44
2600:1901:81d0::/44
2600:1901:81e0::/44
2600:1901:8200::/39
2600:1901:8400::/38
2600:1901:8800::/37
2600:1901:9000::/36
2600:1901:a000::/35
2600:1901:c000::/34
2600:1902::/31
2600:1904::/30
2600:1908::/29
2605:ef80::/32
2606:40::/32
2606:73c0::/32
2607:1c0:241:40::/60
2607:1c0:300::/40
2607:f8b0::/32
2620:11a:a000::/40
2620:120:e000::/40
2800:3f0::/32
2a00:1450::/32
2c0f:fb50::/32
15 changes: 9 additions & 6 deletions code/default/lib/noarch/front_base/connect_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@ def _connect_thread(self, sleep_time=0):

def _connect_process(self):
try:
ip_str, sni, host = self.ip_manager.get_ip_sni_host()
if not ip_str:
host_info = self.ip_manager.get_ip_sni_host()
if not host_info:
self.no_ip_time = time.time()
with self.no_ip_lock:
# self.logger.warning("not enough ip")
time.sleep(10)
return None

# self.logger.debug("create ssl conn %s", ip_str)
ssl_sock = self._create_ssl_connection(ip_str, sni, host)
ssl_sock = self._create_ssl_connection(host_info)
if not ssl_sock:
time.sleep(1)
return None
Expand All @@ -310,10 +310,12 @@ def _connect_ssl(self, ip_str, sni, host, close_cb, queue):
self.logger.warn("_connect_ssl %s sni:%s host:%s fail:%r", ip_str, sni, host, e)
queue.put(e)

def _create_ssl_connection(self, ip_str, sni, host):
try:
# ssl_sock = self.connect_creator.connect_ssl(ip_str, sni, host, close_cb=self.ip_manager.ssl_closed)
def _create_ssl_connection(self, host_info):
ip_str = host_info["ip_str"]
sni = host_info["sni"]
host = host_info["host"]

try:
q = Queue()
fn_args = (ip_str, sni, host, self.ip_manager.ssl_closed, q)
t = threading.Thread(target=self._connect_ssl, args=fn_args, name="connect_ssl_%s" % ip_str)
Expand All @@ -330,6 +332,7 @@ def _create_ssl_connection(self, ip_str, sni, host):
self.ip_manager.update_ip(ip_str, sni, ssl_sock.handshake_time)
self.logger.debug("create_ssl update ip:%s time:%d h2:%d sni:%s, host:%s",
ip_str, ssl_sock.handshake_time, ssl_sock.h2, ssl_sock.sni, ssl_sock.host)
ssl_sock.host_info = host_info

return ssl_sock
except socket.error as e:
Expand Down
Loading

0 comments on commit b2599c3

Please sign in to comment.