aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorN0YB <Al_Stu@Frontier.com>2013-06-06 23:52:08 -0700
committerN0YB <Al_Stu@Frontier.com>2013-06-06 23:52:08 -0700
commitf47371687b65db2afc7c847b558ce157d595cc3b (patch)
tree699293001c6ed2f4aa2722bc8fcb82b626535178 /config
parentdf6f94f31aa22e2fbf1a71a473a17ab890f45b0d (diff)
downloadpfsense-packages-f47371687b65db2afc7c847b558ce157d595cc3b.tar.gz
pfsense-packages-f47371687b65db2afc7c847b558ce157d595cc3b.tar.bz2
pfsense-packages-f47371687b65db2afc7c847b558ce157d595cc3b.zip
Add Proxy Type Option
Allow UPD protocol with socks proxy
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc22
1 files changed, 12 insertions, 10 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 02e89eb9..06a0928c 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -226,12 +226,13 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
}
if (!empty($proxy)) {
- if ($proto == "udp") {
- $input_errors[] = "This server uses UDP protocol and cannot communicate with HTTP proxy.";
- return;
- }
- if ($proxy['proxy_type'] == "http")
+ if ($proxy['proxy_type'] == "http") {
+ if ($proto == "udp") {
+ $input_errors[] = "This server uses UDP protocol and cannot communicate with HTTP proxy.";
+ return;
+ }
$conf .= "http-proxy {$proxy['ip']} {$proxy['port']} ";
+ }
if ($proxy['proxy_type'] == "socks")
$conf .= "socks-proxy {$proxy['ip']} {$proxy['port']} ";
if ($proxy['proxy_authtype'] != "none") {
@@ -748,12 +749,13 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
$conf .= "ping-timer-rem\n";
if (!empty($proxy)) {
- if ($proto == "udp") {
- $input_errors[] = "This server uses UDP protocol and cannot communicate with HTTP proxy.";
- return;
- }
- if ($proxy['proxy_type'] == "http")
+ if ($proxy['proxy_type'] == "http") {
+ if ($proto == "udp") {
+ $input_errors[] = "This server uses UDP protocol and cannot communicate with HTTP proxy.";
+ return;
+ }
$conf .= "http-proxy {$proxy['ip']} {$proxy['port']} ";
+ }
if ($proxy['proxy_type'] == "socks")
$conf .= "socks-proxy {$proxy['ip']} {$proxy['port']} ";
if ($proxy['proxy_authtype'] != "none") {