mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 13:49:02 +08:00
fix: 处理预览时子订阅出错的情况
This commit is contained in:
parent
69726cd5c4
commit
d636e1b94c
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.14.115",
|
||||
"version": "2.14.116",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -84,7 +84,8 @@ export default function ShadowRocket_Producer() {
|
||||
} else if (proxy.type === 'hysteria2') {
|
||||
if (
|
||||
proxy['obfs-password'] &&
|
||||
proxy.obfs == 'salamander') {
|
||||
proxy.obfs == 'salamander'
|
||||
) {
|
||||
proxy.obfs = proxy['obfs-password'];
|
||||
delete proxy['obfs-password'];
|
||||
}
|
||||
|
@ -87,9 +87,10 @@ async function compareCollection(req, res) {
|
||||
const collection = req.body;
|
||||
const subnames = collection.subscriptions;
|
||||
const results = {};
|
||||
|
||||
let hasError;
|
||||
await Promise.all(
|
||||
subnames.map(async (name) => {
|
||||
if (!hasError) {
|
||||
const sub = findByName(allSubs, name);
|
||||
try {
|
||||
let raw;
|
||||
@ -133,6 +134,8 @@ async function compareCollection(req, res) {
|
||||
);
|
||||
results[name] = currentProxies;
|
||||
} catch (err) {
|
||||
if (!hasError) {
|
||||
hasError = true;
|
||||
failed(
|
||||
res,
|
||||
new InternalServerError(
|
||||
@ -142,9 +145,11 @@ async function compareCollection(req, res) {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
if (hasError) return;
|
||||
// merge proxies with the original order
|
||||
const original = Array.prototype.concat.apply(
|
||||
[],
|
||||
|
Loading…
x
Reference in New Issue
Block a user