feat: VPN 管理后台新增系统环境检测面板
- 新增 /api/admin/vpn/diag 端点,检测 TUN 创建能力、root、CAP_NET_ADMIN、ip_forward、MASQUERADE - Linux 下解析 /proc/self/status CapEff 位判断 CAP_NET_ADMIN,读 /proc/sys/net/ipv4/ip_forward,执行 iptables 检查 MASQUERADE - 非 Linux 平台显示"仅 Linux 适用" - 前端 VpnView 新增系统环境检测卡片,每项以勾叉标识并附修复提示
This commit is contained in:
@@ -187,6 +187,10 @@ func GetVpnStatus(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func GetVpnDiag(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, vpn.Diag(vpn.VPN))
|
||||
}
|
||||
|
||||
type reservationResponse struct {
|
||||
ID uint `json:"id"`
|
||||
UserID uint `json:"user_id"`
|
||||
|
||||
Reference in New Issue
Block a user