diff options
author | N0YB <Al_Stu@Frontier.com> | 2013-06-06 23:52:08 -0700 |
---|---|---|
committer | N0YB <Al_Stu@Frontier.com> | 2013-06-06 23:52:08 -0700 |
commit | f47371687b65db2afc7c847b558ce157d595cc3b (patch) | |
tree | 699293001c6ed2f4aa2722bc8fcb82b626535178 | |
parent | df6f94f31aa22e2fbf1a71a473a17ab890f45b0d (diff) | |
download | pfsense-packages-f47371687b65db2afc7c847b558ce157d595cc3b.tar.gz pfsense-packages-f47371687b65db2afc7c847b558ce157d595cc3b.tar.bz2 pfsense-packages-f47371687b65db2afc7c847b558ce157d595cc3b.zip |
Add Proxy Type Option
Allow UPD protocol with socks proxy
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 22 |
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") { |