diff --git a/net/haproxy/pkg-descr b/net/haproxy/pkg-descr index a7d97e8b0..691f992e2 100644 --- a/net/haproxy/pkg-descr +++ b/net/haproxy/pkg-descr @@ -25,6 +25,7 @@ Added: * add "enabled" field to rules * add support for all stick-table data types * add support for GPC/GPT/SC to conditions (#1123, #5109) +* add support for SSL SNI expression to servers (#3756) Changed: * upgrade to HAProxy 3.2 release series (#5147) diff --git a/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml b/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml index 99db8ffab..4dea54e11 100644 --- a/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml +++ b/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml @@ -117,9 +117,15 @@ server.sslSNI - + text - + + + + server.sslSNIExpr + + text + SNI expression to specify the data that will be sent in the SNI TLS extension to the server, e.g. req.hdr(host). When a SNI name is present it will be used instead and this option will be ignored.]]> server.sslVerify diff --git a/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml b/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml index 9ed90cbb1..8c69d381f 100644 --- a/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml +++ b/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml @@ -1553,6 +1553,11 @@ Should be a string between 1 and 255 characters. N + + /^.{1,255}$/u + Should be a string between 1 and 255 characters. + N + 1 Y diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index 8837f0004..508484eb3 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -2174,6 +2174,8 @@ backend {{backend.name}} {# # SNI #} {% if server_data.sslSNI|default('') != '' %} {% do server_options.append('sni str(' ~ server_data.sslSNI ~ ')') %} +{% elif server_data.sslSNIExpr|default('') != '' %} +{% do server_options.append('sni ~ server_data.sslSNIExpr) %} {% endif %} {# # HTTP/2 #} {% if backend.http2Enabled|default("") == '1' and backend.ba_advertised_protocols|default("") != "" %}