- backend: 新增 GRE 隧道实现(ip tunnel 点对点互联),binmgr 支持 iproute2 - backend: api/identity 调整,各协议 service(gre/ikev2/ipsec/l2tp/openvpn)统一改动 - backend: OpenVPN 认证辅助与用户口令同步逻辑完善 - frontend: 协议图标/向导/编辑器支持 GRE,VPN 用户页重构(234 行) - frontend: 新增 RouteListInput 路由列表输入组件,Dashboard/Layout 优化 - i18n: 中英文文案同步更新 - test: 新增 binmgr/common/gre 单测,openvpn 测试补充 - docs: README 补充 GRE 说明,默认监听端口 8080 → 18080 - chore: .gitignore 增加 opsx-vpn.previous(构建备份二进制)
18 lines
422 B
Go
18 lines
422 B
Go
package binmgr
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestInstallHintL2TPDnfFallback(t *testing.T) {
|
|
hint := InstallHint("l2tp")
|
|
commands, _ := hint["all_commands"].(map[string]string)
|
|
cmd := commands["dnf"]
|
|
for _, want := range []string{"dnf install -y strongswan", "xelerance/xl2tpd", "libpcap-devel"} {
|
|
if !strings.Contains(cmd, want) {
|
|
t.Fatalf("L2TP dnf install command missing %q: %s", want, cmd)
|
|
}
|
|
}
|
|
}
|