feat: fallback can be select by user

This commit is contained in:
adlyq
2022-05-23 00:40:27 +08:00
parent 79469fc8d6
commit c0eb9aac1c
5 changed files with 29 additions and 6 deletions

View File

@ -351,7 +351,7 @@ func patchSelectGroup(proxies map[string]C.Proxy) {
continue
}
selector, ok := outbound.ProxyAdapter.(*outboundgroup.Selector)
selector, ok := outbound.ProxyAdapter.(outboundgroup.SelectAble)
if !ok {
continue
}

View File

@ -83,7 +83,7 @@ func updateProxy(w http.ResponseWriter, r *http.Request) {
}
proxy := r.Context().Value(CtxKeyProxy).(*adapter.Proxy)
selector, ok := proxy.ProxyAdapter.(*outboundgroup.Selector)
selector, ok := proxy.ProxyAdapter.(outboundgroup.SelectAble)
if !ok {
render.Status(r, http.StatusBadRequest)
render.JSON(w, r, newError("Must be a Selector"))