mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Set default ports as 1194 for UDP and 443 port for TCP
This commit is contained in:
parent
cf5ba27a21
commit
ac28a7c3e4
1 changed files with 8 additions and 1 deletions
|
@ -501,7 +501,14 @@ setCustomPort() {
|
|||
do
|
||||
portInvalid="Invalid"
|
||||
|
||||
PORT=$(whiptail --title "Default OpenVPN Port" --inputbox "You can modify the default OpenVPN port. \nEnter a new value or hit 'Enter' to retain the default" $r $c 1194 3>&1 1>&2 2>&3)
|
||||
PROTO=`cat /etc/pivpn/INSTALL_PROTO`
|
||||
if [ "$PROTO" = "udp" ]; then
|
||||
DEFAULT_PORT=1194
|
||||
else
|
||||
DEFAULT_PORT=443
|
||||
fi
|
||||
|
||||
PORT=$(whiptail --title "Default OpenVPN Port" --inputbox "You can modify the default OpenVPN port. \nEnter a new value or hit 'Enter' to retain the default" $r $c $DEFAULT_PORT 3>&1 1>&2 2>&3)
|
||||
if [[ $? = 0 ]]; then
|
||||
if [[ "$PORT" =~ ^[0-9]+$ ]] && [ "$PORT" -ge 1 -a "$PORT" -le 65535 ]; then
|
||||
:
|
||||
|
|
Loading…
Reference in a new issue