Skip to content

VPN Fixes + Sanity Checking#282

Open
arianniaki wants to merge 76 commits into
iclab:masterfrom
arianniaki:vpn_fixes
Open

VPN Fixes + Sanity Checking#282
arianniaki wants to merge 76 commits into
iclab:masterfrom
arianniaki:vpn_fixes

Conversation

@arianniaki

Copy link
Copy Markdown
Collaborator

The line ip = socket.gethostbyname(hostname) would cause the following error before the fix
[Errno 8] nodename nor servname provided, or not known

@rpanah rpanah left a comment

Copy link
Copy Markdown
Collaborator

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?

Comment thread centinel/vpn/ipvanish.py Outdated
break
# added because gethostbyname will fail on some hostnames
try:
ip = socket.gethostbyname(hostname)

Copy link
Copy Markdown
Collaborator

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.

Comment thread centinel/vpn/purevpn.py Outdated
break
# added because gethostbyname will fail on some hostnames
try:
ip = socket.gethostbyname(hostname)

Copy link
Copy Markdown
Collaborator

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.

Comment thread centinel/vpn/ipvanish.py Outdated
break
# added because gethostbyname will fail on some hostnames
try:
ip = socket.gethostbyname(hostname)

Copy link
Copy Markdown
Collaborator

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.

Comment thread centinel/vpn/hma.py Outdated
ip = socket.gethostbyname(hostname)
break
except socket.gaierror:
logging.info("Hostname %s failed" %hostname)

Copy link
Copy Markdown
Collaborator

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.

Comment thread centinel/vpn/ipvanish.py Outdated
ip = socket.gethostbyname(hostname)
break
except socket.gaierror:
logging.info("Hostname %s failed" %hostname)

Copy link
Copy Markdown
Collaborator

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

Comment thread centinel/vpn/purevpn.py Outdated
ip = socket.gethostbyname(hostname)
break
except socket.gaierror:
logging.info("Hostname %s failed" %hostname)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@arianniaki arianniaki changed the title Try Except added to getting ip addresses of purevpn and ipvanish VPN Fixes + Sanity Checking Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants