link parse fx5
This commit is contained in:
parent
5caf565edb
commit
88006a8ed0
|
|
@ -7,6 +7,7 @@ import (
|
|||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -83,12 +84,13 @@ func SendRequest(method string, endpoint string, values []byte, authKey string)
|
|||
func NewHttpClient() (http.Client, context.Context) {
|
||||
const ConnectMaxWaitTime = 80 * time.Second
|
||||
const RequestMaxWaitTime = 120 * time.Second
|
||||
|
||||
proxyUrl, _ := url.Parse("http://79.98.129.183:3128")
|
||||
client := http.Client{
|
||||
Transport: &http.Transport{
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: ConnectMaxWaitTime,
|
||||
}).DialContext,
|
||||
Proxy: http.ProxyURL(proxyUrl),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue