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