aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-10-02 14:32:32 -0400
committerjim-p <jimp@pfsense.org>2012-10-02 15:19:41 -0400
commitbc0781c4440f976e68b2032b8bf2e09488abacd2 (patch)
tree5ec2cde5c351c4a759806ea03b9dcc49ceed1537
parent0edf4e67178a769a1bb784401aa2bcf7b7c2c109 (diff)
downloadpfsense-packages-bc0781c4440f976e68b2032b8bf2e09488abacd2.tar.gz
pfsense-packages-bc0781c4440f976e68b2032b8bf2e09488abacd2.tar.bz2
pfsense-packages-bc0781c4440f976e68b2032b8bf2e09488abacd2.zip
Add export option for OpenVPN 2.3 beta client as well as the existing one.
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc17
-rwxr-xr-xconfig/openvpn-client-export/vpn_openvpn_export.php33
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 41 insertions, 13 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 1c556d10..a96c6638 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -411,15 +411,28 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
}
}
-function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $outpass, $proxy, $advancedoptions) {
+function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $outpass, $proxy, $advancedoptions, $openvpn_version = "2.1") {
global $config, $g, $input_errors;
$uname_p = trim(exec("uname -p"));
+ switch ($openvpn_version) {
+ case "2.3-x86":
+ $client_install_exe = "openvpn-install-2.3-i686.exe";
+ break;
+ case "2.3-x64":
+ $client_install_exe = "openvpn-install-2.3-x86_64.exe";
+ break;
+ default:
+ $client_install_exe = "openvpn-install-2.2.exe";
+ }
+
$ovpndir = "/usr/local/share/openvpn";
$workdir = "{$ovpndir}/client-export";
- if (!file_exists($workdir . "/template/openvpn-install.exe"))
+ if (!file_exists($workdir . "/template/{$client_install_exe}"))
openvpn_client_export_install();
+ exec("/bin/cp {$workdir}/template/{$client_install_exe} {$workdir}/template/openvpn-install.exe");
+
$validconfig = openvpn_client_export_validate_config($srvid, $usrid, $crtid);
if ($validconfig) {
list($settings, $server_cert, $server_ca, $servercn, $user, $cert, $nokeys) = $validconfig;
diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php
index 811fb62f..414ad7d0 100755
--- a/config/openvpn-client-export/vpn_openvpn_export.php
+++ b/config/openvpn-client-export/vpn_openvpn_export.php
@@ -211,9 +211,9 @@ if (!empty($act)) {
$exp_path = viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $password, $proxy, $advancedoptions);
}
- if($act == "inst") {
+ if(substr($act, 0, 4) == "inst") {
$exp_name = urlencode($exp_name."-install.exe");
- $exp_path = openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $password, $proxy, $advancedoptions);
+ $exp_path = openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $password, $proxy, $advancedoptions, substr($act, 5));
}
if (!$exp_path) {
@@ -306,7 +306,7 @@ function download_begin(act, i, j) {
var pass = document.getElementById("pass").value;
var conf = document.getElementById("conf").value;
- if (usepass && (act == "inst")) {
+ if (usepass && (act.substring(0,4) == "inst")) {
if (!pass || !conf) {
alert("The password or confirm field is empty");
return;
@@ -408,8 +408,13 @@ function server_changed() {
cell2.innerHTML += "<a href='javascript:download_begin(\"confinline\"," + i + ", -1)'>Inline Configuration</a>";
cell2.innerHTML += "<br/>";
cell2.innerHTML += "<a href='javascript:download_begin(\"confzip\"," + i + ", -1)'>Configuration archive</a>";
- cell2.innerHTML += "<br/>";
- cell2.innerHTML += "<a href='javascript:download_begin(\"inst\"," + i + ", -1)'>Windows Installer</a>";
+ cell2.innerHTML += "<br/>Windows Installers:<br/>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"inst\"," + i + ", -1)'>2.2</a>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"inst-2.3-x86\"," + i + ", -1)'>2.3-x86 (Beta)</a>";
+// cell2.innerHTML += "&nbsp;&nbsp; ";
+// cell2.innerHTML += "<a href='javascript:download_begin(\"inst-2.3-x64\"," + i + ", -1)'>2.3-x64 (Beta)</a>";
cell2.innerHTML += "<br/>";
cell2.innerHTML += "<a href='javascript:download_begin(\"visc\"," + i + ", -1)'>Viscosity Bundle</a>";
}
@@ -432,8 +437,13 @@ function server_changed() {
cell2.innerHTML += "<a href='javascript:download_begin(\"confinline\", -1," + j + ")'>Inline Configuration</a>";
cell2.innerHTML += "<br/>";
cell2.innerHTML += "<a href='javascript:download_begin(\"confzip\", -1," + j + ")'>Configuration archive</a>";
- cell2.innerHTML += "<br/>";
- cell2.innerHTML += "<a href='javascript:download_begin(\"inst\", -1," + j + ")'>Windows Installer</a>";
+ cell2.innerHTML += "<br/>Windows Installers:<br/>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"inst\", -1," + j + ")'>2.2</a>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"inst-2.3-x86\", -1," + j + ")'>2.3-x86 (Beta)</a>";
+// cell2.innerHTML += "&nbsp;&nbsp; ";
+// cell2.innerHTML += "<a href='javascript:download_begin(\"inst-2.3-x64\", -1," + j + ")'>2.3-x64 (Beta)</a>";
cell2.innerHTML += "<br/>";
cell2.innerHTML += "<a href='javascript:download_begin(\"visc\", -1," + j + ")'>Viscosity Bundle</a>";
if (servers[index][2] == "server_tls") {
@@ -463,8 +473,13 @@ function server_changed() {
cell2.innerHTML += "<a href='javascript:download_begin(\"confinline\"," + i + ")'>Inline Configuration</a>";
cell2.innerHTML += "<br/>";
cell2.innerHTML += "<a href='javascript:download_begin(\"confzip\"," + i + ")'>Configuration archive</a>";
- cell2.innerHTML += "<br/>";
- cell2.innerHTML += "<a href='javascript:download_begin(\"inst\"," + i + ")'>Windows Installer</a>";
+ cell2.innerHTML += "<br/>Windows Installers:<br/>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"inst\"," + i + ")'>2.2</a>";
+ cell2.innerHTML += "&nbsp;&nbsp; ";
+ cell2.innerHTML += "<a href='javascript:download_begin(\"inst-2.3-x86\"," + i + ")'>2.3-x86 (Beta)</a>";
+// cell2.innerHTML += "&nbsp;&nbsp; ";
+// cell2.innerHTML += "<a href='javascript:download_begin(\"inst-2.3-x64\"," + i + ")'>2.3-x64 (Beta)</a>";
cell2.innerHTML += "<br/>";
cell2.innerHTML += "<a href='javascript:download_begin(\"visc\"," + i + ")'>Viscosity Bundle</a>";
}
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 0ba9e673..abd340a8 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1381,7 +1381,7 @@
<depends_on_package_pbi>zip-3.0-i386.pbi p7zip-9.20.1-i386.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>0.24</version>
+ <version>0.25</version>
<status>BETA</status>
<required_version>2.0</required_version>
<config_file>http://www.pfsense.com/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index aac318e6..6f3fc475 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1368,7 +1368,7 @@
<depends_on_package_pbi>p7zip-9.20.1-amd64.pbi zip-3.0-amd64.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>0.24</version>
+ <version>0.25</version>
<status>BETA</status>
<required_version>2.0</required_version>
<config_file>http://www.pfsense.com/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>