From 90bf158e9f0b5a57cf76124b06584e924201d589 Mon Sep 17 00:00:00 2001 From: riolurs Date: Fri, 5 Apr 2024 01:51:18 +0800 Subject: [PATCH] fix(group.parser): set default TestURL if empty --- adapter/outboundgroup/parser.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/adapter/outboundgroup/parser.go b/adapter/outboundgroup/parser.go index 74947587f7..bec262f231 100644 --- a/adapter/outboundgroup/parser.go +++ b/adapter/outboundgroup/parser.go @@ -98,14 +98,12 @@ func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, provide return nil, fmt.Errorf("%s: %w", groupName, errDuplicateProvider) } - // select don't need health check - if groupOption.Type != "select" && groupOption.Type != "relay" { - if groupOption.Interval == 0 { - groupOption.Interval = 300 - } - if groupOption.URL == "" { - groupOption.URL = C.DefaultTestURL - } + if groupOption.Interval == 0 { + groupOption.Interval = 300 + } + + if groupOption.URL == "" { + groupOption.URL = C.DefaultTestURL } hc := provider.NewHealthCheck(ps, groupOption.URL, uint(groupOption.TestTimeout), uint(groupOption.Interval), groupOption.Lazy, expectedStatus)