diff --git a/api/router.go b/api/router.go index 79438f5..83b1853 100644 --- a/api/router.go +++ b/api/router.go @@ -20,7 +20,7 @@ var router *gin.Engine func setupRouter() { gin.SetMode(gin.ReleaseMode) router = gin.New() - router.Use(gin.Logger(), gin.Recovery()) + router.Use(gin.Recovery()) temp, err := loadTemplate() if err != nil { panic(err) diff --git a/pkg/getter/subscribe.go b/pkg/getter/subscribe.go index c445a84..380631f 100644 --- a/pkg/getter/subscribe.go +++ b/pkg/getter/subscribe.go @@ -2,6 +2,7 @@ package getter import ( "io/ioutil" + "log" "strings" "sync" @@ -41,6 +42,7 @@ func (s *Subscribe) Get() proxy.ProxyList { func (s *Subscribe) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { defer wg.Done() nodes := s.Get() + log.Printf("STATISTIC: Subscribe\tcount=%d\turl=%s\n", len(nodes), s.Url) for _, node := range nodes { pc <- node } diff --git a/pkg/getter/tgchannel.go b/pkg/getter/tgchannel.go index ebe9e13..3fc325f 100644 --- a/pkg/getter/tgchannel.go +++ b/pkg/getter/tgchannel.go @@ -2,6 +2,7 @@ package getter import ( "fmt" + "log" "sync" "github.com/gocolly/colly" @@ -79,6 +80,7 @@ func (g *TGChannelGetter) Get() proxy.ProxyList { func (g *TGChannelGetter) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { defer wg.Done() nodes := g.Get() + log.Printf("STATISTIC: TGChannel\tcount=%d\turl=%s\n", len(nodes), g.Url) for _, node := range nodes { pc <- node } diff --git a/pkg/getter/web_fanqiangdang.go b/pkg/getter/web_fanqiangdang.go index 22901e5..d2d29ca 100644 --- a/pkg/getter/web_fanqiangdang.go +++ b/pkg/getter/web_fanqiangdang.go @@ -2,6 +2,7 @@ package getter import ( "fmt" + "log" "strings" "sync" @@ -113,6 +114,7 @@ func (w *WebFanqiangdangRSS) Get() proxy.ProxyList { func (w *WebFanqiangdangRSS) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { defer wg.Done() nodes := w.Get() + log.Printf("STATISTIC: Fanqiangdang\tcount=%d\turl=%s\n", len(nodes), w.Url) for _, node := range nodes { pc <- node } diff --git a/pkg/getter/web_free_ssr_xyz.go b/pkg/getter/web_free_ssr_xyz.go index caf6a4f..37f55ee 100644 --- a/pkg/getter/web_free_ssr_xyz.go +++ b/pkg/getter/web_free_ssr_xyz.go @@ -3,6 +3,7 @@ package getter import ( "encoding/json" "io/ioutil" + "log" "sync" "github.com/zu1k/proxypool/pkg/proxy" @@ -34,6 +35,7 @@ func (w *WebFreessrXyz) Get() proxy.ProxyList { func (w *WebFreessrXyz) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { defer wg.Done() nodes := w.Get() + log.Printf("STATISTIC: FreeSSRxyz\tcount=%d\turl=%s\n", len(nodes), "api.free-ssr.xyz") for _, node := range nodes { pc <- node } diff --git a/pkg/getter/web_fuzz.go b/pkg/getter/web_fuzz.go index 1323fdf..b0de338 100644 --- a/pkg/getter/web_fuzz.go +++ b/pkg/getter/web_fuzz.go @@ -2,6 +2,7 @@ package getter import ( "io/ioutil" + "log" "sync" "github.com/zu1k/proxypool/pkg/proxy" @@ -33,6 +34,7 @@ func (w *WebFuzz) Get() proxy.ProxyList { func (w *WebFuzz) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { defer wg.Done() nodes := w.Get() + log.Printf("STATISTIC: WebFuzz\tcount=%d\turl=%s\n", len(nodes), w.Url) for _, node := range nodes { pc <- node } diff --git a/pkg/getter/web_fuzz_sub.go b/pkg/getter/web_fuzz_sub.go index b4b31f1..7dc2ec1 100644 --- a/pkg/getter/web_fuzz_sub.go +++ b/pkg/getter/web_fuzz_sub.go @@ -2,6 +2,7 @@ package getter import ( "io/ioutil" + "log" "regexp" "sync" @@ -39,6 +40,7 @@ func (w *WebFuzzSub) Get() proxy.ProxyList { func (w *WebFuzzSub) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { defer wg.Done() nodes := w.Get() + log.Printf("STATISTIC: WebFuzzSub\tcount=%d\turl=%s\n", len(nodes), w.Url) for _, node := range nodes { pc <- node }