Files
Wormhole/internal/api/forward_plugins.go
T
rose_cat707 612d68f56f feat: Wormhole 内网穿透与反向代理网关
Go + Vue 管理台,SQLite 持久化;支持隧道/域名穿透、域名转发插件链、访客认证、
IP 规则、API Key、Docker 单镜像部署;配置通过 Web 系统设置管理,无需 YAML 文件。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 12:15:02 +08:00

18 lines
411 B
Go

package api
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/wormhole/wormhole/internal/auth"
"github.com/wormhole/wormhole/internal/forwardplugin"
)
func (s *Server) listForwardPluginTypes(c *gin.Context) {
if !auth.IsAdmin(getClaims(c).Role) {
c.JSON(http.StatusForbidden, gin.H{"error": "admin only"})
return
}
c.JSON(http.StatusOK, gin.H{"items": forwardplugin.ListPluginTypes()})
}