fix: Vmess auto/none cipher parsed incorrectly

This commit is contained in:
Peng-YM
2022-07-11 23:33:06 +08:00
parent b143476e71
commit de892aaa2b
12 changed files with 41 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
import { isPresent, Result } from './utils';
const targetPlatform = 'QX';
export default function QX_Producer() {
@@ -180,7 +181,16 @@ function vmess(proxy) {
const appendIfPresent = result.appendIfPresent.bind(result);
append(`vmess=${proxy.server}:${proxy.port}`);
append(`,method=${proxy.cipher === 'auto' ? 'none' : proxy.cipher}`);
// cipher
let cipher;
if (proxy.cipher === 'auto') {
cipher = 'chacha20-ietf-poly1305';
} else {
cipher = proxy.cipher;
}
append(`,method=${cipher}`);
append(`,password=${proxy.uuid}`);
// obfs