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
Open
arianniaki
wants to merge
76
commits into
iclab:master
Choose a base branch
from
arianniaki:vpn_fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
e047d8e
purevpn and ipvanish, getting ip addresses of vpns sometimes lead to …
arianniaki 1565476
adding log info when gethostname fails
arianniaki 4e5af1f
HMA vpn structure fixed to fetch updated config file
arianniaki b94f1cc
fixed fetching the configs file for ipvanish
arianniaki c925cd4
log messages modified for all vpn proxies
arianniaki e63de02
log messages fixed
arianniaki 871181f
Initial changes for sanity check module added
arianniaki 347fa65
sanity check must be done before the reduce asn list
arianniaki 3164ade
add arg for sanity check
grace71 eb26a35
move code under sanity check arg
grace71 845995c
add geo-sanity check module
grace71 1dcc045
combine sanity module and cli.py
grace71 739b509
get anchors before for loop
grace71 4c20719
some update
grace71 f8857c9
decouple ping and sanity check
grace71 0ffedcc
store sanity results as a file
grace71 f8d0182
add logging info & LICENSE
grace71 579b557
add timestamp for RIPE anchors monthly update
grace71 ba2dfa2
fix to deal with -1 in sanity check
grace71 35924fe
fix minor errors
grace71 84d5630
added downloader for map file
arianniaki 93716ab
try block added for fetching map shape file
arianniaki 9f76634
map shape file download (completed)
arianniaki fcb26e0
fixed a bug where servers.txt would be in the configs folder
arianniaki 5fada31
fixed the previous bug completeley. purevpn had server in the name of…
arianniaki 53ad69c
hostname resolution doesnt happen in the create configs anymore
arianniaki ff3c8d7
name resolution happens at sanity check instead of creating vpn confi…
arianniaki 7ced45f
hostname resolution happens at sanity check instead of when creating …
arianniaki ab29b81
hash file of ovpn files added
arianniaki 6941a61
update configs parameter added, reading configs pickle file added to …
arianniaki 044e6d6
determine the update/add/delete vpn's in hma by comparing with the co…
arianniaki d519f41
new hash config file and server.txt file is written
arianniaki 71bdd6c
add vpn config list implemented and all list of vp changes is returned
arianniaki db54733
remove/update/add vpn configs added in cli.py
arianniaki 0898652
new configs created for new vps and in case the filenames are the sam…
arianniaki 41595a4
fixed a bug where hostname was a tuple of filename and extension rath…
bed8b1d
removing new vpn configs folder when update is finished
0c98f71
update configs for ipvanish added
e6e2556
updated vpns directory shouldn't be deleted in the vpnprovider.py code
2a089dc
ipvanish update vpn config merged with cli.py
8866f0f
optimize the sanity checker
grace71 bd7128b
update vpn parameter added for purevpn
2cdb34a
Merge branch 'vpn_fixes' of https://github.com/arianniaki/centinel in…
3f43cad
adding return value to the update config function
arianniaki 3bc4946
removing new vpns folder fetched for the update
arianniaki 46cdd8b
changes to add custom_meta to configs file added
arianniaki cc93ca2
custom meta successfully added in confgis for each vp
arianniaki e503b6c
fix anchor parsing part to get city, country info
grace71 b4e9ed1
fix problem: by stopping openvpn properly
grace71 35164b5
speed up probing
grace71 f98dcfc
move getting gps part to probe.py
grace71 cafc62c
use RIPE API to get an anchors list
grace71 52437eb
change cli.py to run ripe api
grace71 653bc62
clean up probe part
grace71 2f7b845
clean up sanity check part
grace71 13c32c0
move sending pings to probe.py
grace71 ef52c1a
remove unnecessary config addition part
grace71 c92ad07
collect info for analysis
grace71 8c98199
erro msq
grace71 ff4348b
fix minor errors
grace71 ea8938f
Fix indents
grace71 31e03d0
Creat configs for other VP
grace71 2b7e5da
Fast enough not to store anchors lists
grace71 d7e0ad9
Subtract ping time from local to vp
grace71 e40f20b
Store online anchors list
grace71 d83574b
Move code to geosanity.py
grace71 b6202f5
Add column name for ping results
grace71 3229144
Finish geosanity.py
grace71 fa9f423
Change fname of landmark
grace71 a3c3d42
Store ping both to anchor and to proxy
grace71 3d3f0e1
Change vp_info format
grace71 cea8ada
Clean up codes for sanity check with speed
grace71 98ba2cb
Can't pickle staticmethod
grace71 11ec5ec
Fix errors
grace71 8768366
Handle geopy error and missed country code
grace71 16e8f89
Convert ms to second
grace71 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,8 +57,12 @@ def create_config_files(directory): | |
for line in lines: | ||
if line.startswith('remote'): | ||
hostname = line.split(' ')[1] | ||
ip = socket.gethostbyname(hostname) | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. @arianniaki I see your comment. |
||
break | ||
except socket.gaierror: | ||
continue | ||
|
||
if len(ip) > 0: | ||
new_path = os.path.join(directory, ip + '.ovpn') | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,8 +56,12 @@ def create_config_files(directory): | |
for line in lines: | ||
if line.startswith('remote'): | ||
hostname = line.split(' ')[1] | ||
ip = socket.gethostbyname(hostname) | ||
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 commentThe 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. |
||
break | ||
except socket.gaierror: | ||
continue | ||
|
||
if len(ip) > 0: | ||
new_path = os.path.join(directory, ip + '.ovpn') | ||
|
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.
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.