add manyuser branch

support udp over tcp
support chacha20 & salsa20 (base on libsodium)
This commit is contained in:
breakwa11 2015-06-08 20:00:45 +08:00
parent e001f1818c
commit f2efed9608
18 changed files with 1327 additions and 57 deletions

View file

@ -173,6 +173,7 @@ class UDPRelay(object):
client = self._cache.get(key, None)
if not client:
# TODO async getaddrinfo
logging.info('UDP handle_server %s:%d from %s:%d' % (common.to_str(server_addr), server_port, self._listen_addr, self._listen_port))
addrs = socket.getaddrinfo(server_addr, server_port, 0,
socket.SOCK_DGRAM, socket.SOL_UDP)
if addrs: