|
@ -497,7 +497,7 @@ class TCPRelayHandler(object): |
|
|
if len(addrs) == 0: |
|
|
if len(addrs) == 0: |
|
|
raise Exception("getaddrinfo failed for %s:%d" % (ip, port)) |
|
|
raise Exception("getaddrinfo failed for %s:%d" % (ip, port)) |
|
|
af, socktype, proto, canonname, sa = addrs[0] |
|
|
af, socktype, proto, canonname, sa = addrs[0] |
|
|
if self._forbidden_iplist: |
|
|
if not self._remote_udp and self._forbidden_iplist: |
|
|
if common.to_str(sa[0]) in self._forbidden_iplist: |
|
|
if common.to_str(sa[0]) in self._forbidden_iplist: |
|
|
raise Exception('IP %s is in forbidden list, reject' % |
|
|
raise Exception('IP %s is in forbidden list, reject' % |
|
|
common.to_str(sa[0])) |
|
|
common.to_str(sa[0])) |
|
|