curl --help你会看到
-x, --proxy [protocol://]host[:port]那么我们可以这样来操作:
curl -x "http://user:pwd@127.0.0.1:1234" "http://httpbin.org/ip"
curl --proxy "http://user:pwd@127.0.0.1:1234" "http://httpbin.org/ip"参考资料:
https://oxylabs.io/blog/curl-with-proxy
curl --help-x, --proxy [protocol://]host[:port]curl -x "http://user:pwd@127.0.0.1:1234" "http://httpbin.org/ip"
curl --proxy "http://user:pwd@127.0.0.1:1234" "http://httpbin.org/ip"