add new client=''
This commit is contained in:
parent
0c956428bb
commit
649272d2fe
42
gen.sh
42
gen.sh
|
@ -3,26 +3,25 @@
|
|||
source IPS
|
||||
|
||||
#--------------------Input---------------------
|
||||
echo -e "File Name with .conf:\r"
|
||||
echo -e "File Name with:\r"
|
||||
read file_name
|
||||
echo -e "Please Put The Client Ip Address With Subnet:\r"
|
||||
echo -e "Please Put The Client Ip Address:\r"
|
||||
echo -e "The Ip Please:\r"; read user_input
|
||||
user_input+="/24"
|
||||
sleep 1
|
||||
echo -e "Would You Like To Have DNS:\r";echo -e "[1=yes] or [2=no]\r";read answer
|
||||
sleep 1
|
||||
echo -e "Which DNS Would You Like To Have:\r";read DNS
|
||||
echo "Please add allow ips with subnet Ex:10.10.11.1/24:"
|
||||
sleep 1
|
||||
sleep 1
|
||||
echo -e "Choose DNS: [1=Default 2=Google 3=Both 4=noDNS]";read DNS
|
||||
echo "Please add allow ips:"
|
||||
sleep 1
|
||||
echo -e "Input Your Allow IPS :\r";read allow
|
||||
echo "Would You Like To Have This Config On QR-Code Or File:"
|
||||
sleep 1
|
||||
sleep 1
|
||||
echo -e "QR-code Press 1: File Press 2: \r"
|
||||
read user_wish
|
||||
sleep 1
|
||||
sleep 1
|
||||
#--------------------End---------------------
|
||||
|
||||
|
||||
#------------- Update-Variables--------------
|
||||
user_input+="/24"
|
||||
allow+="/24"
|
||||
#---------------Start-Checking---------------
|
||||
echo -ne '# (1%)\n'
|
||||
sleep 1
|
||||
|
@ -63,13 +62,22 @@ echo "$user_input = privatekey= $(cat privatekey) publickey= $(cat publickey)" >
|
|||
echo -ne '############# (50%)\n'
|
||||
sleep 1
|
||||
|
||||
if [ $answer -eq 1 ];then
|
||||
echo "DNS = $DNS" >> $file_name
|
||||
elif [ $answer -eq 2 ];then
|
||||
echo "Ok Continue....."
|
||||
if [ $DNS -eq 1 ];then
|
||||
echo "DNS = 10.10.11.1" >> $file_name
|
||||
elif [ $DNS -eq 2 ];then
|
||||
echo "DNS = 8.8.8.8" >> $file_name
|
||||
elif [ $DNS -eq 3 ];then
|
||||
echo "DNS = 10.10.11.1,8.8.8.8" >> $file_name
|
||||
elif [ $DNS -eq 4 ];then
|
||||
:
|
||||
else
|
||||
echo "Oops Wrong input the code will continue....."
|
||||
echo "Wrong Input"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
echo -ne '################ (60%)\n'
|
||||
sleep 1
|
||||
echo "Adding peer......";sleep 2
|
||||
|
|
BIN
qrscanme.png
BIN
qrscanme.png
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue