Update openvpn-install.sh

This commit is contained in:
Shahzain Ali 2024-09-03 02:00:24 +05:00 committed by GitHub
parent 1c5b053fe2
commit 11caaf0ec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -356,20 +356,13 @@ function installQuestions() {
fi fi
done done
echo "" echo ""
echo "Do you want the same client ovpn to connect for multiple clients?" echo "Do you want the same client .ovpn file to connect multiple clients? (This will add 'duplicate-cn' in the server.conf) [y/n]: "
echo " 1) Yes"
echo " 2) No" if [[ $MULTI_CLIENT_CHOICE =~ ^[Yy]$ ]]; then
until [[ $MULTI_CLIENT_CHOICE =~ ^[1-2]$ ]]; do MULTI_CLIENT="y"
read -rp "Choice [1-2]: " -e -i 2 MULTI_CLIENT_CHOICE else
done MULTI_CLIENT="n"
case $MULTI_CLIENT_CHOICE in fi
1)
MULTI_CLIENT="yes"
;;
2)
MULTI_CLIENT="no"
;;
esac
echo "" echo ""
echo "Do you want to use compression? It is not recommended since the VORACLE attack makes use of it." echo "Do you want to use compression? It is not recommended since the VORACLE attack makes use of it."
until [[ $COMPRESSION_ENABLED =~ (y|n) ]]; do until [[ $COMPRESSION_ENABLED =~ (y|n) ]]; do
@ -790,8 +783,8 @@ function installOpenVPN() {
echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf
fi fi
if [[ $MULTI_CLIENT == "yes" ]]; then if [[ $MULTI_CLIENT == "y" ]]; then
echo "duplicate-cn" >>/etc/openvpn/server.conf echo "-cn" >>/etc/openvpn/server.conf
fi fi
echo "dev tun echo "dev tun