add PROXY to stream hosts.

This commit is contained in:
baudneo
2022-10-10 13:59:59 -06:00
parent b8978cb955
commit 5970b74321
11 changed files with 170 additions and 15 deletions

View File

@@ -5,13 +5,16 @@
{% if enabled %}
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
server {
listen {{ incoming_port }};
listen {{ incoming_port }}{% if stream_allow_proxy_protocol == 1 or stream_allow_proxy_protocol == true%} proxy_protocol{% endif %};
{% if ipv6 -%}
listen [::]:{{ incoming_port }};
listen [::]:{{ incoming_port }}{% if stream_allow_proxy_protocol == 1 or stream_allow_proxy_protocol == true%} proxy_protocol{% endif %};
{% else -%}
#listen [::]:{{ incoming_port }};
{% endif %}
{%if stream_enable_proxy_protocol == 1 or stream_enable_proxy_protocol == true%}
proxy_protocol on;
{% endif %}
{% include '_stream_proxy_protocol.conf' %}
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
# Custom