diff --git a/src/config/config.go b/src/config/config.go index afd91d1..7fd336b 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -95,8 +95,10 @@ func SetConfig(configFile string) (*Config, error) { return nil, proxyPoolThirdpartyErr } - if _, err := os.Stat(config.ProxyCheckImpersonateChromeBinary); os.IsNotExist(err) { - return nil, errors.New(fmt.Sprintf(`curl-impersonate-chrome binary does not exist: "%s"`, config.ProxyCheckImpersonateChromeBinary)) + if config.ProxyCheckImpersonateChrome { + if _, err := os.Stat(config.ProxyCheckImpersonateChromeBinary); os.IsNotExist(err) { + return nil, errors.New(fmt.Sprintf(`curl-impersonate-chrome binary does not exist: "%s"`, config.ProxyCheckImpersonateChromeBinary)) + } } cmd := exec.Command(config.ProxyCheckImpersonateChromeBinary, "--help") err = cmd.Run()