summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author墨华 <[email protected]>2021-08-12 14:56:34 +0800
committer墨华 <[email protected]>2021-08-12 14:56:34 +0800
commit775979bd50d979b36da541ad690415a9416a03dc (patch)
tree6dd1b66d5298e07008fbf62aba299aa6a9090ea0
parent6fae84d384e140955f22366dc63253a40bae52aa (diff)
support http proxy
-rw-r--r--nf.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/nf.go b/nf.go
index aab8c3d..2b529ea 100644
--- a/nf.go
+++ b/nf.go
@@ -33,6 +33,7 @@ func RequestIP(requrl string, ip string) string {
client := &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{ServerName: host},
+ Proxy: http.ProxyFromEnvironment,
},
CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse },
Timeout: 5 * time.Second,