From 043bd6b3a5d02b3aead7a982f0e86348280af20d Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 30 Nov 2015 11:34:38 -0500 Subject: Add an option for a Viscosity-specific Inline export to the OpenVPN Client Export package. Implements #5466 --- config/openvpn-client-export/openvpn-client-export.inc | 13 +++++++++++++ config/openvpn-client-export/openvpn-client-export.xml | 2 +- config/openvpn-client-export/vpn_openvpn_export.php | 18 ++++++++++++++---- 3 files changed, 28 insertions(+), 5 deletions(-) (limited to 'config/openvpn-client-export') diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index 2ecb436b..c6a6f6e6 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -181,6 +181,18 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys $nl = ($doslines) ? "\r\n" : "\n"; $conf = ""; + if ($expformat == "inlinevisc") { + $conf .= <<{$nl}"; if ($settings['mode'] != "server_user") { diff --git a/config/openvpn-client-export/openvpn-client-export.xml b/config/openvpn-client-export/openvpn-client-export.xml index f1d032a9..adae671e 100755 --- a/config/openvpn-client-export/openvpn-client-export.xml +++ b/config/openvpn-client-export/openvpn-client-export.xml @@ -44,7 +44,7 @@ ]]> OpenVPN Client Export - 1.2.20 + 1.3.0 OpenVPN Client Export /usr/local/pkg/openvpn-client-export.inc diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php index 246e7421..4414dfe8 100755 --- a/config/openvpn-client-export/vpn_openvpn_export.php +++ b/config/openvpn-client-export/vpn_openvpn_export.php @@ -240,6 +240,10 @@ if (!empty($act)) { $exp_name = urlencode($exp_name . "-ios-config.ovpn"); $expformat = "inlineios"; break; + case "confinlinevisc": + $exp_name = urlencode($exp_name . "-viscosity-config.ovpn"); + $expformat = "inlinevisc"; + break; default: $exp_name = urlencode($exp_name . "-config.ovpn"); $expformat = "baseconf"; @@ -485,9 +489,11 @@ function server_changed() { cell2.innerHTML += "x86-win6<\/a>"; cell2.innerHTML += "   "; cell2.innerHTML += "x64-win6<\/a>"; - cell2.innerHTML += "- Mac OS X:"; + cell2.innerHTML += "- Viscosity (Mac OS X and Windows):"; cell2.innerHTML += "   "; cell2.innerHTML += "Viscosity Bundle<\/a>"; + cell2.innerHTML += "   "; + cell2.innerHTML += "Viscosity Inline Config<\/a>"; } for (j = 0; j < certs.length; j++) { var row = table.insertRow(table.rows.length); @@ -524,9 +530,11 @@ function server_changed() { cell2.innerHTML += "x86-win6<\/a>"; cell2.innerHTML += "   "; cell2.innerHTML += "x64-win6<\/a>"; - cell2.innerHTML += "- Mac OS X:"; + cell2.innerHTML += "- Viscosity (Mac OS X and Windows):"; cell2.innerHTML += "   "; cell2.innerHTML += "Viscosity Bundle<\/a>"; + cell2.innerHTML += "   "; + cell2.innerHTML += "Viscosity Inline Config<\/a>"; if (servers[index][2] == "server_tls") { cell2.innerHTML += "- Yealink SIP Handsets: "; cell2.innerHTML += "   "; @@ -570,9 +578,11 @@ function server_changed() { cell2.innerHTML += "x86-win6<\/a>"; cell2.innerHTML += "   "; cell2.innerHTML += "x64-win6<\/a>"; - cell2.innerHTML += "- Mac OS X:"; + cell2.innerHTML += "- Viscosity (Mac OS X and Windows):"; cell2.innerHTML += "   "; cell2.innerHTML += "Viscosity Bundle<\/a>"; + cell2.innerHTML += "   "; + cell2.innerHTML += "Viscosity Inline Config<\/a>"; } } @@ -939,7 +949,7 @@ function useproxy_changed(obj) {
-
-
: or - -
- +
-
- -- cgit v1.2.3