From e72dfc3bfd0a0abc06beb8e216f4f49f427621c0 Mon Sep 17 00:00:00 2001 From: 7heMech <83923848+7heMech@users.noreply.github.com> Date: Wed, 4 Feb 2026 12:14:10 +0000 Subject: [PATCH] Add reuseport to improve performance and reduce packet drops --- backend/templates/stream.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/templates/stream.conf b/backend/templates/stream.conf index 3a10387b27..d365897ab7 100644 --- a/backend/templates/stream.conf +++ b/backend/templates/stream.conf @@ -5,8 +5,8 @@ {% if enabled %} {% if tcp_forwarding == 1 or tcp_forwarding == true -%} server { - listen {{ incoming_port }} {%- if certificate %} ssl {%- endif %}; - {% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} {%- if certificate %} ssl {%- endif %}; + listen {{ incoming_port }} reuseport {%- if certificate %} ssl {%- endif %}; + {% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} reuseport {%- if certificate %} ssl {%- endif %}; {%- include "_certificates_stream.conf" %} @@ -23,8 +23,8 @@ server { {% if udp_forwarding == 1 or udp_forwarding == true -%} server { - listen {{ incoming_port }} udp; - {% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp; + listen {{ incoming_port }} udp reuseport; + {% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp reuseport; proxy_pass {{ forwarding_host }}:{{ forwarding_port }};