Add SSL certificate to TCP streams if certificate in database

This commit is contained in:
jbowring
2024-03-24 17:11:04 +00:00
parent d3a654b546
commit b8b80d3e80
6 changed files with 23 additions and 6 deletions

View File

@ -5,13 +5,15 @@
{% if enabled %}
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
server {
listen {{ incoming_port }};
listen {{ incoming_port }}{% if certificate %} ssl{% endif %};
{% if ipv6 -%}
listen [::]:{{ incoming_port }};
listen [::]:{{ incoming_port }}{% if certificate %} ssl{% endif %};
{% else -%}
#listen [::]:{{ incoming_port }};
#listen [::]:{{ incoming_port }}{% if certificate %} ssl{% endif %};
{% endif %}
{% include "_certificates_stream.conf" %}
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
# Custom