-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tmcphee/Working
New Release
- Loading branch information
Showing
4 changed files
with
96 additions
and
23 deletions.
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
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
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 |
---|---|---|
@@ -1,10 +1,39 @@ | ||
#!/bin/bash | ||
#VER2.1 | ||
config_ini=/home/root/.cyberghost/config.ini | ||
if [ -f "$config_ini" ]; then | ||
#Launch and connect to CyberGhost VPN [Example] | ||
sudo cyberghostvpn --connect --torrent --country-code NL --wireguard | ||
|
||
# Check if country is set. Default to US | ||
if ! [ -n "$COUNTRY" ]; then | ||
echo "Country variable not set. Defaulting to US" | ||
export COUNTRY="US" | ||
fi | ||
|
||
#Launch and connect to CyberGhost VPN | ||
sudo cyberghostvpn --connect --country-code $COUNTRY --wireguard $ARGS | ||
|
||
#Add CyberGhost nameserver to resolv for DNS | ||
echo 'nameserver 38.132.106.139' > /etc/resolv.conf | ||
# Add CyberGhost nameserver to resolv for DNS | ||
# Add Nameserver via env variable $NAMESERVER | ||
if [ -n "$NAMESERVER" ]; then | ||
echo 'nameserver ' $NAMESERVER > /etc/resolv.conf | ||
else | ||
# SMART DNS | ||
# This will switch baised on country selected | ||
# https://support.cyberghostvpn.com/hc/en-us/articles/360012002360 | ||
case "$COUNTRY" in | ||
"NL") echo 'nameserver 75.2.43.210' > /etc/resolv.conf | ||
;; | ||
"GB") echo 'nameserver 75.2.79.213' > /etc/resolv.conf | ||
;; | ||
"JP") echo 'nameserver 76.223.64.81' > /etc/resolv.conf | ||
;; | ||
"DE") echo 'nameserver 13.248.182.241' > /etc/resolv.conf | ||
;; | ||
"US") echo 'nameserver 99.83.181.72' > /etc/resolv.conf | ||
;; | ||
*) echo 'nameserver 99.83.181.72' > /etc/resolv.conf | ||
;; | ||
esac | ||
fi | ||
fi | ||
|
||
|
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