aboutsummaryrefslogtreecommitdiffstats
path: root/config/openvpn-client-export
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-11-30 11:34:38 -0500
committerjim-p <jimp@pfsense.org>2015-11-30 11:34:38 -0500
commit043bd6b3a5d02b3aead7a982f0e86348280af20d (patch)
tree65c1fd1b3b8a54feb33ec7c0f6e59ec7f17e1297 /config/openvpn-client-export
parent1ffd0c4e5b8a4f7e4d729b535397d59f4284d34e (diff)
downloadpfsense-packages-043bd6b3a5d02b3aead7a982f0e86348280af20d.tar.gz
pfsense-packages-043bd6b3a5d02b3aead7a982f0e86348280af20d.tar.bz2
pfsense-packages-043bd6b3a5d02b3aead7a982f0e86348280af20d.zip
Add an option for a Viscosity-specific Inline export to the OpenVPN Client Export package. Implements #5466
Diffstat (limited to 'config/openvpn-client-export')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc13
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.xml2
-rwxr-xr-xconfig/openvpn-client-export/vpn_openvpn_export.php18
3 files changed, 28 insertions, 5 deletions
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 .= <<<EOF
+#-- Config Auto Generated By pfSense for Viscosity --#
+
+#viscosity startonopen false
+#viscosity dhcp true
+#viscosity dnssupport true
+#viscosity name {$friendly_name}
+
+EOF;
+ }
+
$validconfig = openvpn_client_export_validate_config($srvid, $usrid, $crtid);
if ($validconfig) {
list($settings, $server_cert, $server_ca, $servercn, $user, $cert, $nokeys) = $validconfig;
@@ -413,6 +425,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
case "inline":
case "inlinedroid":
case "inlineios":
+ case "inlinevisc":
// Inline CA
$conf .= "<ca>{$nl}" . trim($server_ca) . "{$nl}</ca>{$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 @@
]]>
</copyright>
<name>OpenVPN Client Export</name>
- <version>1.2.20</version>
+ <version>1.3.0</version>
<title>OpenVPN Client Export</title>
<include_file>/usr/local/pkg/openvpn-client-export.inc</include_file>
<tabs>
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 += "<a href='javascript:download_begin(\"inst-x86-win6\"," + i + ", -1)'>x86-win6<\/a>";
cell2.innerHTML += "&nbsp;&nbsp; ";
cell2.innerHTML += "<a href='javascript:download_begin(\"inst-x64-win6\"," + i + ", -1)'>x64-win6<\/a>";
- cell2.innerHTML += "<br\/>- Mac OS X:<br\/>";
+ cell2.innerHTML += "<br\/>- Viscosity (Mac OS X and Windows):<br\/>";
cell2.innerHTML += "&nbsp;&nbsp; ";
cell2.innerHTML += "<a href='javascript:download_begin(\"visc\"," + i + ", -1)'>Viscosity Bundle<\/a>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"confinlinevisc\"," + i + ", -1)'>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 += "<a href='javascript:download_begin(\"inst-x86-win6\", -1," + j + ")'>x86-win6<\/a>";
cell2.innerHTML += "&nbsp;&nbsp; ";
cell2.innerHTML += "<a href='javascript:download_begin(\"inst-x64-win6\", -1," + j + ")'>x64-win6<\/a>";
- cell2.innerHTML += "<br\/>- Mac OS X:<br\/>";
+ cell2.innerHTML += "<br\/>- Viscosity (Mac OS X and Windows):<br\/>";
cell2.innerHTML += "&nbsp;&nbsp; ";
cell2.innerHTML += "<a href='javascript:download_begin(\"visc\", -1," + j + ")'>Viscosity Bundle<\/a>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"confinlinevisc\", -1," + j + ")'>Viscosity Inline Config<\/a>";
if (servers[index][2] == "server_tls") {
cell2.innerHTML += "<br\/>- Yealink SIP Handsets: <br\/>";
cell2.innerHTML += "&nbsp;&nbsp; ";
@@ -570,9 +578,11 @@ function server_changed() {
cell2.innerHTML += "<a href='javascript:download_begin(\"inst-x86-win6\"," + i + ")'>x86-win6<\/a>";
cell2.innerHTML += "&nbsp;&nbsp; ";
cell2.innerHTML += "<a href='javascript:download_begin(\"inst-x64-win6\"," + i + ")'>x64-win6<\/a>";
- cell2.innerHTML += "<br\/>- Mac OS X:<br\/>";
+ cell2.innerHTML += "<br\/>- Viscosity (Mac OS X and Windows):<br\/>";
cell2.innerHTML += "&nbsp;&nbsp; ";
cell2.innerHTML += "<a href='javascript:download_begin(\"visc\"," + i + ")'>Viscosity Bundle<\/a>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"confinlinevisc\"," + i + ")'>Viscosity Inline Config<\/a>";
}
}
@@ -939,7 +949,7 @@ function useproxy_changed(obj) {
<br/><a href="https://play.google.com/store/apps/details?id=de.blinkt.openvpn"><?= gettext("OpenVPN For Android") ?></a> - <?=gettext("Recommended client for Android")?>
<br/><a href="http://www.featvpn.com/"><?= gettext("FEAT VPN For Android") ?></a> - <?=gettext("For older versions of Android")?>
<br/><?= gettext("OpenVPN Connect") ?>: <a href="https://play.google.com/store/apps/details?id=net.openvpn.openvpn"><?=gettext("Android (Google Play)")?></a> or <a href="https://itunes.apple.com/us/app/openvpn-connect/id590379981"><?=gettext("iOS (App Store)")?></a> - <?= gettext("Recommended client for iOS") ?>
- <br/><a href="https://www.sparklabs.com/viscosity/"><?= gettext("Viscosity") ?></a> - <?= gettext("Recommended client for Mac OS X") ?>
+ <br/><a href="https://www.sparklabs.com/viscosity/"><?= gettext("Viscosity") ?></a> - <?= gettext("Recommended commercial client for Mac OS X and Windows") ?>
<br/><a href="https://tunnelblick.net"><?= gettext("Tunnelblick") ?></a> - <?= gettext("Free client for OS X") ?>
</td>
</tr>