Browse Source

fix: VLESS and Trojan use TLS secure in default

master
Dnomd343 3 years ago
parent
commit
94ea9a1e2a
  1. 8
      ProxyFilter/Xray.py
  2. 22
      demo.py
  3. 24
      docs/ProxyObject.md

8
ProxyFilter/Xray.py

@ -14,6 +14,7 @@ xrayFlowList = [
xrayStreamRules = copy.deepcopy(V2ray.v2rayStreamRules)
xrayStreamRules.pop('secureObject')
xrayStreamRules['tcpObject']['secure']['type'] = ['tlsObject', 'xtlsObject']
xrayStreamRules['kcpObject']['secure']['type'] = ['tlsObject', 'xtlsObject']
xrayStreamRules['wsObject']['secure']['type'] = 'tlsObject'
@ -21,6 +22,13 @@ xrayStreamRules['h2Object']['secure']['type'] = 'tlsObject'
xrayStreamRules['quicObject']['secure']['type'] = 'tlsObject'
xrayStreamRules['grpcObject']['secure']['type'] = 'tlsObject'
xrayStreamRules['tcpObject']['secure']['default'] = {'type': 'tls'}
xrayStreamRules['kcpObject']['secure']['default'] = {'type': 'tls'}
xrayStreamRules['wsObject']['secure']['default'] = {'type': 'tls'}
xrayStreamRules['h2Object']['secure']['default'] = {'type': 'tls'}
xrayStreamRules['quicObject']['secure']['default'] = {'type': 'tls'}
xrayStreamRules['grpcObject']['secure']['default'] = {'type': 'tls'}
xrayStreamRules['tlsObject'] = {
'type': {
'optional': True,

22
demo.py

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

24
docs/ProxyObject.md

@ -589,7 +589,7 @@
+ 类型:*None* / *tlsObject* / *xtlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### kcpObject
@ -621,7 +621,7 @@
+ 类型:*None* / *tlsObject* / *xtlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### wsObject
@ -664,7 +664,7 @@
+ 类型:*None* / *tlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### h2Object
@ -698,7 +698,7 @@
+ 类型:*tlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### quicObject
@ -738,7 +738,7 @@
+ 类型:*tlsObject*
+ 说明:TLS加密
+ 缺省:secureObject
+ 缺省:tlsObject
+ 可选值:不限
### grpcObject
@ -772,7 +772,7 @@
+ 类型:*None* / *tlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### obfsObject
@ -956,7 +956,7 @@
+ 类型:*None* / *tlsObject* / *xtlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### kcpObject
@ -988,7 +988,7 @@
+ 类型:*None* / *tlsObject* / *xtlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### wsObject
@ -1031,7 +1031,7 @@
+ 类型:*None* / *tlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### h2Object
@ -1065,7 +1065,7 @@
+ 类型:*tlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### quicObject
@ -1105,7 +1105,7 @@
+ 类型:*tlsObject*
+ 说明:TLS加密
+ 缺省:secureObject
+ 缺省:tlsObject
+ 可选值:不限
### grpcObject
@ -1139,7 +1139,7 @@
+ 类型:*None* / *tlsObject*
+ 说明:TLS加密
+ 缺省:None
+ 缺省:tlsObject
+ 可选值:不限
### obfsObject

Loading…
Cancel
Save