Browse Source

add IPv6 support

v2
ghost 11 months ago
parent
commit
d576bdfa14
  1. 3
      server_entry.py

3
server_entry.py

@ -67,8 +67,7 @@ class ServerEntry: @@ -67,8 +67,7 @@ class ServerEntry:
self.addr = addr
# Shortcuts for generating query
self.queryAddr = b''
for i in addr[0].split('.'):
self.queryAddr += pack('!B', int(i))
self.queryAddr += ipaddress.ip_address(addr[0]).packed
self.queryAddr += pack('!H', int(addr[1]))
# Random number that server must return

Loading…
Cancel
Save