Created
          January 17, 2021 12:09 
        
      - 
      
 - 
        
Save MattHealy/2ffd388c7fc5e54a762d984d13e9dc1f to your computer and use it in GitHub Desktop.  
    bashrc vpn switcher
  
        
  
    
      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
    
  
  
    
  | vpn() { | |
| # Usage: "vpn uk" to connect to UK VPN | |
| # Usage: "vpn" to connect to AU VPN | |
| REGION="${1:-au}" | |
| sudo killall openvpn | |
| if [ $REGION == "uk" ]; then | |
| sudo openvpn --daemon --config ~/ovpn/vaultre-uk-matthealy.ovpn | |
| else | |
| sudo openvpn --daemon --config ~/ovpn/vaultre-matthealy.ovpn | |
| fi | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment