diff --git a/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml b/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml
index 71dea4c39..1ec1e4498 100644
--- a/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml
+++ b/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml
@@ -670,4 +670,14 @@ Set to 0 to disable, remember to change your client as well.
boolean
+
+ instance.http-proxy
+
+ text
+
+ Use a http proxy to connect to the selected server, define as host:port.
+
+ false
+
+
diff --git a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php
index cece2a4e0..61c53fdbf 100644
--- a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php
+++ b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php
@@ -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';
diff --git a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml
index 33a1ab125..9ce600a84 100644
--- a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml
+++ b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml
@@ -382,6 +382,9 @@
+
+ Y
+