mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-07 06:49:55 +00:00
chore: modify default url
This commit is contained in:
@@ -213,9 +213,8 @@ func (hc *HealthCheck) close() {
|
||||
}
|
||||
|
||||
func NewHealthCheck(proxies []C.Proxy, url string, interval uint, lazy bool, expectedStatus utils.IntRanges[uint16]) *HealthCheck {
|
||||
if len(url) == 0 {
|
||||
interval = 0
|
||||
expectedStatus = nil
|
||||
if url == "" {
|
||||
// expectedStatus = nil
|
||||
url = C.DefaultTestURL
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,9 @@ func ParseProxyProvider(name string, mapping map[string]any) (types.ProxyProvide
|
||||
|
||||
var hcInterval uint
|
||||
if schema.HealthCheck.Enable {
|
||||
if schema.HealthCheck.Interval == 0 {
|
||||
schema.HealthCheck.Interval = 300
|
||||
}
|
||||
hcInterval = uint(schema.HealthCheck.Interval)
|
||||
}
|
||||
hc := NewHealthCheck([]C.Proxy{}, schema.HealthCheck.URL, hcInterval, schema.HealthCheck.Lazy, expectedStatus)
|
||||
|
||||
Reference in New Issue
Block a user