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 6484edb5db
commit 0a31f5d5d7

View File

@ -117,7 +117,14 @@ async function queryIpApi(proxy) {
resolve(cached); resolve(cached);
} }
const url = `http://ip-api.com/json`; 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({ $.http.get({
url, url,
headers, headers,