fix(openvpn): 依赖检测纳入 easy-rsa,避免「已就绪」却无法下发客户端配置
现象:装了 openvpn 但缺 easy-rsa 时,协议状态显示已就绪;创建 OpenVPN 隧道后 生成客户端配置报 open .../pki/ca.crt: no such file or directory。 原因:PKI 自动初始化要求 easyRSAPath() != "",缺 easy-rsa 时静默跳过; 而 binmgr.CheckBinary(openvpn) 只检测 openvpn 二进制,未校验 easy-rsa。 修复: - binmgr 新增 easyRSAAvailable(),兼容 PATH 与 /usr/share/easy-rsa/* - CheckBinary(openvpn) 在 easy-rsa 缺失时置 installed=false(前端即显示未就绪) - README 依赖清单补 easy-rsa、xl2tpd 验证:隐藏 /usr/share/easy-rsa 后 /api/binaries/status 中 openvpn installed=false, 恢复后 true。
This commit is contained in:
1 parent
a15786ea84
commit
5107f134dd
2 files changed
+29
-2
No files matched your search
@@ -53,7 +53,7 @@ scp opsx-vpn user@server:/opt/opsx-vpn/
|
||||
cd /opt/opsx-vpn && chmod +x opsx-vpn
|
||||
|
||||
# 3. 安装系统依赖(按需)
|
||||
apt install -y wireguard-tools openvpn strongswan strongswan-swanctl iproute2 iptables
|
||||
apt install -y wireguard-tools openvpn easy-rsa strongswan strongswan-swanctl iproute2 iptables xl2tpd
|
||||
# FRP 无需系统包 —— 平台 UI 内点「下载部署」自动从 GitHub 下载到 data/bin/
|
||||
|
||||
# 4. 启动(生产建议用 systemd 管理)
|
||||
@@ -139,7 +139,7 @@ TCP 22 你的IP/32 # SSH
|
||||
| 协议 | 安装方式 | 平台下载 |
|
||||
|---|---|---|
|
||||
| WireGuard | `apt install -y wireguard-tools` | ❌ 系统包 |
|
||||
| OpenVPN | `apt install -y openvpn` | ✅ GitHub Release / 系统包 |
|
||||
| OpenVPN | `apt install -y openvpn easy-rsa`(easy-rsa 用于生成 PKI,缺了无法下发客户端配置) | ✅ GitHub Release / 系统包 |
|
||||
| StrongSwan (IPSec/IKEv2/L2TP) | `apt install -y strongswan strongswan-swanctl` | ❌ 系统包 |
|
||||
| GRE | `apt install -y iproute2`(多数系统默认已安装) | ❌ 系统包 |
|
||||
| FRP | 无需系统包 | ✅ 平台 UI「下载部署」自动从 GitHub 下载 |
|
||||
|
||||
Reference in new issue
Block a user