Skip to content

Commit

Permalink
fix UDP
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Oct 31, 2014
1 parent 5024b30 commit a502dd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shadowsocks/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ def encrypt_all(password, method, op, data):
data = data[iv_len:]
cipher = m(method, key, iv, op)
result.append(cipher.update(data))
return ''.join(result)
return b''.join(result)
2 changes: 1 addition & 1 deletion shadowsocks/udprelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _handle_client(self, sock):
if header_result is None:
return
# addrtype, dest_addr, dest_port, header_length = header_result
response = '\x00\x00\x00' + data
response = b'\x00\x00\x00' + data
client_addr = self._client_fd_to_server_addr.get(sock.fileno())
if client_addr:
self._server_socket.sendto(response, client_addr)
Expand Down

0 comments on commit a502dd3

Please sign in to comment.