add protocol_param
This commit is contained in:
parent
7f480248f8
commit
c83341da9b
2 changed files with 9 additions and 11 deletions
|
@ -8,6 +8,7 @@
|
|||
"timeout": 120,
|
||||
"method": "aes-256-cfb",
|
||||
"protocol": "auth_sha1_compatible",
|
||||
"protocol_param": "",
|
||||
"obfs": "http_simple_compatible",
|
||||
"obfs_param": "",
|
||||
"dns_ipv6": false,
|
||||
|
|
|
@ -274,13 +274,11 @@ class TCPRelayHandler(object):
|
|||
return True
|
||||
else:
|
||||
try:
|
||||
if self._is_local:
|
||||
pass
|
||||
else:
|
||||
if sock == self._remote_sock:
|
||||
if self._encrypt_correct:
|
||||
if sock == self._remote_sock:
|
||||
self._server.server_transfer_ul += len(data)
|
||||
elif self._encrypt_correct and (self._obfs is not None):
|
||||
self._update_activity(len(data))
|
||||
elif not self._is_local and self._obfs is not None:
|
||||
obfs_encode = self._obfs.server_encode(data)
|
||||
data = obfs_encode
|
||||
if data:
|
||||
|
@ -597,7 +595,6 @@ class TCPRelayHandler(object):
|
|||
self.destroy()
|
||||
return
|
||||
ogn_data = data
|
||||
self._update_activity(len(data))
|
||||
if not is_local:
|
||||
if self._encryptor is not None:
|
||||
if self._encrypt_correct:
|
||||
|
@ -667,8 +664,6 @@ class TCPRelayHandler(object):
|
|||
self.destroy()
|
||||
return
|
||||
if self._encryptor is not None:
|
||||
self._server.server_transfer_dl += len(data)
|
||||
self._update_activity(len(data))
|
||||
if self._is_local:
|
||||
obfs_decode = self._obfs.client_decode(data)
|
||||
if obfs_decode[1]:
|
||||
|
@ -683,6 +678,8 @@ class TCPRelayHandler(object):
|
|||
if self._encrypt_correct:
|
||||
data = self._protocol.server_pre_encrypt(data)
|
||||
data = self._encryptor.encrypt(data)
|
||||
self._update_activity(len(data))
|
||||
self._server.server_transfer_dl += len(data)
|
||||
else:
|
||||
return
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue