Created
November 13, 2018 15:04
-
-
Save Nalorokk/a04be394859fe3cdeb8b6177c0704d64 to your computer and use it in GitHub Desktop.
Unlock bitbucket
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
#!/usr/bin/php | |
<?php | |
$list = json_decode(file_get_contents('https://ip-ranges.atlassian.com/'), true); | |
foreach ($list['items'] as $item) { | |
$cidr = $item['cidr']; | |
if (strpos($cidr, ':') === false) { | |
echo "Adding $cidr\n"; | |
system('ip route add ' . escapeshellarg($cidr) . ' dev tun0'); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment