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