Skip to content

Commit

Permalink
调整:增加默认读取Proxy配置
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jun 27, 2024
1 parent 2a818c2 commit b1ff2e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http/httpRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func RequestProxy(methodName string, requestUrl string, head map[string]any, bod
}
// 设置代理
if proxyAddr != "" {
if index := strings.Index(proxyAddr, "://"); index > -1 && !strings.HasPrefix(strings.ToLower(proxyAddr), "socks5://") {
proxyAddr = "socks5" + proxyAddr[index:]
}
fastHttpClient.Dial = fasthttpproxy.FasthttpSocksDialer(proxyAddr)
}
var err error
Expand Down

0 comments on commit b1ff2e8

Please sign in to comment.