fix: ip-flag does not work on Loon

The node parameter should not include proxy name
This commit is contained in:
Peng-YM
2022-08-12 00:00:11 +08:00
parent 70fbb79d7b
commit 164a9cb635

View File

@@ -117,7 +117,14 @@ async function queryIpApi(proxy) {
resolve(cached);
}
const url = `http://ip-api.com/json`;
const node = ProxyUtils.produce([proxy], target);
let node = ProxyUtils.produce([proxy], target);
// Loon 需要去掉节点名字
if (isLoon) {
const s = node.indexOf("=");
node = node.substring(s + 1);
}
$.http.get({
url,
headers,