feat: forward tcp traffic easily

This commit is contained in:
Clément Désiles
2025-12-15 22:14:46 +01:00
parent bd2e806aa1
commit ebeb6d5c6b
8 changed files with 287 additions and 2 deletions
+25
View File
@@ -0,0 +1,25 @@
# TCP stream forwarder for {{ domain }}
# Managed by Ansible - DO NOT EDIT MANUALLY
# Transparent TCP proxy (no protocol inspection)
{% if config.http | default(true) %}
upstream {{ domain | replace('.', '_') | replace('-', '_') }}_http {
server {{ config.forward_to }}:80;
}
server {
listen 80;
proxy_pass {{ domain | replace('.', '_') | replace('-', '_') }}_http;
}
{% endif %}
{% if config.https | default(true) %}
upstream {{ domain | replace('.', '_') | replace('-', '_') }}_https {
server {{ config.forward_to }}:443;
}
server {
listen 443;
proxy_pass {{ domain | replace('.', '_') | replace('-', '_') }}_https;
}
{% endif %}