add new client=''

This commit is contained in:
Leon Vita 2022-09-01 23:31:50 +01:00
parent 0c956428bb
commit 649272d2fe
3 changed files with 25 additions and 26 deletions

42
gen.sh
View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,9 +0,0 @@
[Interface]
Address = 10.10.11.3/24
PrivateKey = KF46vAHYBGEs70HJhkz+4IWD9mGScaJpv52qqDLR1U0=
DNS = 11112
[Peer]
PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=
Endpoint = 81.201.149.152:18800
AllowedIPs= 213213123
PersistentKeepalive = 25