VPN Fixes + Sanity Checking#282
Open
arianniaki wants to merge 76 commits intoiclab:masterfrom
arianniaki:vpn_fixes
Open
VPN Fixes + Sanity Checking#282arianniaki wants to merge 76 commits intoiclab:masterfrom arianniaki:vpn_fixes
arianniaki wants to merge 76 commits intoiclab:masterfrom
arianniaki:vpn_fixes
Conversation
rpanah
reviewed
Jul 10, 2017
Collaborator
rpanah
left a comment
There was a problem hiding this comment.
@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) |
Collaborator
There was a problem hiding this comment.
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) |
Collaborator
There was a problem hiding this comment.
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) |
centinel/vpn/hma.py
Outdated
| ip = socket.gethostbyname(hostname) | ||
| break | ||
| except socket.gaierror: | ||
| logging.info("Hostname %s failed" %hostname) |
Collaborator
There was a problem hiding this comment.
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) |
Collaborator
There was a problem hiding this comment.
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The line
ip = socket.gethostbyname(hostname)would cause the following error before the fix[Errno 8] nodename nor servname provided, or not known