From 097b8a9c96748a4f36c1890c6e03db1f0de854ce Mon Sep 17 00:00:00 2001 From: Micheal X Date: Mon, 25 Sep 2023 19:52:57 +1300 Subject: [PATCH] 5.7.4 fix seley bug. --- code/default/version.txt | 2 +- code/default/x_tunnel/local/front_dispatcher.py | 2 +- code/default/x_tunnel/local/proxy_session.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/default/version.txt b/code/default/version.txt index 23900d674d..4b1e48ed97 100644 --- a/code/default/version.txt +++ b/code/default/version.txt @@ -1 +1 @@ -5.7.3 \ No newline at end of file +5.7.4 \ 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 77c6c2dc4c..6ed2807b56 100644 --- a/code/default/x_tunnel/local/front_dispatcher.py +++ b/code/default/x_tunnel/local/front_dispatcher.py @@ -114,7 +114,7 @@ def get_front(host, timeout): dispatcher = front.get_dispatcher(host) if not dispatcher: - xlog.warn("get dispatcher from %s fail for %s", front.name, host) + # xlog.warn("get dispatcher from %s fail for %s", front.name, host) continue score = dispatcher.get_score() diff --git a/code/default/x_tunnel/local/proxy_session.py b/code/default/x_tunnel/local/proxy_session.py index 7e23423ace..00087f955b 100644 --- a/code/default/x_tunnel/local/proxy_session.py +++ b/code/default/x_tunnel/local/proxy_session.py @@ -1086,8 +1086,11 @@ def request_balance(account=None, password=None, is_register=False, update_serve g.openai_balance = info["openai_balance"] g.openai_proxies = info["openai_proxies"] g.tls_relays = info["tls_relays"] - if g.tls_relay_front and g.tls_relays.get("ips"): + seleys = info.get("seleys", {}) + if g.tls_relay_front: g.tls_relay_front.set_ips(g.tls_relays["ips"]) + if g.seley_front: + g.seley_front.set_hosts(seleys.get("hosts", {})) xlog.info("request_balance host:%s port:%d balance:%f quota:%f", g.server_host, g.server_port, g.balance, g.quota) return True, "success"