mirror of
https://github.com/putyy/res-downloader.git
synced 2026-01-12 22:34:56 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
046cbb2b83 |
@@ -14,7 +14,7 @@
|
||||
!define INFO_PRODUCTNAME "res-downloader"
|
||||
!endif
|
||||
!ifndef INFO_PRODUCTVERSION
|
||||
!define INFO_PRODUCTVERSION "3.1.1"
|
||||
!define INFO_PRODUCTVERSION "3.1.3"
|
||||
!endif
|
||||
!ifndef INFO_COPYRIGHT
|
||||
!define INFO_COPYRIGHT "Copyright © 2023"
|
||||
|
||||
@@ -120,10 +120,14 @@ func (p *Proxy) setTransport() {
|
||||
IdleConnTimeout: 30 * time.Second,
|
||||
}
|
||||
|
||||
p.Proxy.ConnectDial = nil
|
||||
p.Proxy.ConnectDialWithReq = nil
|
||||
|
||||
if globalConfig.UpstreamProxy != "" && globalConfig.OpenProxy && !strings.Contains(globalConfig.UpstreamProxy, globalConfig.Port) {
|
||||
proxyURL, err := url.Parse(globalConfig.UpstreamProxy)
|
||||
if err == nil {
|
||||
transport.Proxy = http.ProxyURL(proxyURL)
|
||||
p.Proxy.ConnectDial = p.Proxy.NewConnectDialToProxy(globalConfig.UpstreamProxy)
|
||||
}
|
||||
}
|
||||
p.Proxy.Tr = transport
|
||||
|
||||
Reference in New Issue
Block a user