mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-12 01:49:01 +08:00
Fixed QX vmess method auto
This commit is contained in:
parent
4b73a1494b
commit
1b526414cd
4
backend/dist/sub-store-parser.loon.min.js
vendored
4
backend/dist/sub-store-parser.loon.min.js
vendored
File diff suppressed because one or more lines are too long
@ -110,7 +110,10 @@ port = digits:[0-9]+ {
|
||||
throw new Error("Invalid port number: " + port);
|
||||
}
|
||||
|
||||
method = comma cipher:cipher { proxy.cipher = cipher; }
|
||||
method = comma cipher:cipher {
|
||||
if (cipher !== 'none') proxy.cipher = cipher;
|
||||
else proxy.cipher = 'auto';
|
||||
}
|
||||
cipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");
|
||||
|
||||
username = & {
|
||||
|
@ -108,7 +108,10 @@ port = digits:[0-9]+ {
|
||||
throw new Error("Invalid port number: " + port);
|
||||
}
|
||||
|
||||
method = comma cipher:cipher { proxy.cipher = cipher; }
|
||||
method = comma cipher:cipher {
|
||||
if (cipher !== 'none') proxy.cipher = cipher;
|
||||
else proxy.cipher = 'auto';
|
||||
}
|
||||
cipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");
|
||||
|
||||
username = & {
|
||||
|
@ -134,7 +134,10 @@ username = comma "username" equals username:[^=,]+ { proxy.username = username.j
|
||||
password = comma "password" equals password:[^=,]+ { proxy.password = password.join("").trim(); }
|
||||
uuid = comma "password" equals uuid:[^=,]+ { proxy.uuid = uuid.join("").trim(); }
|
||||
|
||||
method = comma "method" equals cipher:cipher { proxy.cipher = cipher };
|
||||
method = comma "method" equals cipher:cipher {
|
||||
if (cipher !== 'none') proxy.cipher = cipher;
|
||||
else proxy.cipher = 'auto';
|
||||
};
|
||||
cipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");
|
||||
aead = comma "aead" equals flag:bool { proxy.alterId = 0; }
|
||||
|
||||
|
@ -132,7 +132,10 @@ username = comma "username" equals username:[^=,]+ { proxy.username = username.j
|
||||
password = comma "password" equals password:[^=,]+ { proxy.password = password.join("").trim(); }
|
||||
uuid = comma "password" equals uuid:[^=,]+ { proxy.uuid = uuid.join("").trim(); }
|
||||
|
||||
method = comma "method" equals cipher:cipher { proxy.cipher = cipher };
|
||||
method = comma "method" equals cipher:cipher {
|
||||
if (cipher !== 'none') proxy.cipher = cipher;
|
||||
else proxy.cipher = 'auto';
|
||||
};
|
||||
cipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");
|
||||
aead = comma "aead" equals flag:bool { proxy.alterId = 0; }
|
||||
|
||||
|
@ -146,7 +146,8 @@ vmess_uuid = comma "username" equals match:[^,]+ { proxy.uuid = match.join("");
|
||||
vmess_aead = comma "vmess-aead" equals flag:bool { proxy.alterId = 0; }
|
||||
|
||||
method = comma "encrypt-method" equals cipher:cipher {
|
||||
proxy.cipher = cipher;
|
||||
if (cipher !== 'none') proxy.cipher = cipher;
|
||||
else proxy.cipher = 'auto';
|
||||
}
|
||||
cipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");
|
||||
|
||||
|
@ -144,7 +144,8 @@ vmess_uuid = comma "username" equals match:[^,]+ { proxy.uuid = match.join("");
|
||||
vmess_aead = comma "vmess-aead" equals flag:bool { proxy.alterId = 0; }
|
||||
|
||||
method = comma "encrypt-method" equals cipher:cipher {
|
||||
proxy.cipher = cipher;
|
||||
if (cipher !== 'none') proxy.cipher = cipher;
|
||||
else proxy.cipher = 'auto';
|
||||
}
|
||||
cipher = ("aes-128-gcm"/"aes-192-gcm"/"aes-256-gcm"/"aes-128-cfb"/"aes-192-cfb"/"aes-256-cfb"/"aes-128-ctr"/"aes-192-ctr"/"aes-256-ctr"/"rc4-md5"/"chacha20-ietf-poly1305"/"chacha20-ietf"/"chacha20-poly1305"/"chacha20"/"none");
|
||||
|
||||
|
@ -154,7 +154,12 @@ function vmess(proxy) {
|
||||
const appendIfPresent = result.appendIfPresent.bind(result);
|
||||
|
||||
append(`vmess=${proxy.server}:${proxy.port}`);
|
||||
append(`,method=${proxy.cipher}`);
|
||||
if (proxy.cipher === 'auto') {
|
||||
append(`,method=none`);
|
||||
} else {
|
||||
append(`,method=${proxy.cipher}`);
|
||||
}
|
||||
|
||||
append(`,password=${proxy.uuid}`);
|
||||
|
||||
// obfs
|
||||
|
4
backend/sub-store.min.js
vendored
4
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