summaryrefslogtreecommitdiff
path: root/data/templates/load-balancing
diff options
context:
space:
mode:
authorWindom WU <drw_08@hotmail.com>2024-04-23 14:39:02 +0800
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-23 07:30:11 +0000
commitff1636643bcd8b11b8538f998e7ba1188e9d3964 (patch)
treeb5bbf4acb5a91436290de43e13756e95f2906547 /data/templates/load-balancing
parent48461a9693568b1ca7ca4422130504cceed4ea28 (diff)
downloadvyos-1x-ff1636643bcd8b11b8538f998e7ba1188e9d3964.tar.gz
vyos-1x-ff1636643bcd8b11b8538f998e7ba1188e9d3964.zip
T6226: add HAPROXY tcp-request related block to load-balancing reverse proxy config
(cherry picked from commit 984c386d11ead8371b7ac381e6c0921473e557ed)
Diffstat (limited to 'data/templates/load-balancing')
-rw-r--r--data/templates/load-balancing/haproxy.cfg.j212
1 files changed, 12 insertions, 0 deletions
diff --git a/data/templates/load-balancing/haproxy.cfg.j2 b/data/templates/load-balancing/haproxy.cfg.j2
index dd93afba5..e8622ba7b 100644
--- a/data/templates/load-balancing/haproxy.cfg.j2
+++ b/data/templates/load-balancing/haproxy.cfg.j2
@@ -69,6 +69,18 @@ frontend {{ front }}
{% endif %}
{% if front_config.mode is vyos_defined %}
mode {{ front_config.mode }}
+{% if front_config.tcp_request.inspect_delay is vyos_defined %}
+ tcp-request inspect-delay {{ front_config.tcp_request.inspect_delay }}
+{% endif %}
+{# add tcp-request related directive if ssl is configed #}
+{% if front_config.mode is vyos_defined('tcp') and front_config.rule is vyos_defined %}
+{% for rule, rule_config in front_config.rule.items() %}
+{% if rule_config.ssl is vyos_defined %}
+ tcp-request content accept if { req_ssl_hello_type 1 }
+{% break %}
+{% endif %}
+{% endfor %}
+{% endif %}
{% endif %}
{% if front_config.rule is vyos_defined %}
{% for rule, rule_config in front_config.rule.items() %}