开发者

how to check, if the server can handle curl connection thru proxy AND validate proxies from the list?

how to check, if the开发者_如何学运维 server can handle curl connection thru proxy AND validate proxies from the list?


cURL requests can simulate exactly a normal request from any browser, so there is no difference on how servers respond to cURL.

Whether or not the server accepts a proxy connection depends on if your proxy is transparent or not. A transparent proxy disguises itself so there is no evidence the connection is coming from a proxy. A non-transparent proxy will provide X-PROXY-* headers in the HTTP request.

To test whether the proxy works, simply set the CURL_PROXYTYPE to the type of proxy you are using, CURL_PROXY option to the proxy host, and CURL_PROXYPORT to the proxy's port.. and make a normal request.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜