feat: overwrite target port

This commit is contained in:
2023-01-01 18:02:01 +01:00
parent 51cadae41e
commit d5fc16a4cc

View File

@@ -6,8 +6,15 @@ server {
proxy_timeout {{ proxy_timeout }};
proxy_responses 1;
proxy_pass {{ targetip }}:$server_port;
{% if transparent %} proxy_bind $remote_addr{% if udp %}:$remote_port{% endif %} transparent; {% endif %}
{% if targetportoverwrite %}
proxy_pass {{ targetip }}:{{ targetportoverwrite }};
{% else %}
proxy_pass {{ targetip }}:$server_port;
{% endif %}
{% if transparent %}
proxy_bind $remote_addr:{% if targetportoverwrite %}{{ targetportoverwrite }}{% else %}$remote_port{% endif %} transparent;
{% endif %}
}