4 Commits

Author SHA1 Message Date
putyy
bb6a71f6b6 fix: proxy 2025-12-31 10:24:14 +08:00
putyy
b562f76c69 feat: add url search, update version 2025-12-30 23:47:12 +08:00
putyy
8aaf95fd36 perf: domain rule 2025-12-30 23:47:12 +08:00
putyy
983d72d65a feat: add domain rule configuration 2025-12-30 23:47:12 +08:00
2 changed files with 5 additions and 1 deletions

View File

@@ -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"

View File

@@ -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