[PR #5172] [CLOSED] fix: properly enable BBR and mute sysctl errors on restricted OS configurations (#5160) #5803

Closed
opened 2026-11-02 04:04:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5172
Author: @rqzbeh
Created: 6/10/2026
Status: ❌ Closed

Base: main ← Head: fix/bbr-sysctl-tcp-params


📝 Commits (3)

  • 704d80d fix: add tcp_ecn and tcp_window_scaling to BBR enable script
  • 1e3f172 trigger ci: re-run due to transient network failure from proxy.golang.org
  • 7f41fdc fix: mute sysctl system errors on restricted OS configurations (#5160)

📊 Changes

1 file changed (+21 additions, -7 deletions)

View changed files

📝 x-ui.sh (+21 -7)

📄 Description

Fixes #5160

Summary

This PR addresses two related issues with BBR enabling in x-ui.sh:

  1. It adds
    et.ipv4.tcp_ecn and
    et.ipv4.tcp_window_scaling to the BBR enable script, as these are often required for optimal performance.
  2. It mutes stderr on sysctl --system and sysctl -p. On restricted environments (e.g. LXC or OpenVZ), system configuration files that set properties like
    et.ipv4.conf.all.accept_source_route fail, causing sysctl to throw errors in the terminal which confuse users into thinking the BBR script failed. By muting stderr, these unrelated system-level errors are hidden.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • \go build ./...\ and the test suite pass locally.
  • For frontend changes:
    pm run lint,
    pm run typecheck, and
    pm run build\ pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5172 **Author:** [@rqzbeh](https://github.com/rqzbeh) **Created:** 6/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/bbr-sysctl-tcp-params` --- ### 📝 Commits (3) - [`704d80d`](https://github.com/MHSanaei/3x-ui/commit/704d80df79e5e6eb07ecfed4327df9b0b6fac100) fix: add tcp_ecn and tcp_window_scaling to BBR enable script - [`1e3f172`](https://github.com/MHSanaei/3x-ui/commit/1e3f1724fecc350f7f26362786ad84d23967753f) trigger ci: re-run due to transient network failure from proxy.golang.org - [`7f41fdc`](https://github.com/MHSanaei/3x-ui/commit/7f41fdcb03e56ba2db0cc6d0d5598d37128f450b) fix: mute sysctl system errors on restricted OS configurations (#5160) ### 📊 Changes **1 file changed** (+21 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `x-ui.sh` (+21 -7) </details> ### 📄 Description Fixes #5160 ## Summary This PR addresses two related issues with BBR enabling in x-ui.sh: 1. It adds et.ipv4.tcp_ecn and et.ipv4.tcp_window_scaling to the BBR enable script, as these are often required for optimal performance. 2. It mutes stderr on sysctl --system and sysctl -p. On restricted environments (e.g. LXC or OpenVZ), system configuration files that set properties like et.ipv4.conf.all.accept_source_route fail, causing sysctl to throw errors in the terminal which confuse users into thinking the BBR script failed. By muting stderr, these unrelated system-level errors are hidden. ## Type of change - [x] Bug fix - [ ] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [ ] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [x] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [ ] \go build ./...\ and the test suite pass locally. - [ ] For frontend changes: \ pm run lint\, \ pm run typecheck\, and \ pm run build\ pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:10 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5803
No description provided.