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