Skip to content

Commit

Permalink
fix(netutil): Add proxy IP to send request
Browse files Browse the repository at this point in the history
  • Loading branch information
杨崟 committed Apr 3, 2024
1 parent 77bf949 commit f135f51
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions netutil/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ func TestProxy(t *testing.T) {
config := &HttpClientConfig{
HandshakeTimeout: 20 * time.Second,
ResponseTimeout: 40 * time.Second,
Proxy: &url.URL{
Scheme: "http",
Host: "46.17.63.166:18888",
},
// Use the proxy ip to add it here
//Proxy: &url.URL{
// Scheme: "http",
// Host: "46.17.63.166:18888",
//},
}
httpClient := NewHttpClientWithConfig(config)
resp, err := httpClient.Get("https://www.ipplus360.com/getLocation")
Expand Down

0 comments on commit f135f51

Please sign in to comment.