加固版通用 Linux 隐身与洋葱路由系统
Hulios 是一个基于 eBPF 的 Linux 透明 Tor VPN 网关。它通过将 TCP 套接字和 DNS 查询重定向到内置的 Arti(Tor 客户端)实例以及本地化的 基于 Hickory 的 DNS 解析器,来保护出站网络流量。通过 cgroup 钩子和策略路由在内核套接字层面运行,Hulios 实现了强大的防泄漏边界,而无需修改运行时的 resolv.conf 配置,也无需依赖外部防火墙守护进程。
Hulios 实现了严格的权限分离运行时模型:
nobody,并使用严格的 seccomp 系统调用过滤器进行隔离。table 100)和默认黑洞进行锁定。即使守护进程崩溃或被强制终止(SIGKILL),黑洞仍保持激活状态,阻止出站流量以防 IP 泄漏,直到手动执行恢复操作。AF_PACKET 套接字的创建,以防应用程序绕过标准 IP 路由规则。CONFIG_BPF_SYSCALL、CONFIG_BPF_LSM 和 CONFIG_CGROUPS_V2。clang 和 libelf(编译时 eBPF 编译所需)。已在 Arch Linux 和 Debian 13 (Bookworm) 上进行测试和验证。
Hulios 可通过 Arch 用户软件仓库以 hulios-git 形式获取:
# Using paru
paru -S hulios-git
# Using yay
yay -S hulios-git
sudo pacman -S clang libelf zlib sqlite
sudo apt install -y clang libelf-dev zlib1g-dev libsqlite3-dev
确保已安装 Rust 编译器(工具链选择和目标需求由 rust-toolchain.toml 自动管理):
git clone https://github.com/ghaziwali/Hulios.git
cd Hulios
cargo build --release
编译后的二进制文件将位于 target/release/hulios。
所有与内核接口或策略路由交互的命令都需要提升的权限:
# View global help and available commands
./target/release/hulios --help
# View help for a specific command (e.g. start)
./target/release/hulios start --help
# Start Hulios in foreground TUI mode
sudo ./target/release/hulios start
# Check current running state and Tor bootstrap progress
./target/release/hulios status
# Verify network namespace integrity and check for leaks
sudo ./target/release/hulios diagnose
# Revert system network settings and recover from unclean shutdowns
sudo ./target/release/hulios recover
# Stop Hulios and restore standard internet routing
sudo ./target/release/hulios stop
如果 /etc/hulios/config.toml 尚不存在,Hulios 在首次运行时将自动生成一个默认的、自带说明的模板文件。打开生成的文件即可自定义变量(例如首选 Tor 出口节点、DNS 重定向、自定义 SOCKS 端口或严格锁定模式)。
如果你觉得 Hulios 有用,并希望支持其持续的安全开发与研究,我们将非常感谢你的捐赠:
bc1q0gllvd7fe2y48emjd4shf42ul3cl4pgda5zpqzTQWUmTATa8sDntobTNGkLmbgmHVS9iWCRx0x16aFd1De7889071194A026D79393eb3CE659181eHulios 保护网络传输层(第 3 层)并不能保证完全匿名。