Skip to content

Commit

Permalink
Improve: disable proxy group lazy url-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr328 committed May 15, 2021
1 parent e4c27ac commit 44424c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/main/golang/config/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var processors = []processor{
patchProfile,
patchDns,
patchProviders,
patchProxyGroup,
validConfig,
}

Expand Down Expand Up @@ -85,6 +86,14 @@ func patchProviders(cfg *config.RawConfig, profileDir string) error {
return nil
}

func patchProxyGroup(cfg *config.RawConfig, _ string) error {
for _, g := range cfg.ProxyGroup {
g["lazy"] = false
}

return nil
}

func validConfig(cfg *config.RawConfig, _ string) error {
if len(cfg.Proxy) == 0 && len(cfg.ProxyProvider) == 0 {
return errors.New("profile does not contain `proxies` or `proxy-providers`")
Expand Down

0 comments on commit 44424c5

Please sign in to comment.