dialog --title$"VPN Connect to another mesh network"\
--backtitle$"Freedombone Mesh"\
--defaultno\
--yesno$"\nHave you received the vpn.tar.gz file from the other mesh administrator, uncompressed it into the /home/fbone directory and also forwarded port $VPN_MESH_TLS_PORT from your internet router to this system?" 10 70
sel=$?
case$selin
1)return;;
255)return;;
esac
function connect_to_mesh {
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --title$"VPN Connect to another mesh network"\
dialog --title$"Connect to another mesh network"\
--backtitle$"Freedombone Mesh"\
--inputbox$'Enter the IP address or domain name of the other mesh.' 10 60 2>$data
sel=$?
...
...
@@ -180,15 +170,20 @@ function connect_to_vpn {
if[${#ip_or_domain}-gt 1 ];then
if[["$ip_or_domain"==*'.'*]];then
connect_failed=
if[!-f ~/client.ovpn ];then
rm$data
exit 1
connect_failed=1
fi
if[!-f ~/stunnel.pem ];then
rm$data
exit 1
connect_failed=1
fi
if[!-f ~/stunnel.p12 ];then
connect_failed=1
fi
if[$connect_failed];then
dialog --title$"Connect to another mesh network"\
--msgbox$"\nObtain the vpn.tar.gz file from the other mesh administrator, uncompress it into the /home/fbone directory and also forwarded port $VPN_MESH_TLS_PORT from your internet router to this system." 10 50