levigross / grequests

A Go "clone" of the great and famous Requests library
Apache License 2.0
2.14k stars 138 forks source link

There's sth. wrong with Proxies that use req.URL.Scheme. #67

Open ghost opened 6 years ago

ghost commented 6 years ago

image If you want to use "http://localhost:8888" to proxy your application "https://baidu.com", but in "requess.go" that code use proxy environment.

I don't known why the proxies shoud be a map, and I want to known send a request why should need more proxies url.

Because I could code this image

I think this code will let grequests wrong, Because it doesn't known how to select proxy, there has two proxy server.

I want to pull requet, but my English is so bad. I hope this can help other people who is using grequests.

And, I think ssl agent should be support in proxies .

ro := &grequests.RequestOptions{
   Proxies: []interface{"user-agent": "xx", pUrl: "http://xx:8080"}
}

Because if don't set ssl user agent, the remote serve may be check ssl user-aget

ghost commented 6 years ago

I love you baby. 希望你听到这句话不要太尴尬。你能够解决那些不好特性吗?不要模仿python 的 requests,让我们一起改变这个世界。