Browse Source

fix: test config of VLESS and Trojan

master
Dnomd343 3 years ago
parent
commit
e5a08a7a02
  1. 7
      ProxyTester/Xray.py
  2. 5
      Test.py

7
ProxyTester/Xray.py

@ -27,7 +27,8 @@ def loadWsStream(host: str, path: str, isEd: bool) -> dict:
'client': {
'type': 'ws',
'host': host,
'path': path
'path': path,
'secure': None
},
'server': {
'network': 'ws',
@ -45,7 +46,8 @@ def loadWsStream(host: str, path: str, isEd: bool) -> dict:
'type': 'ws',
'host': host,
'path': path,
'ed': 2048
'ed': 2048,
'secure': None
},
'server': {
'network': 'ws',
@ -58,7 +60,6 @@ def loadWsStream(host: str, path: str, isEd: bool) -> dict:
}
}
def addTlsConfig(rawStreamInfo: dict, cert: str, key: str, sni: str) -> dict:
streamInfo = copy.deepcopy(rawStreamInfo)
streamInfo['caption'] += ' (tls)'

5
Test.py

@ -60,7 +60,10 @@ def testObject(option: dict) -> None: # test target object
testDestroy(option['aider'], aiderProcess)
raise Exception('check error')
delay = checkResult['check']['http']['delay'] # get http delay
print(format(delay, '.2f') + 'ms')
if delay > 0:
print(format(delay, '.2f') + 'ms')
else:
print('ERROR')
testDestroy(option['server'], serverProcess) # destroy server process
if option['aider'] is not None:

Loading…
Cancel
Save