mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5206] [CLOSED] feat: comprehensive system optimization and auto swap deployment #5817
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5817
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5206
Author: @rqzbeh
Created: 6/11/2026
Status: ❌ Closed
Base:
main← Head:rewrite-5186📝 Commits (2)
2a159c1feat: comprehensive system optimization and auto swap deploymentce78bdcMerge branch 'main' into rewrite-5186📊 Changes
1 file changed (+206 additions, -57 deletions)
View changed files
📝
x-ui.sh(+206 -57)📄 Description
Summary
This PR replaces the singular BBR toggle in
x-ui.shwith a comprehensive system optimization menu that configures memory swap scaling, multi-core interrupts, file descriptor limits, and tailored network proxy stack optimizations.Why
Users running high-performance proxies (VLESS, XHTTP, WireGuard, Hysteria2) require more than just enabling BBR. This scales the underlying OS limits optimally for heavy traffic without manual configuration. It auto-deploys mathematically optimal swap partitions (avoiding Docker limitations natively) to prevent OOM errors and scales UDP/TCP limits to support maximum inbound throughput correctly.
Additionally, this PR heavily configures TCP semantics specifically targeted to increase resiliency against severe DPI (Deep Packet Inspection) environments commonly found in Iran/China/Russia, without sacrificing raw performance.
Type of change
Areas affected
How was this tested?
x-uiCLI menu via bash and verifiedSystem Optimizationappears./swapfile,irqbalance,/etc/sysctl.d/99-xui-optimization.confand/etc/security/limits.dlimits correctly propagate based on OS capabilities.$XUI_IN_DOCKERenvironment variable logic to verify skipping unsupported swap deployments gracefully.Screenshots / recordings
None.
Breaking changes
None. BBR users can remove the previous BBR logic via the cleanup functions automatically integrated into the updated optimization disabling sequence.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.