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
+13
View File
@@ -9,6 +9,11 @@ pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
{% if nginx_forwarder and nginx_forwarder | length > 0 %}
# Load stream module for TCP/UDP proxying
load_module modules/ngx_stream_module.so;
{% endif %}
events {
worker_connections {{ nginx_worker_connections }};
}
@@ -48,3 +53,11 @@ http {
# Load modular configuration files from the conf.d directory
include {{ nginx_conf_dir }}/*.conf;
}
{% if nginx_forwarder and nginx_forwarder | length > 0 %}
# Stream block for TCP/UDP proxying
stream {
# Load stream configurations
include {{ nginx_streams_dir }}/*.conf;
}
{% endif %}