From 075417d0db3c10c269829239cc4a2868467847da Mon Sep 17 00:00:00 2001 From: wuhanqing <554553400@qq.com> Date: Tue, 31 Oct 2023 17:09:39 +0800 Subject: [PATCH] UpdateSubscribeData when parseSubscribeByUrl --- v2raypool.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/v2raypool.go b/v2raypool.go index 778d811..c07d41e 100644 --- a/v2raypool.go +++ b/v2raypool.go @@ -167,9 +167,19 @@ func (p *ProxyPool) InitSubscribeData() *ProxyPool { } } else { if p.subscribeUrl != "" { - dt, _, err = parseSubscribeByUrl(p.subscribeUrl, "") + var rawdt string + dt, rawdt, err = parseSubscribeByUrl(p.subscribeUrl, "") if err != nil { - panic(err) + fmt.Printf("-----InitSubscribeData-parseSubscribeByUrl-err(%v)\n", err) + dt, rawdt, err = parseSubscribeByUrl(p.subscribeUrl, fmt.Sprintf("http://127.0.0.1:%d", p.localPortStart-1)) + if err != nil { + panic(err) + } + } + + fmt.Printf("------InitSubscribeData----rawdt(%s)----\n", rawdt) + if rawdt != "" { + conf.GetConf().UpdateSubscribeData(rawdt) } } }