mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 00:53:15 +08:00
fix: try fixing automatic policy
This commit is contained in:
parent
41a05d96a5
commit
0d07cf40b8
@ -89,6 +89,7 @@ func (f *Fallback) MarshalJSON() ([]byte, error) {
|
||||
"all": all,
|
||||
"testUrl": f.testUrl,
|
||||
"expectedStatus": f.expectedStatus,
|
||||
"fixed": f.selected,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -170,6 +170,7 @@ func (u *URLTest) MarshalJSON() ([]byte, error) {
|
||||
"all": all,
|
||||
"testUrl": u.testUrl,
|
||||
"expectedStatus": u.expectedStatus,
|
||||
"fixed": u.selected,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -2,15 +2,17 @@ package route
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/render"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/render"
|
||||
|
||||
"github.com/metacubex/mihomo/adapter"
|
||||
"github.com/metacubex/mihomo/adapter/outboundgroup"
|
||||
"github.com/metacubex/mihomo/common/utils"
|
||||
"github.com/metacubex/mihomo/component/profile/cachefile"
|
||||
C "github.com/metacubex/mihomo/constant"
|
||||
"github.com/metacubex/mihomo/tunnel"
|
||||
)
|
||||
@ -63,6 +65,10 @@ func getGroupDelay(w http.ResponseWriter, r *http.Request) {
|
||||
URLTestGroup.ForceSet("")
|
||||
}
|
||||
|
||||
if proxy.(*adapter.Proxy).Type() != C.Selector {
|
||||
cachefile.Cache().SetSelected(proxy.Name(), "")
|
||||
}
|
||||
|
||||
query := r.URL.Query()
|
||||
url := query.Get("url")
|
||||
timeout, err := strconv.ParseInt(query.Get("timeout"), 10, 32)
|
||||
|
Loading…
Reference in New Issue
Block a user