diff --git a/README.md b/README.md index 4651e35dcc..0212798deb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # XX-Net (翻墙VPN) -* 靠谱的翻墙系统 -* 连续7年可靠工作 -* 高速下载,稳定不掉线 +* 可靠稳定的的翻墙系统,已经连续8年可靠提供服务 +* 支持Android/iOS/Windows/Mac/Linux +
-### 主页(客户端下载): [https://xx-net.com](https://xx-net.com) -### 电报群: [https://t.me/xxnetshare](**https://xx-net.com**) +### 官网下载: [https://xx-net.com](https://xx-net.com) +### Telegram: [https://t.me/xxnetshare](https://t.me/xxnetshare) ### Twitter: [https://twitter.com/XXNetDev](https://twitter.com/XXNetDev) ### ###### [中文帮助文档](https://github.com/XX-net/XX-Net/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3)      [English Document](https://github.com/XX-net/XX-Net/wiki/English-Home-Page)      [فارسی صفحه اصلی](https://github.com/XX-net/XX-Net/wiki/Persian-home-page) @@ -15,7 +15,7 @@ ### 最新公告: 2023-01-13 -* 新版 5.0.5,提升稳定性和性能,推荐大家重新下载安装,不要应用内升级。 +* 新版 5.0.6,提升稳定性和性能,4.x.x 的需要重新下载安装,不能应用内升级。 * 免费用户可以无限流量访问google, Wikipedia 和 twitter,但部分地区(比如上海、北京)封锁严重,需要购买套餐才能连接接。 * GAE 模块需要手动开启. 没有绑卡无法工作, 想使用GAE模块请手动启用, 老id需要重新部署。 diff --git a/code/default/update_v5.txt b/code/default/update_v5.txt index 6f9e924c41..f2a226294d 100644 --- a/code/default/update_v5.txt +++ b/code/default/update_v5.txt @@ -6,4 +6,4 @@ https://codeload.github.com/XX-net/XX-Net/zip/5.0.5 8a2f4ee9421517e6f0bdf9d0a9fa 稳定版(Stable): -https://codeload.github.com/XX-net/XX-Net/zip/5.0.1 619630f8819509702f9b765c69636d43cc0801106bc0dd915440276ef167a2a7 +https://codeload.github.com/XX-net/XX-Net/zip/5.0.5 8a2f4ee9421517e6f0bdf9d0a9fadffbbd7e4db11c88ef605559acbf5e0c223c diff --git a/code/default/version.txt b/code/default/version.txt index 25b08bbc78..4d5e5283b9 100644 --- a/code/default/version.txt +++ b/code/default/version.txt @@ -1 +1 @@ -5.0.5 \ No newline at end of file +5.0.6 \ No newline at end of file diff --git a/code/default/x_tunnel/local/front_dispatcher.py b/code/default/x_tunnel/local/front_dispatcher.py index a57aae7003..f3c44f29c1 100644 --- a/code/default/x_tunnel/local/front_dispatcher.py +++ b/code/default/x_tunnel/local/front_dispatcher.py @@ -67,7 +67,11 @@ def init(): def save_cloudflare_domain(domains): - if not domains or not g.config.enable_cloudflare: + if not g.config.enable_cloudflare: + xlog.warn("save_cloudflare_domain but cloudflare front not enabled") + return + + if not domains: xlog.warn("save_cloudflare_domain fail, domains:%s enable:%d", domains, g.config.enable_cloudflare) return diff --git a/code/default/x_tunnel/local/tls_relay_front/ip_manager.py b/code/default/x_tunnel/local/tls_relay_front/ip_manager.py index b9e5f04cd1..4f606ea43e 100644 --- a/code/default/x_tunnel/local/tls_relay_front/ip_manager.py +++ b/code/default/x_tunnel/local/tls_relay_front/ip_manager.py @@ -28,14 +28,19 @@ def get_ip(self): port = self.host_manager.info[ip].get("port", 443) return ip + ":" + str(port) + def split_the_ip(self, ip_str): + ips = ip_str.split(":")[0:-1] + ip = ":".join(ips) + return ip + def report_connect_fail(self, ip_str, reason=""): - ip = ip_str.split(":")[0] + ip = self.split_the_ip(ip_str) self.ip_dict[ip]["fail_times"] += 1 self.ip_dict[ip]["links"] -= 1 self.logger.debug("ip %s connect fail", ip) def update_ip(self, ip_str, handshake_time): - ip = ip_str.split(":")[0] + ip = self.split_the_ip(ip_str) self.ip_dict.setdefault(ip, { "fail_times": 0, "success_times": 0 @@ -44,7 +49,7 @@ def update_ip(self, ip_str, handshake_time): self.logger.debug("ip %s connect success", ip) def ssl_closed(self, ip_str, reason=""): - ip = ip_str.split(":")[0] + ip = self.split_the_ip(ip_str) self.ip_dict[ip]["links"] -= 1 self.logger.debug("ip %s connect closed", ip) diff --git a/code/default/x_tunnel/local/web_control.py b/code/default/x_tunnel/local/web_control.py index eb6eaef504..cd4b33d27a 100644 --- a/code/default/x_tunnel/local/web_control.py +++ b/code/default/x_tunnel/local/web_control.py @@ -247,7 +247,7 @@ def req_token_login_handler(self): data = json.loads(utils.to_str(login_str)) username = data["login_account"] password_hash = data["login_password"] - cloudflare_domains = data["cloudflare_domains"] + cloudflare_domains = data.get("cloudflare_domains") tls_relay = data["tls_relay"] except Exception as e: xlog.warn("token_login except:%r", e) @@ -269,7 +269,7 @@ def req_token_login_handler(self): "reason": "Password format fail" }) - if g.config.update_cloudflare_domains: + if g.config.update_cloudflare_domains and cloudflare_domains: g.http_client.save_cloudflare_domain(cloudflare_domains) if g.tls_relay_front and tls_relay.get("ips"): g.tls_relay_front.set_ips(tls_relay["ips"]) @@ -439,18 +439,18 @@ def is_server_available(server): server = str(self.postvars['server'][0]) server = '' if server == 'auto' else server - promoter = self.postvars.get("promoter", [""])[0] - if promoter != g.promoter: - res, info = proxy_session.call_api("/set_config", { - "account": g.config.login_account, - "password": g.config.login_password, - "promoter": promoter - }) - if not res: - xlog.warn("set_config fail:%s", info) - return self.response_json({"res": "fail", "reason": info}) - else: - g.promoter = promoter + # promoter = self.postvars.get("promoter", [""])[0] + # if promoter != g.promoter: + # res, info = proxy_session.call_api("/set_config", { + # "account": g.config.login_account, + # "password": g.config.login_password, + # "promoter": promoter + # }) + # if not res: + # xlog.warn("set_config fail:%s", info) + # return self.response_json({"res": "fail", "reason": info}) + # else: + # g.promoter = promoter if is_server_available(server): if server != g.config.server_host: