diff --git a/gen.sh b/gen.sh index 4f81cd0..30fa677 100755 --- a/gen.sh +++ b/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 diff --git a/qrscanme.png b/qrscanme.png deleted file mode 100644 index 777431a..0000000 Binary files a/qrscanme.png and /dev/null differ diff --git a/vpn.conf b/vpn.conf deleted file mode 100644 index 9b6f357..0000000 --- a/vpn.conf +++ /dev/null @@ -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