add new client=''

This commit is contained in:
Leon Vita 2022-09-02 00:45:05 +01:00
parent ee06119504
commit f002462e68
4 changed files with 19 additions and 11 deletions

3
IPS
View File

@ -4,8 +4,7 @@ ips=(
#server_ips:
"10.10.11.1/24" "10.10.100.1/24" "10.10.11.2/24"
#Client_ips:
"10.10111.11111./24"
"10.10.11.3/24"

19
gen.sh
View File

@ -9,9 +9,9 @@ echo -e "Please Put The Client Ip Address:\r"
echo -e "The Ip Please:\r"; read user_input
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 -e "Share Network With Other-Clients:\n"
echo -e "[Yes=1 \ No=2]";read allow
echo "Would You Like To Have This Config On QR-Code Or File:"
sleep 1
echo -e "QR-code Press 1: File Press 2: \r"
@ -22,7 +22,6 @@ sleep 1
#------------- Update-Variables--------------
file_name+=".conf"
user_input+="/24"
allow+="/24"
#---------------Start-Checking---------------
echo -ne '# (1%)\n'
sleep 1
@ -85,7 +84,16 @@ echo "Adding peer......";sleep 2
echo "[Peer]">>$file_name;
echo "PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=">> $file_name
echo "Endpoint = 81.201.149.152:18800">> $file_name
echo "AllowedIPs= $allow ">> $file_name
if [ $allow -eq 1 ];then
echo -e "AllowedIPs= 10.10.11.0/24 " >> $file_name
elif [ $allow -eq 2 ];then
echo -e "AllowedIPs= $user_input ">> $file_name
else
echo "Wrong input."
exit 1
fi
echo "PersistentKeepalive = 25" >> $file_name
echo -ne '################## (65%)\n'
sleep 1
@ -96,6 +104,7 @@ elif [ $user_wish -eq 2 ];then
echo "Your file is ready"
else
echo "Oops wrong input"
exit 1
fi
echo -ne '################### (70%)\n'
sleep 1
@ -125,7 +134,7 @@ push (){
echo -ne '######################### (95%)\n'
}
#---------------Pushing-to-repo-----------------
#-------------Done--Pushing--------------------
#---------------Call-Functions-----------------
check_ip

View File

@ -1 +1 @@
10.10111.11111./24 = privatekey= 2B5vDUu1JZZtpV7jMHfMYsF9Z8LHVSufIFWpQ6LIDFg= publickey= 3vE61SIhfnLdIOjalMZbxuKBxiTdOrAeJnPRIIx8Qg4=
10.10.11.3/24 = privatekey= EDz8Hb13LaOakMb6WIkkpzB9vmvYGlMC7nYs0flLAHI= publickey= gBJI+s7YpJU6OyPzZOpJ0mbIF497FwTb/HiV3fV3+ng=

View File

@ -1,9 +1,9 @@
[Interface]
Address = 10.10111.11111./24
PrivateKey = 2B5vDUu1JZZtpV7jMHfMYsF9Z8LHVSufIFWpQ6LIDFg=
Address = 10.10.11.3/24
PrivateKey = EDz8Hb13LaOakMb6WIkkpzB9vmvYGlMC7nYs0flLAHI=
DNS = 10.10.11.1,8.8.8.8
[Peer]
PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=
Endpoint = 81.201.149.152:18800
AllowedIPs= 10.10.10.11/24
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25