Skip to content

Commit

Permalink
add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
laozhoubuluo authored Feb 16, 2024
1 parent 193501e commit 09b2651
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ def local_v4(i=0): # 本地ipv4地址


def _custom_getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
debug("host: %s", host)
if host in dns_mapping:
ip = dns_mapping[host]
debug("ip: %s", ip)
return [(family, type, proto, '', (ip, port))]
else:
return _orig_getaddrinfo(host, port, family, type, proto, flags)
Expand Down

0 comments on commit 09b2651

Please sign in to comment.