Browse Source

update: change Test as Tester

dev
dnomd343 2 years ago
parent
commit
07e1a0f097
  1. 2
      Tester/Brook.py
  2. 2
      Tester/Hysteria.py
  3. 2
      Tester/Plugin.py
  4. 2
      Tester/Shadowsocks.py
  5. 2
      Tester/ShadowsocksR.py
  6. 2
      Tester/Trojan.py
  7. 2
      Tester/TrojanGo.py
  8. 2
      Tester/V2ray.py
  9. 2
      Tester/VLESS.py
  10. 2
      Tester/VMess.py
  11. 2
      Tester/Xray.py
  12. 4
      Utils/Tester.py
  13. 4
      main.py

2
Tester/Brook.py

@ -5,7 +5,7 @@ import copy
import itertools import itertools
from Builder import Brook from Builder import Brook
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Common import hostFormat, genFlag, getAvailablePort from Utils.Common import hostFormat, genFlag, getAvailablePort

2
Tester/Hysteria.py

@ -6,7 +6,7 @@ import json
import itertools import itertools
from Builder import Hysteria from Builder import Hysteria
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Constant import hysteriaProtocols from Utils.Constant import hysteriaProtocols
from Utils.Common import hostFormat, genFlag, getAvailablePort from Utils.Common import hostFormat, genFlag, getAvailablePort

2
Tester/Plugin.py

@ -5,7 +5,7 @@ import os
import re import re
import json import json
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Constant import Plugins from Utils.Constant import Plugins
from Utils.Common import genFlag, hostFormat, getAvailablePort from Utils.Common import genFlag, hostFormat, getAvailablePort

2
Tester/Shadowsocks.py

@ -8,7 +8,7 @@ import itertools
from Tester import Plugin from Tester import Plugin
from Builder import Shadowsocks from Builder import Shadowsocks
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Common import md5Sum, genFlag, getAvailablePort from Utils.Common import md5Sum, genFlag, getAvailablePort
from Utils.Constant import PathEnv, ssMethods, ssAllMethods, mbedtlsMethods from Utils.Constant import PathEnv, ssMethods, ssAllMethods, mbedtlsMethods

2
Tester/ShadowsocksR.py

@ -5,7 +5,7 @@ import os
import json import json
from Builder import ShadowsocksR from Builder import ShadowsocksR
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Common import genFlag, getAvailablePort from Utils.Common import genFlag, getAvailablePort
from Utils.Constant import ssrMethods, ssrProtocols, ssrObfuscations from Utils.Constant import ssrMethods, ssrProtocols, ssrObfuscations

2
Tester/Trojan.py

@ -6,7 +6,7 @@ import json
from Tester import Xray from Tester import Xray
from Builder import Trojan from Builder import Trojan
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Constant import xtlsFlows from Utils.Constant import xtlsFlows
from Utils.Common import md5Sum, genFlag, getAvailablePort from Utils.Common import md5Sum, genFlag, getAvailablePort

2
Tester/TrojanGo.py

@ -6,7 +6,7 @@ import json
from Tester import Plugin from Tester import Plugin
from Builder import TrojanGo from Builder import TrojanGo
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Constant import trojanGoMethods from Utils.Constant import trojanGoMethods
from Utils.Common import md5Sum, genFlag, getAvailablePort from Utils.Common import md5Sum, genFlag, getAvailablePort

2
Tester/V2ray.py

@ -3,8 +3,8 @@
import copy import copy
import itertools import itertools
from Utils.Test import Settings
from Utils.Common import genFlag from Utils.Common import genFlag
from Utils.Tester import Settings
from Utils.Constant import quicMethods, udpObfuscations from Utils.Constant import quicMethods, udpObfuscations
httpConfig = { httpConfig = {

2
Tester/VLESS.py

@ -6,7 +6,7 @@ import json
from Tester import Xray from Tester import Xray
from Builder import VLESS from Builder import VLESS
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Constant import xtlsFlows from Utils.Constant import xtlsFlows
from Utils.Common import md5Sum, genUUID, getAvailablePort from Utils.Common import md5Sum, genUUID, getAvailablePort

2
Tester/VMess.py

@ -7,7 +7,7 @@ import itertools
from Tester import V2ray from Tester import V2ray
from Builder import VMess from Builder import VMess
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Test import Settings from Utils.Tester import Settings
from Utils.Process import Process from Utils.Process import Process
from Utils.Constant import PathEnv, vmessMethods from Utils.Constant import PathEnv, vmessMethods
from Utils.Common import md5Sum, genUUID, getAvailablePort from Utils.Common import md5Sum, genUUID, getAvailablePort

2
Tester/Xray.py

@ -4,8 +4,8 @@
import copy import copy
import itertools import itertools
from Tester import V2ray from Tester import V2ray
from Utils.Test import Settings
from Utils.Common import genFlag from Utils.Common import genFlag
from Utils.Tester import Settings
from Utils.Constant import xtlsFlows, quicMethods, udpObfuscations from Utils.Constant import xtlsFlows, quicMethods, udpObfuscations
loadConfig = V2ray.loadConfig loadConfig = V2ray.loadConfig

4
Utils/Test.py → Utils/Tester.py

@ -119,7 +119,7 @@ def runTest(testInfo: dict, testUrl: str, testSelect: set or None, delay: int =
testInfo['client'].quit() testInfo['client'].quit()
testInfo['server'].quit() testInfo['server'].quit()
logger.warning('[%s] Client info' % testId) 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, 'id': testId,
'cmd': testInfo['client'].cmd, 'cmd': testInfo['client'].cmd,
'env': testInfo['client'].env, '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, 'output': '-' * 96 + '\n' + testInfo['client'].output + '-' * 96,
}) })
logger.warning('[%s] Server info' % testId) 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, 'id': testId,
'cmd': testInfo['server'].cmd, 'cmd': testInfo['server'].cmd,
'env': testInfo['server'].env, 'env': testInfo['server'].env,

4
main.py

@ -51,7 +51,7 @@ if len(inputArgs) != 0 and inputArgs[0].lower() == 'test': # test mode
else: else:
mainArgs = mainArgParse(inputArgs) mainArgs = mainArgParse(inputArgs)
if mainArgs.version: # output version and exit if mainArgs.version: # output version and exit
print('ProxyC version -> %s' % Constant.Version) print('ProxyC version %s' % Constant.Version)
sys.exit(0) sys.exit(0)
Constant.LogLevel = mainArgs.log # overwrite global options Constant.LogLevel = mainArgs.log # overwrite global options
Constant.DnsServer = mainArgs.dns Constant.DnsServer = mainArgs.dns
@ -67,7 +67,7 @@ from Utils.Check import Check
from Utils import DnsProxy from Utils import DnsProxy
from Utils.Logger import logger from Utils.Logger import logger
from Utils.Manager import Manager from Utils.Manager import Manager
from Utils.Test import Test, loadBind, loadCert from Utils.Tester import Test, loadBind, loadCert
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor

Loading…
Cancel
Save