mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
VPN: OpenVPN: Instances - add basic http client option, closes https://github.com/opnsense/core/issues/8342
This commit is contained in:
parent
e7ad0a4fcb
commit
eb6e9a9fcf
@ -670,4 +670,14 @@ Set to 0 to disable, remember to change your client as well.
|
||||
<formatter>boolean</formatter>
|
||||
</grid_view>
|
||||
</field>
|
||||
<field>
|
||||
<id>instance.http-proxy</id>
|
||||
<label>HTTP Proxy</label>
|
||||
<type>text</type>
|
||||
<style>role role_client</style>
|
||||
<help>Use a http proxy to connect to the selected server, define as host:port.</help>
|
||||
<grid_view>
|
||||
<visible>false</visible>
|
||||
</grid_view>
|
||||
</field>
|
||||
</fields>
|
||||
|
||||
@ -548,6 +548,11 @@ class OpenVPN extends BaseModel
|
||||
if (!empty((string)$node->remote_cert_tls)) {
|
||||
$options['remote-cert-tls'] = 'server';
|
||||
}
|
||||
if (strrpos($node->{'http-proxy'}, ':') > 0) {
|
||||
$tmp = substr_replace($node->{'http-proxy'}, ' ', strrpos($node->{'http-proxy'}, ':'), 1);
|
||||
$options['http-proxy'] = $tmp;
|
||||
}
|
||||
|
||||
// XXX: In some cases it might be practical to drop privileges, for server mode this will be
|
||||
// more difficult due to the associated script actions (and their requirements).
|
||||
//$options['user'] = 'openvpn';
|
||||
|
||||
@ -382,6 +382,9 @@
|
||||
<description type="DescriptionField"/>
|
||||
<compress_migrate type="BooleanField"/>
|
||||
<ifconfig-pool-persist type="BooleanField"/>
|
||||
<http-proxy type="IPPortField">
|
||||
<HostnameAllowed>Y</HostnameAllowed>
|
||||
</http-proxy>
|
||||
</Instance>
|
||||
</Instances>
|
||||
<StaticKeys>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user