feat: 新增隧道管理功能,前后端完整实现

- 新增统一 ApiResponse 类型定义,与 Rust 端响应结构对齐
- 新增 Rust 后端隧道数据库表、模型、命令和 API 接口
- 新增前端隧道类型定义、API 调用、卡片组件和表单弹窗
- 新增中英双语隧道相关国际化文案
- 更新服务器类型定义,引入共享的 ApiResponse
This commit is contained in:
Yuhang Wu
2026-10-13 14:59:16 +08:00
parent 30ddf583e5
commit 3b153e32c9
15 changed files with 1556 additions and 10 deletions
+74
View File
@@ -88,6 +88,80 @@
"portRange": "Port must be between 1 and 65535"
}
},
"tunnel": {
"refresh": "Refresh",
"add": "Add tunnel",
"empty": "No tunnels yet. Click Add in the top right corner.",
"edit": "Edit",
"delete": "Delete",
"deleteConfirm": "Are you sure you want to delete tunnel \"{name}\"?",
"name": "Name",
"namePlaceholder": "Enter a tunnel name",
"type": "Proxy type",
"localIp": "Local IP",
"localIpPlaceholder": "e.g. 127.0.0.1",
"localPort": "Local port",
"remotePort": "Remote port",
"remotePortTip": "Required for tcp / udp",
"pinned": "Pinned",
"enabled": "Enabled",
"enabledTip": "Multiple tunnels can be enabled at once",
"remark": "Remark",
"remarkPlaceholder": "Optional remark",
"sort": "Sort",
"saveSuccess": "Saved successfully",
"deleteSuccess": "Deleted successfully",
"advanced": "Advanced settings",
"customDomains": "Custom domains",
"customDomainsPlaceholder": "Type a domain and press Enter to add more",
"subdomain": "Subdomain",
"subdomainPlaceholder": "e.g. test",
"locations": "URL prefixes",
"locationsPlaceholder": "Type a URL prefix and press Enter to add more",
"secretKey": "Secret key",
"secretKeyPlaceholder": "Secret key for stcp / xtcp / sudp",
"useEncryption": "Enable encryption",
"useCompression": "Enable compression",
"bandwidthLimit": "Bandwidth limit",
"bandwidthLimitPlaceholder": "e.g. 1MB / 1KB",
"proxyProtocolVersion": "Proxy Protocol version",
"proxyProtocolVersionDefault": "Disabled",
"healthCheck": "Health check",
"healthCheckType": "Check type",
"healthCheckTypeDefault": "Disabled",
"healthCheckTimeout": "Timeout (s)",
"healthCheckMaxFailed": "Max failed",
"healthCheckInterval": "Interval (s)",
"healthCheckPath": "Check path",
"healthCheckPathPlaceholder": "e.g. /healthz",
"loadBalancer": "Load balancer",
"loadBalancerGroup": "Group",
"loadBalancerGroupPlaceholder": "Proxies in the same group are load balanced",
"loadBalancerGroupKey": "Group key",
"local": "Local",
"remote": "Remote",
"types": {
"tcp": "TCP",
"udp": "UDP",
"http": "HTTP",
"https": "HTTPS",
"stcp": "STCP (secure TCP)",
"xtcp": "XTCP (P2P)",
"sudp": "SUDP (secure UDP)",
"tcpmux": "TCPMUX"
},
"form": {
"addTitle": "Add tunnel",
"editTitle": "Edit tunnel",
"nameRequired": "Please enter the tunnel name",
"typeRequired": "Please select the proxy type",
"localIpRequired": "Please enter the local IP",
"localIpInvalid": "Please enter a valid IP address or domain",
"localPortRequired": "Please enter the local port",
"remotePortRequired": "Please enter the remote port",
"portRange": "Port must be between 1 and 65535"
}
},
"common": {
"developing": "This feature is under construction",
"confirm": "OK",
+74
View File
@@ -88,6 +88,80 @@
"portRange": "端口号必须在 1 - 65535 之间"
}
},
"tunnel": {
"refresh": "刷新",
"add": "新增隧道",
"empty": "暂无隧道,点击右上角新增",
"edit": "编辑",
"delete": "删除",
"deleteConfirm": "确定要删除隧道「{name}」吗?",
"name": "名称",
"namePlaceholder": "请输入隧道名称",
"type": "代理类型",
"localIp": "本地 IP",
"localIpPlaceholder": "如 127.0.0.1",
"localPort": "本地端口",
"remotePort": "远程端口",
"remotePortTip": "tcp / udp 类型必填",
"pinned": "置顶",
"enabled": "启用",
"enabledTip": "可同时启用多个隧道",
"remark": "备注",
"remarkPlaceholder": "可选备注信息",
"sort": "排序",
"saveSuccess": "保存成功",
"deleteSuccess": "删除成功",
"advanced": "高级设置",
"customDomains": "自定义域名",
"customDomainsPlaceholder": "输入域名后回车,可添加多个",
"subdomain": "子域名",
"subdomainPlaceholder": "如 test",
"locations": "URL 前缀",
"locationsPlaceholder": "输入 URL 前缀后回车,可添加多个",
"secretKey": "密钥",
"secretKeyPlaceholder": "stcp / xtcp / sudp 所需密钥",
"useEncryption": "启用加密",
"useCompression": "启用压缩",
"bandwidthLimit": "带宽限制",
"bandwidthLimitPlaceholder": "如 1MB / 1KB",
"proxyProtocolVersion": "Proxy Protocol 版本",
"proxyProtocolVersionDefault": "不启用",
"healthCheck": "健康检查",
"healthCheckType": "检查类型",
"healthCheckTypeDefault": "不启用",
"healthCheckTimeout": "超时(秒)",
"healthCheckMaxFailed": "最大失败次数",
"healthCheckInterval": "检查间隔(秒)",
"healthCheckPath": "检查路径",
"healthCheckPathPlaceholder": "如 /healthz",
"loadBalancer": "负载均衡",
"loadBalancerGroup": "负载均衡组",
"loadBalancerGroupPlaceholder": "同一组内的代理会做负载均衡",
"loadBalancerGroupKey": "组密钥",
"local": "本地",
"remote": "远程",
"types": {
"tcp": "TCP",
"udp": "UDP",
"http": "HTTP",
"https": "HTTPS",
"stcp": "STCP(安全 TCP)",
"xtcp": "XTCP(点对点)",
"sudp": "SUDP(安全 UDP)",
"tcpmux": "TCPMUX"
},
"form": {
"addTitle": "新增隧道",
"editTitle": "编辑隧道",
"nameRequired": "请输入隧道名称",
"typeRequired": "请选择代理类型",
"localIpRequired": "请输入本地 IP",
"localIpInvalid": "请输入合法的 IP 地址或域名",
"localPortRequired": "请输入本地端口",
"remotePortRequired": "请输入远程端口",
"portRange": "端口号必须在 1 - 65535 之间"
}
},
"common": {
"developing": "功能开发中,敬请期待",
"confirm": "确定",