fix overhead
This commit is contained in:
@@ -193,6 +193,8 @@ class tls_ticket_auth(plain.plain):
|
||||
|
||||
def decode_error_return(self, buf):
|
||||
self.handshake_status = -1
|
||||
if self.overhead > 0:
|
||||
self.server_info.overhead -= self.overhead
|
||||
self.overhead = 0
|
||||
if self.method in ['tls1.2_ticket_auth', 'tls1.2_ticket_fastauth']:
|
||||
return (b'E'*2048, False, False)
|
||||
|
||||
@@ -858,6 +858,10 @@ class TCPRelayHandler(object):
|
||||
if self._encrypt_correct:
|
||||
try:
|
||||
obfs_decode = self._obfs.server_decode(data)
|
||||
if self._stage == STAGE_INIT:
|
||||
self._overhead = self._obfs.get_overhead(self._is_local) + self._protocol.get_overhead(self._is_local)
|
||||
server_info = self._protocol.get_server_info()
|
||||
server_info.overhead = self._overhead
|
||||
except Exception as e:
|
||||
shell.print_exception(e)
|
||||
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1]))
|
||||
|
||||
Reference in New Issue
Block a user