bdb591af9e
- Added ipv6 listening to hosts when configured, fixes #236 and #149 - Added documentation about disabling ipv6 - Updated npm packages
37 lines
1021 B
Plaintext
37 lines
1021 B
Plaintext
# ------------------------------------------------------------
|
|
# {{ incoming_port }} TCP: {{ tcp_forwarding }} UDP: {{ udp_forwarding }}
|
|
# ------------------------------------------------------------
|
|
|
|
{% if enabled %}
|
|
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
|
|
server {
|
|
listen {{ incoming_port }};
|
|
{% if ipv6 -%}
|
|
listen [::]:{{ incoming_port }};
|
|
{% else -%}
|
|
#listen [::]:{{ incoming_port }};
|
|
{% endif %}
|
|
|
|
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
|
|
|
|
# Custom
|
|
include /data/nginx/custom/server_stream[.]conf;
|
|
include /data/nginx/custom/server_stream_tcp[.]conf;
|
|
}
|
|
{% endif %}
|
|
{% if udp_forwarding == 1 or udp_forwarding == true %}
|
|
server {
|
|
listen {{ incoming_port }} udp;
|
|
{% if ipv6 -%}
|
|
listen [::]:{{ incoming_port }} udp;
|
|
{% else -%}
|
|
#listen [::]:{{ incoming_port }} udp;
|
|
{% endif %}
|
|
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
|
|
|
|
# Custom
|
|
include /data/nginx/custom/server_stream[.]conf;
|
|
include /data/nginx/custom/server_stream_udp[.]conf;
|
|
}
|
|
{% endif %}
|
|
{% endif %} |