Update wireguard-v3.sh

This commit is contained in:
tteckster 2022-04-21 10:20:01 -04:00 committed by GitHub
parent d51855834b
commit f19ab07d4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 45 additions and 45 deletions

View File

@ -66,26 +66,26 @@ function default_settings() {
echo -e "${BL}Using Default Settings${CL}" echo -e "${BL}Using Default Settings${CL}"
echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
CT_TYPE="1" CT_TYPE="1"
echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}"
PW=" " PW=" "
echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}"
CT_ID=$NEXTID CT_ID=$NEXTID
echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}"
HN=$NSAPP HN=$NSAPP
echo -e "${DGN}Using Disk Size ${BGN}2GB${CL}" echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}"
DISK_SIZE="2" DISK_SIZE="2"
echo -e "${DGN}Using ${BGN}1vCPU${CL}" echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}"
CORE_COUNT="1" CORE_COUNT="1"
echo -e "${DGN}Using ${BGN}512MiB${CL}${DGN} RAM${CL}" echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}"
RAM_SIZE="512" RAM_SIZE="512"
echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}"
BRG="vmbr0" BRG="vmbr0"
echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}"
NET=dhcp NET=dhcp
echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}"
GATE="" GATE=""
echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}"
VLAN="" VLAN=""
} }
function advanced_settings() { function advanced_settings() {
@ -151,11 +151,11 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2Gb " echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 "
read DISK_SIZE read DISK_SIZE
if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi;
if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi;
echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}" echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e " ${CM}${CL} \r" echo -e " ${CM}${CL} \r"
sleep 1 sleep 1
clear clear
@ -165,11 +165,11 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 "
read CORE_COUNT read CORE_COUNT
if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi;
echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}" echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}"
echo -e " ${CM}${CL} \r" echo -e " ${CM}${CL} \r"
sleep 1 sleep 1
clear clear
@ -179,12 +179,12 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}"
echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 "
read RAM_SIZE read RAM_SIZE
if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi;
echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}" echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}"
echo -e " ${CM}${CL} \n" echo -e " ${CM}${CL} \n"
sleep 1 sleep 1
clear clear
@ -194,9 +194,9 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}"
echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}"
echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 "
read BRG read BRG
if [ -z $BRG ]; then BRG="vmbr0"; fi; if [ -z $BRG ]; then BRG="vmbr0"; fi;
@ -210,10 +210,10 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}"
echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}"
echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}"
echo -e "${YW}Enter a Static IP Address, or Press [ENTER] for Default: DHCP " echo -e "${YW}Enter a Static IP Address, or Press [ENTER] for Default: DHCP "
read NET read NET
if [ -z $NET ]; then NET="dhcp"; fi; if [ -z $NET ]; then NET="dhcp"; fi;
@ -222,15 +222,15 @@ echo -e " ${CM}${CL} \n"
sleep 1 sleep 1
clear clear
header_info header_info
echo -e "${RD}Using Advanced Settings${CL}" echo -e "${RD}Using Advanced Settings${CL}"
echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}"
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}"
echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}"
echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}"
echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}"
echo -e "${YW}Enter a Gateway IP, or Press [ENTER] for Default: NONE " echo -e "${YW}Enter a Gateway IP, or Press [ENTER] for Default: NONE "
read GATE1 read GATE1
@ -250,9 +250,9 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}"
echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}"
echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}"
echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}"
echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}"
@ -273,9 +273,9 @@ header_info
echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}"
echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}"
echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" echo -e "${DGN}Using CT Name ${BGN}$HN${CL}"
echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}" echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}"
echo -e "${DGN}Using ${BGN}${CORE_COUNT}vCPU${CL}" echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}"
echo -e "${DGN}Using ${BGN}${RAM_SIZE}MiB${CL}${DGN} RAM${CL}" echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}"
echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}"
echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}"
echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}"