mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 14:29:03 +08:00
fix: 兼容不规范的 VLESS URI
This commit is contained in:
parent
c3e5da7ee4
commit
c585785c50
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.221",
|
"version": "2.14.222",
|
||||||
"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": {
|
||||||
|
@ -273,11 +273,17 @@ function URI_VMess() {
|
|||||||
params.port = port;
|
params.port = port;
|
||||||
params.add = server;
|
params.add = server;
|
||||||
}
|
}
|
||||||
|
const server = params.add;
|
||||||
|
const port = parseInt(getIfPresent(params.port), 10);
|
||||||
const proxy = {
|
const proxy = {
|
||||||
name: params.ps ?? params.remarks,
|
name:
|
||||||
|
params.ps ??
|
||||||
|
params.remarks ??
|
||||||
|
params.remark ??
|
||||||
|
`VMess ${server}:${port}`,
|
||||||
type: 'vmess',
|
type: 'vmess',
|
||||||
server: params.add,
|
server,
|
||||||
port: parseInt(getIfPresent(params.port), 10),
|
port,
|
||||||
cipher: getIfPresent(params.scy, 'auto'),
|
cipher: getIfPresent(params.scy, 'auto'),
|
||||||
uuid: params.id,
|
uuid: params.id,
|
||||||
alterId: parseInt(
|
alterId: parseInt(
|
||||||
@ -399,7 +405,11 @@ function URI_VLESS() {
|
|||||||
params[key] = value;
|
params[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy.name = name ?? params.remarks ?? `VLESS ${server}:${port}`;
|
proxy.name =
|
||||||
|
name ??
|
||||||
|
params.remarks ??
|
||||||
|
params.remark ??
|
||||||
|
`VLESS ${server}:${port}`;
|
||||||
|
|
||||||
proxy.tls = params.security && params.security !== 'none';
|
proxy.tls = params.security && params.security !== 'none';
|
||||||
if (isShadowrocket && /TRUE|1/i.test(params.tls)) {
|
if (isShadowrocket && /TRUE|1/i.test(params.tls)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user