mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 16:09:01 +08:00
feat: 增加了节点字段 1. no-resolve, 可用于跳过域名解析 2. resolved 用来标记域名解析是否成功
This commit is contained in:
parent
905a50c0b9
commit
1e3b4a147a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.97",
|
"version": "2.14.99",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -451,7 +451,9 @@ function ResolveDomainOperator({ provider }) {
|
|||||||
const limit = 15; // more than 20 concurrency may result in surge TCP connection shortage.
|
const limit = 15; // more than 20 concurrency may result in surge TCP connection shortage.
|
||||||
const totalDomain = [
|
const totalDomain = [
|
||||||
...new Set(
|
...new Set(
|
||||||
proxies.filter((p) => !isIP(p.server)).map((c) => c.server),
|
proxies
|
||||||
|
.filter((p) => !isIP(p.server) && !p['no-resolve'])
|
||||||
|
.map((c) => c.server),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
const totalBatch = Math.ceil(totalDomain.length / limit);
|
const totalBatch = Math.ceil(totalDomain.length / limit);
|
||||||
@ -475,8 +477,15 @@ function ResolveDomainOperator({ provider }) {
|
|||||||
}
|
}
|
||||||
await Promise.all(currentBatch);
|
await Promise.all(currentBatch);
|
||||||
}
|
}
|
||||||
proxies.forEach((proxy) => {
|
proxies.forEach((p) => {
|
||||||
proxy.server = results[proxy.server] || proxy.server;
|
if (!p['no-resolve']) {
|
||||||
|
if (results[p.server]) {
|
||||||
|
p.server = results[p.server];
|
||||||
|
p.resolved = true;
|
||||||
|
} else {
|
||||||
|
p.resolved = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return proxies;
|
return proxies;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user