使用帮助指令看下如何使用

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