This commit is contained in:
liwei committed 2024-05-01 18:35:32 +08:00
1 parent 070db64ca9
commit f8ea009fe9
6 files changed
+27 -12

No files matched your search

+2 -3
View File
@@ -9,6 +9,7 @@ import (
"github.com/GopeedLab/gopeed/internal/fetcher"
"github.com/GopeedLab/gopeed/pkg/base"
fhttp "github.com/GopeedLab/gopeed/pkg/protocol/http"
"github.com/GopeedLab/gopeed/pkg/util"
"github.com/xiaoqidun/setft"
"golang.org/x/sync/errgroup"
"io"
@@ -454,9 +455,7 @@ func (f *Fetcher) buildClient() *http.Client {
transport := &http.Transport{}
// Cookie handle
jar, _ := cookiejar.New(nil)
if f.ctl.ProxyUrl != nil {
transport.Proxy = http.ProxyURL(f.ctl.ProxyUrl)
}
transport.Proxy = util.ProxyUrlToHandler(f.ctl.ProxyUrl)
return &http.Client{
Transport: transport,
Jar: jar,