diff --git a/util/latency.go b/util/latency.go index 21fd061..4ac384d 100644 --- a/util/latency.go +++ b/util/latency.go @@ -17,6 +17,10 @@ var ( var FastIpCache = "" func GetFastIP(domain string, port string, enableOutput bool) string { + proxyUrl := GetProxy() + if proxyUrl != nil { + return "api.leo.moe" + } if FastIpCache != "" { return FastIpCache } diff --git a/wshandle/client.go b/wshandle/client.go index c945bf2..2802b45 100644 --- a/wshandle/client.go +++ b/wshandle/client.go @@ -187,9 +187,6 @@ func createWsConn() *WsConn { } else { // 默认配置完成,开始寻找最优 IP fastIp = util.GetFastIP(host, port, true) - if proxyUrl != nil { - fastIp = "api.leo.moe" - } } jwtToken, ua := envToken, []string{"Privileged Client"} err := error(nil)