bash – Curl:绕过本地主机的代理
发布时间:2020-12-15 19:15:18 所属栏目:安全 来源:网络整理
导读:我是一个代理,如果我尝试卷曲http:// localhost / mysite或curl http://127.0.0.1/mysite卷曲尝试用代理解决它。所以我尝试使用–noproxy选项,但不起作用。对外部服务器使用代理作为curl http://mysite.com工作正常。 我的配置: Cygwin(bash)在Windows 8
我是一个代理,如果我尝试卷曲http:// localhost / mysite或curl http://127.0.0.1/mysite卷曲尝试用代理解决它。所以我尝试使用–noproxy选项,但不起作用。对外部服务器使用代理作为curl http://mysite.com工作正常。
我的配置: > Cygwin(bash)在Windows 8下,卷曲扩展。 从卷曲 – 帮助
我试过的 >我已经禁用了防火墙,没有任何东西 响应 Connected to proxy.domain.xx (200.55.xxx.xx) port 1080 (#0) GET http://localhost/mysite HTTP/1.1 User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8r zlib/1.2.3 Host: localhost Accept: */* Proxy-Connection: Keep-Alive The system returned: <PRE><I>(111) Connection refused</I></PRE> curl -v –noproxy localhost,http:// localhost / muestra 响应 About to connect() to localhost port 80 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 80 (#0) > GET /mysite HTTP/1.1 > User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8r zlib/1.2.3 > Host: localhost > Accept: */* > < HTTP/1.1 301 Moved Permanently < Server: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 < Location: http://localhost/mysite < Content-Length: 331 < Content-Type: text/html; charset=iso-8859-1 任何想法如何解决这个问题?
后
curl -v --noproxy localhost,http://localhost/muestra 卷曲响应 About to connect() to localhost port 80 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 80 (#0) 所以它清楚地表明它连接到本地主机。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |