Skip to content

Commit

Permalink
Merge pull request #543 from v3aqb/fix_ota
Browse files Browse the repository at this point in the history
fix ota
  • Loading branch information
madeye committed Jun 2, 2016
2 parents 9844ba9 + 677e6c4 commit 34fa8de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions shadowsocks/tcprelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def _handle_stage_addr(self, data):
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
Expand Down
1 change: 1 addition & 0 deletions shadowsocks/udprelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def _handle_server(self):
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
Expand Down

0 comments on commit 34fa8de

Please sign in to comment.