Documentation
¶
Overview ¶
Package tuning applies host-level network optimizations recommended for an Xray server — currently enabling the TCP BBR congestion-control algorithm, which noticeably improves throughput on lossy/long-haul links.
See https://xtls.github.io/en/document/level-0/ch07-xray-server.html (7.7).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BBRState ¶
type BBRState int
BBRState is the outcome of EnsureBBR, for logging.
func EnsureBBR ¶
EnsureBBR enables BBR congestion control if it isn't already active. It persists the setting via a sysctl drop-in (so it survives reboots) AND applies it at runtime, so no reboot is needed. Best-effort and idempotent: it returns the resulting state plus any error for the caller to log, and never fails the boot. Requires root (the panel runs as root under systemd); on a non-Linux/non-root host the /proc and /etc writes simply fail and it reports BBRUnchanged.