stream.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # ------------------------------------------------------------
  2. # {{ incoming_port }} TCP: {{ tcp_forwarding }} UDP: {{ udp_forwarding }}
  3. # ------------------------------------------------------------
  4. {% if enabled %}
  5. {% if tcp_forwarding == 1 or tcp_forwarding == true -%}
  6. server {
  7. listen {{ incoming_port }} {%- if certificate %} ssl {%- endif %};
  8. {% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} {%- if certificate %} ssl {%- endif %};
  9. {%- include "_certificates_stream.conf" %}
  10. proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
  11. # Custom
  12. include /data/nginx/custom/server_stream[.]conf;
  13. include /data/nginx/custom/server_stream_tcp[.]conf;
  14. }
  15. {% endif %}
  16. {% if udp_forwarding == 1 or udp_forwarding == true -%}
  17. server {
  18. listen {{ incoming_port }} udp;
  19. {% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp;
  20. proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
  21. # Custom
  22. include /data/nginx/custom/server_stream[.]conf;
  23. include /data/nginx/custom/server_stream_udp[.]conf;
  24. }
  25. {% endif %}
  26. {% endif %}