diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-02-23 19:04:39 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-02-23 19:04:39 +0000 |
commit | 762a24a382ca93d2b78c8917c6cfe9d271c098c9 (patch) | |
tree | 1e0cc5335124b0cf9385794610a9947a879e0cd6 /etc/inc/openvpn.inc | |
parent | cb074893080f9187587f5d6e9a9829eebc8491ef (diff) | |
download | pfsense-762a24a382ca93d2b78c8917c6cfe9d271c098c9.zip pfsense-762a24a382ca93d2b78c8917c6cfe9d271c098c9.tar.gz |
Add proxy authentication capabilities to OpenVPN client.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r-- | etc/inc/openvpn.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index a67d1bb..7033254 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -446,8 +446,16 @@ function openvpn_reconfigure($mode,& $settings) { $conf .= "ifconfig $ip2 $ip1\n"; } - if ($settings['proxy_addr']) - $conf .= "http-proxy {$settings['proxy_addr']} {$settings['proxy_port']}\n"; + if ($settings['proxy_addr']) { + $conf .= "http-proxy {$settings['proxy_addr']} {$settings['proxy_port']}"; + if ($settings['proxy_authtype'] != "none") { + $conf .= " {$g['varetc_path']}/openvpn/{$mode_id}.pas {$settings['proxy_authtype']}"; + $proxypas = "{$settings['proxy_user']}\n"; + $proxypas .= "{$settings['proxy_passwd']}\n"; + file_put_contents("{$g['varetc_path']}/openvpn/{$mode_id}.pas", $proxypas); + } + $conf .= " \n"; + } } // Add a remote network route if set |