add new client=''

This commit is contained in:
Leon Vita 2022-09-02 01:21:11 +01:00
parent 3b55b3409a
commit 8bd754c53b
5 changed files with 21 additions and 7 deletions

2
IPS
View File

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

16
gen.sh
View File

@ -8,7 +8,7 @@ read file_name
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 -e "Choose DNS: [1=Server 2=Google 3=Both 4=noDNS]";read DNS
sleep 1
echo -e "Share Network With Other-Clients:\n"
echo -e "[Yes=1 \ No=2]";read allow
@ -32,6 +32,7 @@ check_ip () {
do
if [[ "$ip" == "$user_input" ]];then
echo "ip exist"
echo "Try Again !!"
checked= return 1
exit 0
fi
@ -41,7 +42,9 @@ check_ip () {
then
echo "Ip Accepted:"
sleep 2
gen
gen #Function for generate the config.
push #Function for Pushing on Gitea.
echo "Done generating config:"
fi
}
echo -ne '##### (33%)\n'
@ -122,6 +125,7 @@ rm privatekey publickey
echo -ne '######################## (90%)\n'
sleep 1
echo -ne '\n'
}
@ -137,12 +141,12 @@ push (){
#-------------Done--Pushing--------------------
#---------------Call-Functions-----------------
check_ip
push
echo -ne '##########################(100%)\n'
#-----------------End--Pushing------------------
sleep 1
echo "Done generating config:"
#-----------------End--Call------------------
exit 0

BIN
qrscanme.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1 +1,2 @@
10.10.11.3/24 = privatekey= EDz8Hb13LaOakMb6WIkkpzB9vmvYGlMC7nYs0flLAHI= publickey= gBJI+s7YpJU6OyPzZOpJ0mbIF497FwTb/HiV3fV3+ng=
10.10.11.4/24 = privatekey= kGuOLPk8mux0Nu3DJxJFD+7UbUBAFVe/VP//fgxhdXY= publickey= 10kgZvJdWN8Ea4ai3AUweIy1KeNcXZjWvpjx+8P/71Q=

9
vpn.conf Normal file
View File

@ -0,0 +1,9 @@
[Interface]
Address = 10.10.11.4/24
PrivateKey = kGuOLPk8mux0Nu3DJxJFD+7UbUBAFVe/VP//fgxhdXY=
DNS = 10.10.11.1,8.8.8.8
[Peer]
PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=
Endpoint = 81.201.149.152:18800
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25