From 677e6c4c563328191ca513d2f766574325d8a6eb Mon Sep 17 00:00:00 2001 From: v3aqb Date: Sun, 15 May 2016 01:27:21 +0800 Subject: [PATCH] fix ota --- shadowsocks/tcprelay.py | 1 + shadowsocks/udprelay.py | 1 + 2 files changed, 2 insertions(+) diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index 1387ac7..cc49d67 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -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 diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index 6bf6ce6..849f611 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -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