From b406bbb1bb0f1bdeae41e05b35927d8197d8a686 Mon Sep 17 00:00:00 2001 From: Stepan <50080829+Red0Core@users.noreply.github.com> Date: Sun, 12 Apr 2026 04:26:48 +0300 Subject: [PATCH] Update flow_enabled computation for VLESS protocol Refactor flow_enabled logic to include encryption check for VLESS. --- app/core/hosts.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/core/hosts.py b/app/core/hosts.py index 3b8cf2a2..834c549d 100644 --- a/app/core/hosts.py +++ b/app/core/hosts.py @@ -257,13 +257,18 @@ async def _prepare_subscription_inbound_data( # Compute flow_enabled: only for VLESS with specific conditions header_type = getattr(transport_config, "header_type", "none") - flow_enabled = ( + base_flow_enabled = ( protocol == "vless" and tls_value in ("tls", "reality") and network in ("tcp", "raw", "kcp") and header_type != "http" ) + # Enable also when inbound vless encryption is enabled (not "none") + flow_enabled = base_flow_enabled or ( + protocol == "vless" and encryption not in (None, "", "none") + ) + return SubscriptionInboundData( remark=host.remark, inbound_tag=host.inbound_tag,