【问题标题】:curl through proxy syntaxcurl 通过代理语法
【发布时间】:2013-07-23 01:46:20
【问题描述】:

我不明白如何阅读这种通用语法。我想通过我们的代理请求一个 URL,它需要一个特定的主机、端口、用户名和密码。我不知道如何弄清楚协议是什么。 我想通过代理卷曲。根据下面的帮助文件,我猜该行应该是:

curl -x [whatever-my-protocol-is://]my-host-which-i-know[:my-port-which-i-know] -U my-username-which-i-know [:my-pass-which-i-know]http://www.google.com

这是对的吗?如何确定协议?

来自男人的相关信息:

-x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port
     --proxy-anyauth Pick "any" proxy authentication method (H)
     --proxy-basic   Use Basic authentication on the proxy (H)
     --proxy-digest  Use Digest authentication on the proxy (H)
     --proxy-negotiate Use Negotiate authentication on the proxy (H)
     --proxy-ntlm    Use NTLM authentication on the proxy (H)
 -U, --proxy-user USER[:PASSWORD]  Proxy user and password
     --proxy1.0 HOST[:PORT]  Use HTTP/1.0 proxy on given port

【问题讨论】:

    标签: curl proxy


    【解决方案1】:

    阅读一般语法时忽略"["。此外,Windows 喜欢双引号和单引号。

    所以命令是:

    curl -x my-host-which-i-know:my-port-which-i-know -U my-username-which-i-know:my-pass-which-i-know http://www.google.com
    

    【讨论】:

      【解决方案2】:

      如果您使用域

      curl -x proxy:81 -U domain\login:password https://stackoverflow.com/
      

      【讨论】:

        猜你喜欢
        • 2010-11-21
        • 2019-01-05
        • 1970-01-01
        • 1970-01-01
        • 2011-07-09
        • 1970-01-01
        • 2014-03-12
        • 2011-11-20
        相关资源
        最近更新 更多