From 78b6d4df2eb418c08800ff8d1e4c00c6ff39499c Mon Sep 17 00:00:00 2001 From: wweir Date: Wed, 25 Mar 2020 10:03:33 +0800 Subject: [PATCH] Fix disable http_proxy case --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 1615693..6e48056 100644 --- a/main.go +++ b/main.go @@ -27,8 +27,10 @@ func main() { PersistFn: conf.PersistRule, } - go proxy.StartHTTPProxy(conf.Conf.Client.HTTPProxy, conf.Conf.Client.Address, - []byte(conf.Conf.Password), route.ShouldProxy) + if conf.Conf.Client.HTTPProxy != "" { + go proxy.StartHTTPProxy(conf.Conf.Client.HTTPProxy, conf.Conf.Client.Address, + []byte(conf.Conf.Password), route.ShouldProxy) + } enableDNSSolution := conf.Conf.Client.DNSServeIP != "" if enableDNSSolution {