feat: 新增 GRE 隧道协议,管理端口调整为 18080

- 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(构建备份二进制)
This commit is contained in:
opsx committed 2026-10-20 20:58:58 +08:00
1 parent c7f59f2cbf
commit ef7eb378d2
28 files changed
+1363 -439

No files matched your search

+69 -22
View File
@@ -23,7 +23,7 @@
"name": "名称",
"description": "说明",
"username": "用户名",
"password": "***",
"password": "密码",
"email": "邮箱",
"source": "来源",
"local": "本地",
@@ -57,9 +57,9 @@
"login": {
"title": "VPN 专线管理平台",
"subtitle": "统一管理多协议 VPN,配置简单、安全可控",
"protocols": "WireGuard · IPSec · L2TP · FRP · OpenVPN · 自定义协议插件",
"protocols": "WireGuard · IPSec · IKEv2 · L2TP · GRE · FRP · OpenVPN",
"feature1Title": "多协议统一管理",
"feature1Desc": "WireGuard / IPSec / L2TP / FRP / OpenVPN",
"feature1Desc": "WireGuard / IPSec / IKEv2 / L2TP / GRE / OpenVPN",
"feature2Title": "企业级安全",
"feature2Desc": "密钥 AES-GCM 加密 + 双因素认证",
"feature3Title": "一键创建配置",
@@ -89,6 +89,10 @@
"totalTraffic": "累计流量 ↓↑",
"protocolDistribution": "协议分布",
"protocolEngineStatus": "协议引擎状态",
"hostReadinessWarning": "主机运行前提未完全满足,VPN 转发或 NAT 可能无法正常工作",
"readinessRoot": "服务未以 root 运行",
"readinessForwarding": "IPv4 转发未启用",
"readinessRoute": "未检测到默认出口路由",
"depCheckResult": "系统依赖检测结果",
"depReady": "已就绪",
"demoMode": "演示模式",
@@ -217,6 +221,15 @@
"sensitiveFieldHint": "密码、PSK、Token 等敏感字段不会回显;留空表示继续使用原值。",
"tunnelName": "专线名称",
"protocolType": "协议类型",
"coreOptions": "核心接入配置",
"advancedOptions": "详细配置",
"trafficMode": "流量出口",
"trafficGateway": "全流量经 VPN 网关",
"trafficStatic": "仅静态路由",
"trafficCustom": "自定义",
"trafficGatewayTip": "客户端全部流量经 VPN 网关转发,并使用 NAT 出网。",
"trafficStaticTip": "仅向客户端推送下方填写的目标网段,不改变其默认互联网出口。",
"trafficCustomTip": "在详细配置中分别控制默认路由、静态路由与 NAT。",
"keepOriginal": "留空保持原值",
"expireTime": "到期时间",
"expirePlaceholder": "留空为永久",
@@ -241,6 +254,14 @@
"namePlaceholder": "例如:总部-分支互联",
"protocolType": "协议类型",
"reselect": "重新选择",
"coreOptions": "核心接入配置",
"trafficMode": "流量出口",
"trafficGateway": "全流量经 VPN 网关",
"trafficStatic": "仅静态路由",
"trafficCustom": "自定义",
"trafficGatewayTip": "客户端全部流量经 VPN 网关转发,并使用 NAT 出网。",
"trafficStaticTip": "仅向客户端推送下方填写的目标网段,不改变其默认互联网出口。",
"trafficCustomTip": "在详细配置中分别控制默认路由、静态路由与 NAT。",
"advancedOptions": "高级选项",
"expireTime": "到期时间",
"expirePlaceholder": "留空为永久",
@@ -337,6 +358,20 @@
"title": "VPN 拨号用户",
"mfaHint": "OpenVPN 双因素认证(TOTP / 静态挑战 / PIN+OTP)",
"addUser": "添加用户",
"bulkImport": "批量导入",
"bulkImportTitle": "批量导入平台用户",
"bulkImportHint": "仅 OpenVPN 支持导入平台本地或 LDAP 用户;L2TP/IKEv2 请创建独立拨号账号。",
"importSelected": "导入选中用户",
"importedCount": "已导入 {count} 个用户",
"importFailed": "批量导入失败",
"selectOpenVPNTunnel": "选择 OpenVPN 隧道",
"selectTunnelAndUsers": "请选择 OpenVPN 隧道和平台用户",
"searchPlaceholder": "搜索用户名、姓名或邮箱",
"allTunnels": "全部隧道",
"selectedUsers": "已选择 {count} 个用户",
"batchDelete": "批量删除",
"batchDeleteConfirm": "确认删除选中的 {count} 个拨号用户?",
"batchDeleteDone": "已删除选中拨号用户",
"displayName": "姓名",
"tunnel": "隧道",
"otpMfa": "OTP / MFA",
@@ -359,6 +394,14 @@
"clickRowHint": "点击行即选中并自动填充",
"otpDialogTitle": "双因素认证 — {username}",
"otpHint": "基于 TOTP 的双因素认证(SHA1 / base32 / 30s / 6 位),兼容主流 Authenticator 应用。支持静态挑战二次输入与 PIN+OTP 组合模式。",
"mfaNotEnabled": "尚未启用双因素认证",
"mfaDisabledHint": "绑定验证器后,此用户登录 VPN 时需要额外输入动态验证码。",
"mfaEnabledHint": "该用户登录 VPN 时需要密码和动态验证码。",
"mfaSetupIntro": "为该用户绑定一个 Authenticator 应用,保护 VPN 拨号登录。",
"manualSetup": "无法扫码?使用手动密钥",
"verifySetup": "确认绑定",
"verifySetupHint": "在 Authenticator 中扫描后,输入当前显示的 6 位验证码完成验证。",
"securityDetails": "安全详情",
"bindStatus": "绑定状态",
"boundTotp": "已绑定 TOTP",
"staticPin": "静态 PIN",
@@ -766,13 +809,6 @@
"label": "机器认证 PSK",
"tip": "留空自动生成;iOS/Android 共享密钥"
},
"username": {
"label": "默认拨号用户"
},
"password": {
"label": "默认拨号密码",
"tip": "留空自动生成;更多账号在拨号用户页添加"
},
"address_pool": {
"label": "客户端地址池"
},
@@ -800,15 +836,8 @@
"label": "服务器公网 IP"
},
"psk": {
"label": "IPSec 预共享密钥"
},
"username": {
"label": "默认拨号用户名",
"tip": "可在「VPN 拨号用户」为本隧道添加更多账号"
},
"password": {
"label": "默认拨号密码",
"tip": "若只使用拨号用户表可留空(创建时需至少有一种)"
"label": "IPSec 预共享密钥",
"tip": "留空将自动生成高强度随机密钥;请在创建后从客户端配置中安全获取"
},
"ip_range": {
"label": "客户端地址池"
@@ -821,6 +850,22 @@
}
}
},
"gre": {
"name": "GRE 隧道",
"desc": "标准 IP 协议 47 隧道,用于 Linux 与路由器、防火墙的点对点三层互联",
"scenes": "网络设备互联 / 跨站点路由",
"fields": {
"local_endpoint": { "label": "本端公网 IP" },
"remote_endpoint": { "label": "对端公网 IP" },
"local_tunnel_ip": { "label": "本端隧道 IP", "tip": "建议使用 /30,例如 10.255.0.1/30" },
"remote_tunnel_ip": { "label": "对端隧道 IP", "tip": "需与本端隧道 IP 位于同一子网" },
"remote_subnet": { "label": "对端业务网段", "tip": "填写后自动添加经 GRE 对端的静态路由" },
"enable_nat": { "label": "对端流量 NAT 出网", "tip": "仅当对端业务网段需要经本机访问互联网时启用" },
"outbound_interface": { "label": "NAT 出站网卡" },
"ttl": { "label": "TTL" },
"mtu": { "label": "GRE MTU", "tip": "公网 GRE 常用 1476;链路有额外封装时可继续降低" }
}
},
"frp": {
"name": "FRP 内网穿透",
"desc": "国内刚需,TCP/UDP/HTTP 端口映射与反向代理",
@@ -941,7 +986,7 @@
"tip": "密码模式对齐生产 verify-client-cert none + username-as-common-name",
"options": {
"certificate": "仅证书",
"password": "***",
"password": "用户名 + 密码",
"certificate+password": "证书 + 密码"
}
},
@@ -974,8 +1019,10 @@
"tip": "关闭后仅推送下方内网路由(生产常只推指定路由)"
},
"push_routes": {
"label": "推送内网路由",
"tip": "CIDR 逗号分隔"
"label": "推送路由",
"tip": "IP 或 CIDR,每行一个;支持 # 注释",
"placeholder": "# VPC 网段\n172.16.0.0/16\n# 预发环境\n43.129.24.233",
"format_error": "路由格式无效:{route}"
},
"enable_nat": {
"label": "启用 NAT 出网"