diff options
author | N0YB <Al_Stu@Frontier.com> | 2013-06-05 21:09:16 -0700 |
---|---|---|
committer | N0YB <Al_Stu@Frontier.com> | 2013-06-05 21:09:16 -0700 |
commit | 50152cdeade8e6927cd34681525955be3c0ad1fe (patch) | |
tree | 9212479004c98d4d0fb6fad566c8f9cf20e3802f /config/openvpn-client-export/openvpn-client-export.inc | |
parent | ee6c400fe47de2e632fe5144efb4b259db5cfde4 (diff) | |
download | pfsense-packages-50152cdeade8e6927cd34681525955be3c0ad1fe.tar.gz pfsense-packages-50152cdeade8e6927cd34681525955be3c0ad1fe.tar.bz2 pfsense-packages-50152cdeade8e6927cd34681525955be3c0ad1fe.zip |
Add Proxy Type Option
Diffstat (limited to 'config/openvpn-client-export/openvpn-client-export.inc')
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index d79c42c3..02e89eb9 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -230,7 +230,10 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese $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'] == "http") + $conf .= "http-proxy {$proxy['ip']} {$proxy['port']} "; + if ($proxy['proxy_type'] == "socks") + $conf .= "socks-proxy {$proxy['ip']} {$proxy['port']} "; if ($proxy['proxy_authtype'] != "none") { if (!isset($proxy['passwdfile'])) $proxy['passwdfile'] = openvpn_client_export_prefix($srvid, $usrid, $crtid) . "-proxy"; @@ -749,7 +752,10 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco $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'] == "http") + $conf .= "http-proxy {$proxy['ip']} {$proxy['port']} "; + if ($proxy['proxy_type'] == "socks") + $conf .= "socks-proxy {$proxy['ip']} {$proxy['port']} "; if ($proxy['proxy_authtype'] != "none") { if (!isset($proxy['passwdfile'])) $proxy['passwdfile'] = openvpn_client_export_prefix($srvid) . "-proxy"; |