Proton VPN
Proton VPN 是由瑞士非营利公司 Proton AG 提供的开源 VPN 服务。它使用 OpenVPN 协议。由于阿尔派 Linux 目前没有 Proton VPN 的发行版,因此使用它需要通过 OpenVPN 或 Wireguard 连接。建议使用 Wireguard,因为 Proton AG 自身也偏好该服务,并且 Wireguard 的构建更轻巧、更现代化。Wireguard 的设置相对简单,因为 NetworkManager 原生支持它,需要的安装和设置更少。
安装
# apk add wireguard-tools
配置
登录 Proton VPN 并下载 Wireguard 配置文件。更多信息可以在 Proton VPN 的支持页面 找到。请注意,私钥仅在您创建配置文件后立即下载时才可从网站获得,之后私钥将被星号替换。将文件重命名为 "wg0.conf" 并将其移动到文件系统中安全的位置。
运行
要连接,请运行以下命令。将 path_to_file 替换为您移动配置文件的完整路径。
# wg-quick up /path_to_file/wg0.conf
要启用 Wireguard 在启动时连接到 Proton VPN,请使用像 nano 这样的文本编辑器打开您的 /etc/network/interfaces。在您的其他接口部分之后添加此信息
auto wg0 iface wg0 inet static pre-up wg-quick up /path_to_file/wg0.conf
同样,请将 path_to_file 替换为您自己的相关信息。
故障排除
如果尝试打开 VPN 失败并且您看到以下错误
/usr/bin/wg-quick: line 32: iptables-restore: command not found
您需要手动安装 iptables (apk add iptables
),以便 wg-quick 可以使用命令 'iptables-restore
'