chore: clean up internal interface definitions

This commit is contained in:
wwqgtxx
2025-12-03 11:08:16 +08:00
parent fdb7cb1f58
commit 9df8392c65
8 changed files with 63 additions and 60 deletions

View File

@@ -31,7 +31,7 @@ func groupRouter() http.Handler {
func getGroups(w http.ResponseWriter, r *http.Request) {
var gs []C.Proxy
for _, p := range tunnel.Proxies() {
if _, ok := p.Adapter().(C.Group); ok {
if _, ok := p.Adapter().(outboundgroup.ProxyGroup); ok {
gs = append(gs, p)
}
}
@@ -42,7 +42,7 @@ func getGroups(w http.ResponseWriter, r *http.Request) {
func getGroup(w http.ResponseWriter, r *http.Request) {
proxy := r.Context().Value(CtxKeyProxy).(C.Proxy)
if _, ok := proxy.Adapter().(C.Group); ok {
if _, ok := proxy.Adapter().(outboundgroup.ProxyGroup); ok {
render.JSON(w, r, proxy)
return
}
@@ -52,7 +52,7 @@ func getGroup(w http.ResponseWriter, r *http.Request) {
func getGroupDelay(w http.ResponseWriter, r *http.Request) {
proxy := r.Context().Value(CtxKeyProxy).(C.Proxy)
group, ok := proxy.Adapter().(C.Group)
group, ok := proxy.Adapter().(outboundgroup.ProxyGroup)
if !ok {
render.Status(r, http.StatusNotFound)
render.JSON(w, r, ErrNotFound)