Browse Source

update: `--all` for shadowsocks test

master
dnomd343 2 years ago
parent
commit
84320616ac
  1. 4
      Basis/Logger.py
  2. 4
      test.py

4
Basis/Logger.py

@ -6,8 +6,8 @@ import logging
from colorlog import ColoredFormatter from colorlog import ColoredFormatter
logFile = 'runtime.log' logFile = 'runtime.log'
logLevel = logging.DEBUG # logLevel = logging.DEBUG
# logLevel = logging.WARNING logLevel = logging.WARNING
dateFormat = '%Y-%m-%d %H:%M:%S' dateFormat = '%Y-%m-%d %H:%M:%S'
logFormat = '[%(asctime)s] [%(levelname)s] %(message)s (%(module)s.%(funcName)s)' logFormat = '[%(asctime)s] [%(levelname)s] %(message)s (%(module)s.%(funcName)s)'
logging.basicConfig( logging.basicConfig(

4
test.py

@ -13,7 +13,7 @@ testUrl = 'http://baidu.com'
helpMsg = ''' helpMsg = '''
./test.py [ITEM] [OPTIONS] ./test.py [ITEM] [OPTIONS]
[ITEM]: ss / ss-all / ssr / vmess / vless / trojan / trojan-go / brook / hysteria [ITEM]: ss / ssr / vmess / vless / trojan / trojan-go / brook / hysteria
[OPTIONS]: [OPTIONS]:
--thread NUM thread number --thread NUM thread number
@ -54,6 +54,8 @@ logging.critical('URL: ' + testUrl)
logging.critical('THREAD NUMBER: %i' % threadNum) logging.critical('THREAD NUMBER: %i' % threadNum)
logging.critical('-------------------------------- TEST START --------------------------------') logging.critical('-------------------------------- TEST START --------------------------------')
if testItem is not None: if testItem is not None:
if testItem == 'ss' and '--all' in sys.argv:
testItem = 'ss-all'
Tester.test(Tester.entry[testItem], threadNum, testUrl, testFilter) Tester.test(Tester.entry[testItem], threadNum, testUrl, testFilter)
else: else:
for item in Tester.entry: for item in Tester.entry:

Loading…
Cancel
Save