Skip to content

Commit

Permalink
vicc: use Quad9 instead of Goolge for detecting IP
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Jun 1, 2022
1 parent 68ca1fb commit 51fb023
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def __init__(self, datasetfile, card_type, host, port,
else:
# use reversed connection mode
try:
local_ip = [(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]
local_ip = [(s.connect(('9.9.9.9', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]
custom_url = 'vicc://%s:%d' % (local_ip, port)
print('VICC hostname: %s' % local_ip)
print('VICC port: %d' % port)
Expand Down

0 comments on commit 51fb023

Please sign in to comment.