http_代理设置
我知道这很简单..我只是错过了一些东西..我放弃了!
#!/bin/sh
export http_proxy='http://unblocksitesnow.info'
rm -f index.html*
strace -Ff -o /tmp/mm.log -s 200 wget 'http://slashdot.org'
我使用了不同的代理服务器..无济于事..我得到了一些默认页面.. 在 /etc/wgetrc use_proxy = on
实际上我正在尝试将这个设置(http_proxy)与python的urllib2一起使用。 它也访问一些默认页面..
strace - 执行代理服务器的 dns 查找 GET http://slashdot.org/ HTTP/1.0\r\n用户代理:Wget/1.11.4\ r\n接受:/\r\n主机:slashdot.org\r\n\r\n
有任何指针吗?
I know this is simple.. I am jus missing something.. I give up!!
#!/bin/sh
export http_proxy='http://unblocksitesnow.info'
rm -f index.html*
strace -Ff -o /tmp/mm.log -s 200 wget 'http://slashdot.org'
I have used different proxy servers.. to no avail.. I get some default page..
In /etc/wgetrc use_proxy = on
Actually I am trying to use this setting(http_proxy) with python's urllib2. It access some default page as well..
strace - does a dns lookup of the proxy server
GET http://slashdot.org/ HTTP/1.0\r\nUser-Agent: Wget/1.11.4\r\nAccept: /\r\nHost: slashdot.org\r\n\r\n
Any pointers??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对于某些应用程序,HTTP_PROXY 区分大小写。 最好设置为大写。
或者
For some apps, HTTP_PROXY is case sensitive. It's best to set it in upper case.
or
问题是我正在使用代理网站。 这些站点希望您向代理站点发送 GET 请求(将目标站点作为 URL 中的参数或它们实现的任何站点特定机制)。
我正在寻找代理网站,例如 http://www.proxy4free.com/page1.html
我连接到它们各自的端口并向原始目标站点发送获取请求。
The problem was I was using proxy sites. These sites expect you to send GET request to the proxy site (with the target site as parameter in URL or whatever site specific mechanisms they implement).
I was looking for proxy sites like http://www.proxy4free.com/page1.html
I connect to their respective ports and send a get request to the original target site..
通常您需要带有代理服务器的端口,例如:
export http_proxy=http://unblocksitesnow.info:30000
此外,不需要单引号。
Often you need a port with the proxy-server, for example:
export http_proxy=http://unblocksitesnow.info:30000
Also, the single quotes are not needed.
在 Debian/Ubuntu 上,如果您需要通过代理 apt-get,您还需要更新
/etc/apt/apt.conf
如果该文件不存在,请创建它并 apt-get update 来
确认以及
导出 http_proxy=":"
On Debian/Ubuntu if you need apt-get via the proxy you will also need to update
/etc/apt/apt.conf
If the file doesnt exist, create it and apt-get update to confirm
As well as
export http_proxy="<ADD>:<PORT>"