From 07e1a0f0976c31bc18b8fe17d31e49474bb6e688 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Wed, 7 Sep 2022 17:55:11 +0800 Subject: [PATCH] update: change Test as Tester --- Tester/Brook.py | 2 +- Tester/Hysteria.py | 2 +- Tester/Plugin.py | 2 +- Tester/Shadowsocks.py | 2 +- Tester/ShadowsocksR.py | 2 +- Tester/Trojan.py | 2 +- Tester/TrojanGo.py | 2 +- Tester/V2ray.py | 2 +- Tester/VLESS.py | 2 +- Tester/VMess.py | 2 +- Tester/Xray.py | 2 +- Utils/{Test.py => Tester.py} | 4 ++-- main.py | 4 ++-- 13 files changed, 15 insertions(+), 15 deletions(-) rename Utils/{Test.py => Tester.py} (96%) diff --git a/Tester/Brook.py b/Tester/Brook.py index 3910f79..801aadf 100644 --- a/Tester/Brook.py +++ b/Tester/Brook.py @@ -5,7 +5,7 @@ import copy import itertools from Builder import Brook from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Common import hostFormat, genFlag, getAvailablePort diff --git a/Tester/Hysteria.py b/Tester/Hysteria.py index a1f493e..475d6d7 100644 --- a/Tester/Hysteria.py +++ b/Tester/Hysteria.py @@ -6,7 +6,7 @@ import json import itertools from Builder import Hysteria from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Constant import hysteriaProtocols from Utils.Common import hostFormat, genFlag, getAvailablePort diff --git a/Tester/Plugin.py b/Tester/Plugin.py index 7907ac6..e04abb8 100644 --- a/Tester/Plugin.py +++ b/Tester/Plugin.py @@ -5,7 +5,7 @@ import os import re import json from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Constant import Plugins from Utils.Common import genFlag, hostFormat, getAvailablePort diff --git a/Tester/Shadowsocks.py b/Tester/Shadowsocks.py index 846a513..066d17c 100644 --- a/Tester/Shadowsocks.py +++ b/Tester/Shadowsocks.py @@ -8,7 +8,7 @@ import itertools from Tester import Plugin from Builder import Shadowsocks from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Common import md5Sum, genFlag, getAvailablePort from Utils.Constant import PathEnv, ssMethods, ssAllMethods, mbedtlsMethods diff --git a/Tester/ShadowsocksR.py b/Tester/ShadowsocksR.py index 38d8851..c3f5ab4 100644 --- a/Tester/ShadowsocksR.py +++ b/Tester/ShadowsocksR.py @@ -5,7 +5,7 @@ import os import json from Builder import ShadowsocksR from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Common import genFlag, getAvailablePort from Utils.Constant import ssrMethods, ssrProtocols, ssrObfuscations diff --git a/Tester/Trojan.py b/Tester/Trojan.py index a1b4602..6d102a7 100644 --- a/Tester/Trojan.py +++ b/Tester/Trojan.py @@ -6,7 +6,7 @@ import json from Tester import Xray from Builder import Trojan from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Constant import xtlsFlows from Utils.Common import md5Sum, genFlag, getAvailablePort diff --git a/Tester/TrojanGo.py b/Tester/TrojanGo.py index 18dbf50..d961c65 100644 --- a/Tester/TrojanGo.py +++ b/Tester/TrojanGo.py @@ -6,7 +6,7 @@ import json from Tester import Plugin from Builder import TrojanGo from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Constant import trojanGoMethods from Utils.Common import md5Sum, genFlag, getAvailablePort diff --git a/Tester/V2ray.py b/Tester/V2ray.py index c4a8617..16d0dc7 100644 --- a/Tester/V2ray.py +++ b/Tester/V2ray.py @@ -3,8 +3,8 @@ import copy import itertools -from Utils.Test import Settings from Utils.Common import genFlag +from Utils.Tester import Settings from Utils.Constant import quicMethods, udpObfuscations httpConfig = { diff --git a/Tester/VLESS.py b/Tester/VLESS.py index f39c431..880695c 100644 --- a/Tester/VLESS.py +++ b/Tester/VLESS.py @@ -6,7 +6,7 @@ import json from Tester import Xray from Builder import VLESS from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Constant import xtlsFlows from Utils.Common import md5Sum, genUUID, getAvailablePort diff --git a/Tester/VMess.py b/Tester/VMess.py index 8d9af17..20daa92 100644 --- a/Tester/VMess.py +++ b/Tester/VMess.py @@ -7,7 +7,7 @@ import itertools from Tester import V2ray from Builder import VMess from Utils.Logger import logger -from Utils.Test import Settings +from Utils.Tester import Settings from Utils.Process import Process from Utils.Constant import PathEnv, vmessMethods from Utils.Common import md5Sum, genUUID, getAvailablePort diff --git a/Tester/Xray.py b/Tester/Xray.py index abd167b..544994e 100644 --- a/Tester/Xray.py +++ b/Tester/Xray.py @@ -4,8 +4,8 @@ import copy import itertools from Tester import V2ray -from Utils.Test import Settings from Utils.Common import genFlag +from Utils.Tester import Settings from Utils.Constant import xtlsFlows, quicMethods, udpObfuscations loadConfig = V2ray.loadConfig diff --git a/Utils/Test.py b/Utils/Tester.py similarity index 96% rename from Utils/Test.py rename to Utils/Tester.py index 6c7c071..31c9ffd 100644 --- a/Utils/Test.py +++ b/Utils/Tester.py @@ -119,7 +119,7 @@ def runTest(testInfo: dict, testUrl: str, testSelect: set or None, delay: int = testInfo['client'].quit() testInfo['server'].quit() logger.warning('[%s] Client info' % testId) - logger.error('[%(id)s-server]\n▲ CMD => %(cmd)s\n▲ ENV => %(env)s\n▲ FILE => %(file)s\n%(output)s' % { + logger.error('[%(id)s-server]\n⬤ CMD => %(cmd)s\n⬤ ENV => %(env)s\n⬤ FILE => %(file)s\n%(output)s' % { 'id': testId, 'cmd': testInfo['client'].cmd, 'env': testInfo['client'].env, @@ -127,7 +127,7 @@ def runTest(testInfo: dict, testUrl: str, testSelect: set or None, delay: int = 'output': '-' * 96 + '\n' + testInfo['client'].output + '-' * 96, }) logger.warning('[%s] Server info' % testId) - logger.error('[%(id)s-client]\n▲ CMD => %(cmd)s\n▲ ENV => %(env)s\n▲ FILE => %(file)s\n%(output)s' % { + logger.error('[%(id)s-client]\n⬤ CMD => %(cmd)s\n⬤ ENV => %(env)s\n⬤ FILE => %(file)s\n%(output)s' % { 'id': testId, 'cmd': testInfo['server'].cmd, 'env': testInfo['server'].env, diff --git a/main.py b/main.py index c1f7470..61ab223 100755 --- a/main.py +++ b/main.py @@ -51,7 +51,7 @@ if len(inputArgs) != 0 and inputArgs[0].lower() == 'test': # test mode else: mainArgs = mainArgParse(inputArgs) if mainArgs.version: # output version and exit - print('ProxyC version -> %s' % Constant.Version) + print('ProxyC version %s' % Constant.Version) sys.exit(0) Constant.LogLevel = mainArgs.log # overwrite global options Constant.DnsServer = mainArgs.dns @@ -67,7 +67,7 @@ from Utils.Check import Check from Utils import DnsProxy from Utils.Logger import logger from Utils.Manager import Manager -from Utils.Test import Test, loadBind, loadCert +from Utils.Tester import Test, loadBind, loadCert from concurrent.futures import ThreadPoolExecutor