2018-08-16 19:25:59 -04:00
|
|
|
# ------------------------------------------------------------
|
2018-08-02 05:48:47 -04:00
|
|
|
# {{ incoming_port }} TCP: {{ tcp_forwarding }} UDP: {{ udp_forwarding }}
|
2018-08-16 19:25:59 -04:00
|
|
|
# ------------------------------------------------------------
|
2018-08-02 05:48:47 -04:00
|
|
|
|
2019-01-03 06:04:11 -05:00
|
|
|
{% if enabled %}
|
2018-08-02 05:48:47 -04:00
|
|
|
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
|
2018-08-01 07:18:17 -04:00
|
|
|
server {
|
2018-08-16 19:25:59 -04:00
|
|
|
listen {{ incoming_port }};
|
2020-04-06 20:43:19 -04:00
|
|
|
{% if ipv6 -%}
|
|
|
|
listen [::]:{{ incoming_port }};
|
|
|
|
{% else -%}
|
|
|
|
#listen [::]:{{ incoming_port }};
|
|
|
|
{% endif %}
|
|
|
|
|
2018-08-16 19:25:59 -04:00
|
|
|
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
|
2019-08-08 21:19:42 -04:00
|
|
|
|
|
|
|
# Custom
|
|
|
|
include /data/nginx/custom/server_stream[.]conf;
|
|
|
|
include /data/nginx/custom/server_stream_tcp[.]conf;
|
2018-08-01 07:18:17 -04:00
|
|
|
}
|
2018-08-02 05:48:47 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if udp_forwarding == 1 or udp_forwarding == true %}
|
|
|
|
server {
|
2018-08-16 19:25:59 -04:00
|
|
|
listen {{ incoming_port }} udp;
|
2020-04-06 20:43:19 -04:00
|
|
|
{% if ipv6 -%}
|
|
|
|
listen [::]:{{ incoming_port }} udp;
|
|
|
|
{% else -%}
|
|
|
|
#listen [::]:{{ incoming_port }} udp;
|
|
|
|
{% endif %}
|
2018-08-16 19:25:59 -04:00
|
|
|
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
|
2019-08-08 21:19:42 -04:00
|
|
|
|
|
|
|
# Custom
|
|
|
|
include /data/nginx/custom/server_stream[.]conf;
|
|
|
|
include /data/nginx/custom/server_stream_udp[.]conf;
|
2018-08-02 05:48:47 -04:00
|
|
|
}
|
|
|
|
{% endif %}
|
2019-01-03 06:04:11 -05:00
|
|
|
{% endif %}
|