ShadowSocks Rust 的配置与优化
五一期间重新整理了家里的网络,目标是看 4K 流媒体不卡顿。既然服务器要重新配置,干脆将旧方案迁移到新的 shadowsocks-rust 上。 系统更新 1 sudo apt update && sudo apt upgrade 安装并配置 SS 方案一:通过 Cargo 编译安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # 安装 Rust 工具链 curl https://sh.rustup.rs -sSf | sh # 配置 Cargo 环境变量(写入 .profile / .bash_profile 等) # CARGO_HOME 指定 Cargo 安装路径 # target-cpu=native 让 rustc 为目标 CPU 生成优化代码 CARGO_HOME=/root/cargo RUSTFLAGS="-C target-cpu=native" source .profile # 安装编译依赖 sudo apt install build-essential # 安装 shadowsocks-rust cargo install shadowsocks-rust 方案二:直接下载预编译二进制 1 2 3 4 wget https://github.com/shadowsocks/shadowsocks-rust/releases/download/v1.14.3/shadowsocks-v1.14.3.x86_64-unknown-linux-gnu.tar.xz tar -xf shadowsocks-v1.14.3.x86_64-unknown-linux-gnu.tar.xz cp ssserver /usr/local/bin chmod a+x /usr/local/bin/ssserver 配置文件 1 2 mkdir /etc/shadowsocks vi /etc/shadowsocks/config.json 1 2 3 4 5 6 { "server": "::", "server_port": 8888, "method": "aes-256-gcm", "password": "pw" } 测试运行: ...