diff --git a/IPS b/IPS index 71c1a56..cae9ea6 100644 --- a/IPS +++ b/IPS @@ -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" diff --git a/gen.sh b/gen.sh index e01a07e..a41b874 100755 --- a/gen.sh +++ b/gen.sh @@ -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 diff --git a/user_info b/user_info index d5f7745..1f85861 100644 --- a/user_info +++ b/user_info @@ -1 +1 @@ -10.10111.11111./24 = privatekey= 2B5vDUu1JZZtpV7jMHfMYsF9Z8LHVSufIFWpQ6LIDFg= publickey= 3vE61SIhfnLdIOjalMZbxuKBxiTdOrAeJnPRIIx8Qg4= +10.10.11.3/24 = privatekey= EDz8Hb13LaOakMb6WIkkpzB9vmvYGlMC7nYs0flLAHI= publickey= gBJI+s7YpJU6OyPzZOpJ0mbIF497FwTb/HiV3fV3+ng= diff --git a/vpn.conf b/vpn.conf index 33206bc..6287c23 100644 --- a/vpn.conf +++ b/vpn.conf @@ -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