Files

40 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2018-08-17 09:25:59 +10:00
# ------------------------------------------------------------
2018-08-02 19:48:47 +10:00
# {{ incoming_port }} TCP: {{ tcp_forwarding }} UDP: {{ udp_forwarding }}
2018-08-17 09:25:59 +10:00
# ------------------------------------------------------------
2018-08-02 19:48:47 +10:00
2019-01-03 21:04:11 +10:00
{% if enabled %}
2018-08-02 19:48:47 +10:00
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
2018-08-01 21:18:17 +10:00
server {
listen {{ incoming_port }} reuseport {%- if certificate %} ssl {%- endif %};
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} reuseport {%- if certificate %} ssl {%- endif %};
2020-04-07 10:43:19 +10:00
2024-07-22 20:53:21 +01:00
{%- include "_certificates_stream.conf" %}
2021-04-24 01:09:01 +02:00
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
2025-12-30 21:44:29 -08:00
access_log /data/logs/stream-{{ id }}_access.log stream;
error_log /data/logs/stream-{{ id }}_error.log warn;
# Custom
include /data/nginx/custom/server_stream[.]conf;
include /data/nginx/custom/server_stream_tcp[.]conf;
2018-08-01 21:18:17 +10:00
}
2018-08-02 19:48:47 +10:00
{% endif %}
2024-07-22 20:53:21 +01:00
{% if udp_forwarding == 1 or udp_forwarding == true -%}
2018-08-02 19:48:47 +10:00
server {
listen {{ incoming_port }} udp reuseport;
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp reuseport;
2024-07-22 20:53:21 +01:00
2021-04-24 01:09:01 +02:00
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
2025-12-30 21:44:29 -08:00
access_log /data/logs/stream-{{ id }}_access.log stream;
error_log /data/logs/stream-{{ id }}_error.log warn;
# Custom
include /data/nginx/custom/server_stream[.]conf;
include /data/nginx/custom/server_stream_udp[.]conf;
2018-08-02 19:48:47 +10:00
}
{% endif %}
2025-12-30 21:44:29 -08:00
{% endif %}