mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 22:19:00 +08:00
Fixed Clash plugin options parse error
This commit is contained in:
parent
f3b780370c
commit
fe5dcd2a1b
@ -116,7 +116,8 @@ if (ENV().isQX) {
|
|||||||
$app.options("/", async (req, res) => {
|
$app.options("/", async (req, res) => {
|
||||||
res.status(200).end();
|
res.status(200).end();
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
;
|
||||||
|
|
||||||
$app.all("/", async (req, res) => {
|
$app.all("/", async (req, res) => {
|
||||||
res.send("Hello from sub-store, made with ❤️ by Peng-YM");
|
res.send("Hello from sub-store, made with ❤️ by Peng-YM");
|
||||||
@ -764,12 +765,12 @@ function ProxyParser(targetPlatform) {
|
|||||||
.replace(/{|}/g, "")
|
.replace(/{|}/g, "")
|
||||||
.replace(/,/g, "\n ");
|
.replace(/,/g, "\n ");
|
||||||
}
|
}
|
||||||
raw = raw
|
raw = raw.replace(/ -\n.*name/g, " - name")
|
||||||
.replace(/ -\n.*name/g, " - name")
|
|
||||||
.replace(/\$|\`/g, "")
|
.replace(/\$|\`/g, "")
|
||||||
.split("proxy-providers:")[0]
|
.split("proxy-providers:")[0]
|
||||||
.split("proxy-groups:")[0]
|
.split("proxy-groups:")[0]
|
||||||
.replace(/\"(name|type|server|port|cipher|password|)\"/g, "$1");
|
.replace(/\"([\w-]+)\"\s*:/g, "$1:")
|
||||||
|
raw = raw.indexOf("proxies:") === -1 ? "proxies:\n" + raw : "proxies:" + raw.split("proxies:")[1]
|
||||||
const proxies = YAML.eval(raw).proxies;
|
const proxies = YAML.eval(raw).proxies;
|
||||||
output = proxies.map((p) => JSON.stringify(p));
|
output = proxies.map((p) => JSON.stringify(p));
|
||||||
} else if (raw.indexOf("ssd://") === 0) {
|
} else if (raw.indexOf("ssd://") === 0) {
|
||||||
|
2
backend/sub-store.min.js
vendored
2
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user