我正在使用代理,除了 cURL 之外没有任何问题。
任何时候我尝试做:
curl -L http://link.to.something
Run Code Online (Sandbox Code Playgroud)
我收到:
curl: (5) Couldn't resolve proxy 'http'
Run Code Online (Sandbox Code Playgroud)
尽管如此:
curl --proxy http://myproxy.com:8080 -L http://link.to.something
Run Code Online (Sandbox Code Playgroud)
会很好用。
有没有办法--proxy
每次都不写?
从男人卷曲:
-x, --proxy <[protocol://][user@password]proxyhost[:port]>
Use the specified HTTP proxy.
If the port number is not specified, it is assumed at port 1080.
Run Code Online (Sandbox Code Playgroud)
一般用途,为http/https声明环境变量
export http_proxy=http://your.proxy.server:port/
export https_proxy=$http_proxy
Run Code Online (Sandbox Code Playgroud)
Run Code Online (Sandbox Code Playgroud)export http_proxy=http://username:password@proxyserver.com:port/ export https_proxy=$http_proxy export ftp_proxy=http://username:password@proxyserver.com:port/
Run Code Online (Sandbox Code Playgroud)export http_proxy=http://proxyserver.com:port/ export https_proxy=$http_proxy export ftp_proxy=http://proxyserver.com:port/
归档时间: |
|
查看次数: |
21648 次 |
最近记录: |