New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VPN Fixes + Sanity Checking #282
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arianniaki have you tested these changes? i.e. can you download all configurations and run VPN instances using the new configurations?
centinel/vpn/ipvanish.py
Outdated
break | ||
# added because gethostbyname will fail on some hostnames | ||
try: | ||
ip = socket.gethostbyname(hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will entirely ignore cases where this happens. It would be better to print a log message to describe what happens and which domain name failed to resolve.
centinel/vpn/purevpn.py
Outdated
break | ||
# added because gethostbyname will fail on some hostnames | ||
try: | ||
ip = socket.gethostbyname(hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before, leave a log message saying what happened and what failed to parse.
centinel/vpn/ipvanish.py
Outdated
break | ||
# added because gethostbyname will fail on some hostnames | ||
try: | ||
ip = socket.gethostbyname(hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arianniaki I see your comment.
centinel/vpn/hma.py
Outdated
ip = socket.gethostbyname(hostname) | ||
break | ||
except socket.gaierror: | ||
logging.info("Hostname %s failed" %hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with Failed to resolve %s
.
centinel/vpn/ipvanish.py
Outdated
ip = socket.gethostbyname(hostname) | ||
break | ||
except socket.gaierror: | ||
logging.info("Hostname %s failed" %hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. Failed to resolve %s
centinel/vpn/purevpn.py
Outdated
ip = socket.gethostbyname(hostname) | ||
break | ||
except socket.gaierror: | ||
logging.info("Hostname %s failed" %hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
The line
ip = socket.gethostbyname(hostname)
would cause the following error before the fix[Errno 8] nodename nor servname provided, or not known