From ed122eec985af2da75bd731f769bf0523196aaf8 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 5 Oct 2022 00:03:41 +0800 Subject: [PATCH] fix: command format of v2ray v5 --- Builder/VMess.py | 2 +- Tester/VMess.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Builder/VMess.py b/Builder/VMess.py index 68340b7..55f40aa 100644 --- a/Builder/VMess.py +++ b/Builder/VMess.py @@ -26,4 +26,4 @@ def load(proxyInfo: dict, socksInfo: dict, configFile: str) -> tuple[list, str, 'streamSettings': V2ray.loadStream(proxyInfo['stream']) } vmessConfig = V2ray.loadConfig(socksInfo, outboundConfig) # load config file for v2ray-core - return ['v2ray', '-c', configFile], json.dumps(vmessConfig), {} # command, fileContent, envVar + return ['v2ray', 'run', '-c', configFile], json.dumps(vmessConfig), {} # command, fileContent, envVar diff --git a/Tester/VMess.py b/Tester/VMess.py index 20daa92..31e0588 100644 --- a/Tester/VMess.py +++ b/Tester/VMess.py @@ -27,7 +27,7 @@ def loadServer(configFile: str, proxyInfo: dict, streamConfig: dict) -> Process: 'streamSettings': streamConfig }) serverFile = os.path.join(Settings['workDir'], configFile) - return Process(Settings['workDir'], cmd = ['v2ray', '-c', serverFile], file = { + return Process(Settings['workDir'], cmd = ['v2ray', 'run', '-c', serverFile], file = { 'path': serverFile, 'content': json.dumps(vmessConfig) }, env = { @@ -75,7 +75,7 @@ def loadTest(method: str, aid: int, stream: dict) -> dict: def load(): streams = V2ray.loadStream() # load v2ray-core stream list - for method, aid in itertools.product(vmessMethods, [0, 64]): # test every methods (and whether enable aead) + for method, aid in itertools.product(vmessMethods, [0, 64]): # test every method (and whether enable aead) yield loadTest(method, aid, streams[0]) for stream in streams[1:]: # skip first stream that has benn checked yield loadTest('auto', 0, stream) # aead with auto security