nginx-proxy-manager-zh/backend/templates/stream.conf

33 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-08-16 19:25:59 -04:00
# ------------------------------------------------------------
# {{ incoming_port }} TCP: {{ tcp_forwarding }} UDP: {{ udp_forwarding }}
2018-08-16 19:25:59 -04:00
# ------------------------------------------------------------
{% if enabled %}
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
server {
2024-07-22 15:53:21 -04:00
listen {{ incoming_port }} {%- if certificate %} ssl {%- endif %};
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} {%- if certificate %} ssl {%- endif %};
2024-07-22 15:53:21 -04:00
{%- include "_certificates_stream.conf" %}
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
# Custom
include /data/nginx/custom/server_stream[.]conf;
include /data/nginx/custom/server_stream_tcp[.]conf;
}
{% endif %}
2024-07-22 15:53:21 -04:00
{% if udp_forwarding == 1 or udp_forwarding == true -%}
server {
2018-08-16 19:25:59 -04:00
listen {{ incoming_port }} udp;
2024-07-22 15:53:21 -04:00
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp;
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
# Custom
include /data/nginx/custom/server_stream[.]conf;
include /data/nginx/custom/server_stream_udp[.]conf;
}
{% endif %}
{% endif %}