mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: support TCP inspection delay in rules, refs #1188
This commit is contained in:
@@ -332,6 +332,17 @@
|
||||
<type>text</type>
|
||||
<help><![CDATA[Register the specified Lua service. You will most likely need to include/load your Lua code first.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<label>Parameters</label>
|
||||
<type>header</type>
|
||||
<style>type_table table_tcp-request_inspect-delay</style>
|
||||
</field>
|
||||
<field>
|
||||
<id>action.tcp_request_inspect_delay</id>
|
||||
<label>TCP inspection delay</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum allowed time to wait for data during content inspection. Defaults to milliseconds. You may also enter a number followed by one of the supported suffixes "d" (days), "h" (hour), "m" (minute), "s" (seconds), "ms" (miliseconds).]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<label>Parameters</label>
|
||||
<type>header</type>
|
||||
@@ -343,6 +354,17 @@
|
||||
<type>text</type>
|
||||
<help><![CDATA[Execute the specified Lua function. You will most likely need to include/load your Lua code first.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<label>Parameters</label>
|
||||
<type>header</type>
|
||||
<style>type_table table_tcp-response_inspect-delay</style>
|
||||
</field>
|
||||
<field>
|
||||
<id>action.tcp_response_inspect_delay</id>
|
||||
<label>TCP inspection delay</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum allowed time to wait for a response during content inspection. Defaults to milliseconds. You may also enter a number followed by one of the supported suffixes "d" (days), "h" (hour), "m" (minute), "s" (seconds), "ms" (miliseconds).]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<label>Parameters</label>
|
||||
<type>header</type>
|
||||
|
||||
@@ -1763,10 +1763,12 @@
|
||||
<tcp-request_content_reject>tcp-request content reject</tcp-request_content_reject>
|
||||
<tcp-request_content_lua>tcp-request content lua script</tcp-request_content_lua>
|
||||
<tcp-request_content_use-service>tcp-request content use-service</tcp-request_content_use-service>
|
||||
<tcp-request_inspect-delay>tcp-request inspect-delay</tcp-request_inspect-delay>
|
||||
<tcp-response_content_accept>tcp-response content accept</tcp-response_content_accept>
|
||||
<tcp-response_content_close>tcp-response content close</tcp-response_content_close>
|
||||
<tcp-response_content_reject>tcp-response content reject</tcp-response_content_reject>
|
||||
<tcp-response_content_lua>tcp-response content lua script</tcp-response_content_lua>
|
||||
<tcp-response_inspect-delay>tcp-response inspect-delay</tcp-response_inspect-delay>
|
||||
<custom>Custom rule (option pass-through)</custom>
|
||||
</OptionValues>
|
||||
</type>
|
||||
@@ -1909,10 +1911,18 @@
|
||||
<mask>/^.{1,4096}$/u</mask>
|
||||
<Required>N</Required>
|
||||
</tcp_request_content_use_service>
|
||||
<tcp_request_inspect_delay type="TextField">
|
||||
<mask>/^.{1,32}$/u</mask>
|
||||
<Required>N</Required>
|
||||
</tcp_request_inspect_delay>
|
||||
<tcp_response_content_lua type="TextField">
|
||||
<mask>/^.{1,4096}$/u</mask>
|
||||
<Required>N</Required>
|
||||
</tcp_response_content_lua>
|
||||
<tcp_response_inspect_delay type="TextField">
|
||||
<mask>/^.{1,32}$/u</mask>
|
||||
<Required>N</Required>
|
||||
</tcp_response_inspect_delay>
|
||||
<custom type="TextField">
|
||||
<mask>/^.{1,4096}$/u</mask>
|
||||
<Required>N</Required>
|
||||
|
||||
@@ -490,6 +490,13 @@
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'tcp-request_inspect-delay' %}
|
||||
{% if action_data.tcp_request_inspect_delay|default("") != "" %}
|
||||
{% do action_options.append('tcp-request inspect-delay ' ~ action_data.tcp_request_inspect_delay) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'tcp-response_content_accept' %}
|
||||
{% do action_options.append('tcp-response content accept') %}
|
||||
{% elif action_data.type == 'tcp-response_content_close' %}
|
||||
@@ -503,6 +510,13 @@
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'tcp-response_inspect-delay' %}
|
||||
{% if action_data.tcp_response_inspect_delay|default("") != "" %}
|
||||
{% do action_options.append('tcp-response inspect-delay ' ~ action_data.tcp_response_inspect_delay) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'custom' %}
|
||||
{% if action_data.custom|default("") != "" %}
|
||||
{% do action_options.append(action_data.custom) %}
|
||||
|
||||
Reference in New Issue
Block a user