Skip to content

luci-app-ssr-plus: add optional Xray inbound TCP congestion control - #2050

Open
vsmirn0v wants to merge 13 commits into
fw876:devfrom
vsmirn0v:fix/xray-inbound-congestion
Open

vsmirn0v wants to merge 13 commits into
fw876:devfrom
vsmirn0v:fix/xray-inbound-congestion

Conversation

@vsmirn0v

@vsmirn0v vsmirn0v commented Sep 22, 2026 •

Copy link
Copy Markdown

Problem

The existing custom_tcpcongestion selector only configures outbound sockets. The client-facing Xray transparent listener therefore continues to use the kernel default. On an affected routed/WireGuard path, outbound BBR alone left client downloads around 6 Mbit/s; configuring inbound BBR improved a real transparent-client download to about 57 Mbit/s. This is an environment-specific result, not a claim that BBR is always faster.

Change

  • Add a per-node Inbound TCP congestion control selector for Xray's transparent and SOCKS TCP listeners, separate from the existing outbound option.
  • Keep System default as the default; do not hard-code BBR or change sysctls.
  • Offer only algorithms currently reported by the kernel. If a saved algorithm becomes unavailable, warn and keep the system default rather than fail the listener.
  • Hide the option when Xray is unavailable or Mihomo is selected.
  • Preserve transparent followRedirect settings and leave UDP-only listeners unchanged.
  • Add translations, regression tests and a small Lua 5.1 CI workflow.

Validation

  • Generator regressions: absent/empty selection, BBR/CUBIC/Reno, TCP versus UDP, transparent versus SOCKS-only/no-listener configurations, unavailable algorithms, missing procfs, and independent outbound selection.
  • Execute the actual CBI declaration to check its UCI key, defaults, choices, visibility and node dependency.
  • Tests pass on desktop Lua 5.5 and OpenWrt Lua 5.1.
  • Fixtures using actual OpenWrt LuCI modules pass xray run -test with Xray 26.7.11 for both default and BBR configurations, without reading production UCI or starting listeners.
  • The underlying inbound-BBR change was verified previously on real transparent client sockets with ss -tin; the new UI is covered by CBI tests, not a browser rendering test.

The new Lua 5.1 CI workflow passed for this PR's head commit.

The README includes manual Save & Apply / generated-config / live-socket acceptance steps. This PR is independent of the UDP/443 policy proposal in #2051.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants