fix ota
This commit is contained in:
parent
9844ba9dc7
commit
677e6c4c56
2 changed files with 2 additions and 0 deletions
|
@ -328,6 +328,7 @@ class TCPRelayHandler(object):
|
|||
if self._is_local is False:
|
||||
# spec https://shadowsocks.org/en/spec/one-time-auth.html
|
||||
if self._ota_enable or addrtype & ADDRTYPE_AUTH:
|
||||
self._ota_enable = True
|
||||
if len(data) < header_length + ONETIMEAUTH_BYTES:
|
||||
logging.warn('one time auth header is too short')
|
||||
return None
|
||||
|
|
|
@ -184,6 +184,7 @@ class UDPRelay(object):
|
|||
server_addr, server_port = dest_addr, dest_port
|
||||
# spec https://shadowsocks.org/en/spec/one-time-auth.html
|
||||
if self._one_time_auth_enable or addrtype & ADDRTYPE_AUTH:
|
||||
self._one_time_auth_enable = True
|
||||
if len(data) < header_length + ONETIMEAUTH_BYTES:
|
||||
logging.warn('UDP one time auth header is too short')
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue