mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-09-17 08:53:12 +08:00
feat: 优化日志, Loon 解析器自动读取 build
This commit is contained in:
parent
543641de9d
commit
9568f4d6d9
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.19.7",
|
"version": "2.19.8",
|
||||||
"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": {
|
||||||
|
@ -361,10 +361,12 @@ function vless(proxy, includeUnsupportedProxy) {
|
|||||||
['xtls-rprx-vision'].includes(proxy.flow)
|
['xtls-rprx-vision'].includes(proxy.flow)
|
||||||
) {
|
) {
|
||||||
isReality = true;
|
isReality = true;
|
||||||
} else if (proxy['reality-opts'] || proxy.flow) {
|
} else if (proxy['reality-opts']) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`VLESS XTLS/REALITY with flow(${proxy.flow}) is not supported`,
|
`VLESS REALITY with flow(${proxy.flow}) is not supported`,
|
||||||
);
|
);
|
||||||
|
} else if (proxy.flow) {
|
||||||
|
throw new Error(`VLESS XTLS is not supported`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const result = new Result(proxy);
|
const result = new Result(proxy);
|
||||||
@ -416,6 +418,7 @@ function vless(proxy, includeUnsupportedProxy) {
|
|||||||
|
|
||||||
// sni
|
// sni
|
||||||
if (isReality) {
|
if (isReality) {
|
||||||
|
result.appendIfPresent(`,flow=${proxy.flow}`, 'flow');
|
||||||
result.appendIfPresent(`,sni=${proxy.sni}`, 'sni');
|
result.appendIfPresent(`,sni=${proxy.sni}`, 'sni');
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,public-key="${proxy['reality-opts']['public-key']}"`,
|
`,public-key="${proxy['reality-opts']['public-key']}"`,
|
||||||
|
@ -14,10 +14,12 @@ let resourceUrl = typeof $resourceUrl !== 'undefined' ? $resourceUrl : '';
|
|||||||
`
|
`
|
||||||
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
|
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
|
||||||
Sub-Store -- v${version}
|
Sub-Store -- v${version}
|
||||||
|
Loon -- ${$loon}
|
||||||
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
|
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
|
||||||
`,
|
`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const build = $loon.match(/\((\d+)\)$/)?.[1];
|
||||||
let arg;
|
let arg;
|
||||||
if (typeof $argument != 'undefined') {
|
if (typeof $argument != 'undefined') {
|
||||||
arg = Object.fromEntries(
|
arg = Object.fromEntries(
|
||||||
@ -38,7 +40,8 @@ let resourceUrl = typeof $resourceUrl !== 'undefined' ? $resourceUrl : '';
|
|||||||
try {
|
try {
|
||||||
let proxies = ProxyUtils.parse(resource);
|
let proxies = ProxyUtils.parse(resource);
|
||||||
result = ProxyUtils.produce(proxies, 'Loon', undefined, {
|
result = ProxyUtils.produce(proxies, 'Loon', undefined, {
|
||||||
'include-unsupported-proxy': arg?.includeUnsupportedProxy,
|
'include-unsupported-proxy':
|
||||||
|
arg?.includeUnsupportedProxy || build >= 838,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('解析器: 使用 resource 出现错误');
|
console.log('解析器: 使用 resource 出现错误');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user