mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-23 21:30:15 +00:00
Added message about TCP
This commit is contained in:
parent
c15718f693
commit
cf5ba27a21
1 changed files with 9 additions and 14 deletions
|
@ -477,20 +477,15 @@ update_repo() {
|
||||||
|
|
||||||
setCustomProto() {
|
setCustomProto() {
|
||||||
# Set the available protocols into an array so it can be used with a whiptail dialog
|
# Set the available protocols into an array so it can be used with a whiptail dialog
|
||||||
protoArray=()
|
protocol=$(whiptail --title "Protocol" --radiolist \
|
||||||
protoArray+=("udp" "available" "ON")
|
"Choose a protocol. Please only choose TCP if you know why you need TCP." $r $c 2 \
|
||||||
protoArray+=("tcp" "available" "OFF")
|
"UDP" "" ON \
|
||||||
|
"TCP" "" OFF 3>&1 1>&2 2>&3)
|
||||||
chooseProtoCmd=(whiptail --separate-output --radiolist "Choose A Protocol" $r $c 2)
|
if [ $? -eq 0 ]; then
|
||||||
echo "${chooseProtoCmd[@]}" "${protoArray[@]}"
|
# Convert option into lowercase (UDP->udp)
|
||||||
chooseProtoOptions=$("${chooseProtoCmd[@]}" "${protoArray[@]}" 2>&1 >/dev/tty)
|
pivpnProto="${protocol,,}"
|
||||||
if [[ $? = 0 ]]; then
|
echo "::: Using protocol: $pivpnProto"
|
||||||
for desiredProto in $chooseProtoOptions
|
echo "${pivpnProto}" > /tmp/pivpnPROTO
|
||||||
do
|
|
||||||
pivpnProto=$desiredProto
|
|
||||||
echo "::: Using protocol: $pivpnProto"
|
|
||||||
echo "${pivpnProto}" > /tmp/pivpnPROTO
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
echo "::: Cancel selected, exiting...."
|
echo "::: Cancel selected, exiting...."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue