aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorNamezero <namezero@afim.info>2011-09-19 12:15:27 +0300
committerNamezero <namezero@afim.info>2011-09-19 12:15:27 +0300
commitc84ad3f0dd852dd02ce83e1b5e4d9feb525d4aca (patch)
tree4b8170f892d3a7251501450f13daf72c4e581d51 /config
parent4211a3ac66377aeb9bf8cb5ccefe04641e03544b (diff)
downloadpfsense-packages-c84ad3f0dd852dd02ce83e1b5e4d9feb525d4aca.tar.gz
pfsense-packages-c84ad3f0dd852dd02ce83e1b5e4d9feb525d4aca.tar.bz2
pfsense-packages-c84ad3f0dd852dd02ce83e1b5e4d9feb525d4aca.zip
Changes for advanced options
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc15
1 files changed, 10 insertions, 5 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 31565656..cff52d56 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -3,7 +3,7 @@
openvpn-client-export.inc
Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2008 Shrew Soft Inc
- Copyright (C) 2010 Ermal Luçi
+ Copyright (C) 2010 Ermal Lu�i
All rights reserved.
Parts of this code was originally based on vpn_ipsec_sad.php
@@ -231,6 +231,11 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke
$conf .= "comp-lzo{$nl}";
if ($settings['passtos'])
$conf .= "passtos{$nl}";
+
+ // add advanced options
+ $advancedoptions = str_replace(";", $nl, $advancedoptions);
+ $conf .= $advancedoptions;
+ $conf .= $nl;
if ($zipconf == true) {
// create template directory
@@ -270,7 +275,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke
return $conf;
}
-function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $usetoken, $outpass, $proxy) {
+function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $usetoken, $outpass, $proxy, $advancedoptions) {
global $config, $g, $input_errors;
$ovpndir = "/usr/local/share/openvpn";
@@ -344,7 +349,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
$pwdfle .= "{$proxy['password']}\r\n";
file_put_contents("{$confdir}/{$proxy['passwdfile']}", $pwdfle);
}
- $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, $nokeys, $proxy, false, "", false, $doslines=true);
+ $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, $nokeys, $proxy, false, "", false, $doslines=true, $advancedoptions);
if (!$conf) {
$input_errors[] = "Could not create a config to export.";
return false;
@@ -400,7 +405,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
return $outfile;
}
-function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $usetoken, $outpass, $proxy) {
+function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $usetoken, $outpass, $proxy, $advancedoptions) {
global $config, $g;
$ovpndir = "/usr/local/share/openvpn/";
@@ -461,7 +466,7 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
file_put_contents("{$tempdir}/{$proxy['passwdfile']}", $pwdfle);
}
- $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, true, $proxy, false, "", true);
+ $conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, true, $proxy, false, "", true, $advancedoptions);
if (!$conf)
return false;