Browse Source

fix: client secure as none for Tester

master
Dnomd343 3 years ago
parent
commit
596ddfe08e
  1. 27
      ProxyTester/V2ray.py
  2. 36
      demo.py

27
ProxyTester/V2ray.py

@ -59,7 +59,8 @@ def loadTcpStream(isObfs: bool, host: str, path: str) -> dict:
return { return {
'caption': 'TCP', 'caption': 'TCP',
'client': { 'client': {
'type': 'tcp' 'type': 'tcp',
'secure': None
}, },
'server': streamConfig 'server': streamConfig
} }
@ -77,7 +78,8 @@ def loadTcpStream(isObfs: bool, host: str, path: str) -> dict:
'obfs': { 'obfs': {
'host': host, 'host': host,
'path': path 'path': path
} },
'secure': None
}, },
'server': streamConfig 'server': streamConfig
} }
@ -92,7 +94,8 @@ def loadKcpStream(seed: str, obfs: str) -> dict:
'client': { 'client': {
'type': 'kcp', 'type': 'kcp',
'seed': seed, 'seed': seed,
'obfs': obfs 'obfs': obfs,
'secure': None
}, },
'server': { 'server': {
'network': 'kcp', 'network': 'kcp',
@ -113,7 +116,8 @@ def loadWsStream(host: str, path: str, isEd: bool) -> dict:
'client': { 'client': {
'type': 'ws', 'type': 'ws',
'host': host, 'host': host,
'path': path 'path': path,
'secure': None
}, },
'server': { 'server': {
'network': 'ws', 'network': 'ws',
@ -128,7 +132,8 @@ def loadWsStream(host: str, path: str, isEd: bool) -> dict:
'type': 'ws', 'type': 'ws',
'host': host, 'host': host,
'path': path, 'path': path,
'ed': 2048 'ed': 2048,
'secure': None
}, },
'server': { 'server': {
'network': 'ws', 'network': 'ws',
@ -142,7 +147,8 @@ def loadH2Stream(host: str, path: str) -> dict:
'client': { 'client': {
'type': 'h2', 'type': 'h2',
'host': host, 'host': host,
'path': path 'path': path,
'secure': None
}, },
'server': { 'server': {
'network': 'http', 'network': 'http',
@ -160,7 +166,8 @@ def loadQuicStream(method: str, passwd: str, obfs: str) -> dict:
'type': 'quic', 'type': 'quic',
'method': method, 'method': method,
'passwd': passwd, 'passwd': passwd,
'obfs': obfs 'obfs': obfs,
'secure': None
}, },
'server': { 'server': {
'network': 'quic', 'network': 'quic',
@ -180,7 +187,8 @@ def loadGrpcStream(service: str, multiMode: bool = False) -> dict:
'caption': 'gRPC', 'caption': 'gRPC',
'client': { 'client': {
'type': 'grpc', 'type': 'grpc',
'service': service 'service': service,
'secure': None
}, },
'server': { 'server': {
'network': 'grpc', 'network': 'grpc',
@ -194,7 +202,8 @@ def loadGrpcStream(service: str, multiMode: bool = False) -> dict:
'client': { 'client': {
'type': 'grpc', 'type': 'grpc',
'service': service, 'service': service,
'mode': 'multi' 'mode': 'multi',
'secure': None
}, },
'server': { 'server': {
'network': 'grpc', 'network': 'grpc',

36
demo.py

@ -1,23 +1,25 @@
import ProxyDecoder as Decoder import ProxyDecoder as Decoder
import ProxyFilter as Filter import ProxyFilter as Filter
info = { # info = {
'type': 'vless', # 'type': 'vless',
'server': '127.0.0.1', # 'server': '127.0.0.1',
'port': 12345, # 'port': 12345,
'id': '1b1757d2-2ff1-4e8d-b62e-4e74c06f1325', # 'id': '1b1757d2-2ff1-4e8d-b62e-4e74c06f1325',
'stream': { # 'stream': {
'type': 'grpc', # 'type': 'grpc',
'service': 'dnomd343' # 'service': 'dnomd343'
} # }
} # }
ret = Filter.filte(info) # ret = Filter.filte(info)
# print(ret)
url = 'vmess://1b1757d2-2ff1-4e8d-b62e-4e74c06f1325@1.1.1.1:443'
ret = Decoder.decode(url)
print(ret) print(ret)
# ret = Decoder.decode(url) status, ret = Filter.filte(ret, isExtra = True)
# print(ret) print(status)
# print(ret)
# status, ret = Filter.filte(ret, isExtra = True)
# print(status)
# print(ret)

Loading…
Cancel
Save