pommy 发表于 2004-7-1 21:58:51

HOWTO - wget with proxy

我只能通过Browser使用proxy经密码验证后才能连接Web,如果想要down点东东的话,只能“save the link as". 如果想直接在prompt下wget --http_proxy=xx:xx@xxx:80 xxx. 反馈信息总是说不能通过proxy server的验证。请问怎么才能通过proxy使用wget? 为什么在Brower下save 可以?

Ivn 发表于 2004-7-2 02:03:49

man wget

--proxy=on/off
         Turn proxy support on or off.The proxy is on by default if the appropriate environment variable is defined.


-----
/etc/wgetrc

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

# If you do not want to use proxy at all, set this to off.
#use_proxy = on

mrzhu 发表于 2004-7-2 02:39:11

或者是export http_proxy=http://xxx:xxx@host:port
然后再wget url

pommy 发表于 2004-7-2 09:30:06

pls debug this

# vim /etc/wgetrc
----------
# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://192.168.192.58:80/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

# If you do not want to use proxy at all, set this to off.
use_proxy = on

----------
# wget http://mirror.gentoo.ru/pub/mirror/gentoo/distfiles/1007_bootsplash-v3.0.7-2.4.20-0.patch
--09:17:34--http://mirror.gentoo.ru/pub/mirror/gentoo/distfiles/1007_bootsplash-v3.0.7-2.4.20-0.patch
         => `1007_bootsplash-v3.0.7-2.4.20-0.patch'
Connecting to 192.168.192.58:80... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.)
09:17:34 ERROR 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.).

babyfacehl 发表于 2004-7-2 13:18:27

“我只能通过Browser使用proxy经密码验证后才能连接Web”

请问密码验证是如何完成的?使用的是什么Browser?
我用Mozilla和Opera设置了代理服务器和端口,上网时无法自动弹出登陆信息输入窗口啊!!!

pommy 发表于 2004-7-2 14:25:33

密码具体怎么验证的我不太清楚,只要是具有proxy功能的browser都可以阿(windows下),在访问web时,弹出对话框要求username and password.

babyfacehl 发表于 2004-7-2 15:06:47

可是在Linux下(我的是Fedora Core1),Mozilla和Opera都不会弹出对话框啊,郁闷!

Ivn 发表于 2004-7-2 15:26:00

或者是export http_proxy=http://xxx:xxx@host:port
然后再wget url

这个是设置环境值的,wget 运行时检测,设置
wgetrc 文件中的 http_proxy 也是一样的,
如果你的 proxy 需要验证,那就填写 xxxx:xxxx
http_proxy=http://:@host:port

pommy 发表于 2004-7-2 15:56:58

# vim /etc/wgetrc
http_proxy=http://user:[email protected]:80

# wgethttp://mirror.gentoo.ru/pub/mirror/gentoo/distfiles/Alpha.tar.gz

--15:45:26--http://mirror.gentoo.ru/pub/mirror/gentoo/distfiles/Alpha.tar.gz
         => `Alpha.tar.gz'
Connecting to 192.168.192.58:80... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.)
15:45:26 ERROR 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.).

adam_w 发表于 2004-7-19 16:16:42

!!!

加上这个选项 --proxy-user=“user”--proxy-passwd=“password”

pommy 发表于 2004-7-19 16:30:35

Re: !!!

加上这个选项 --proxy-user=“user”--proxy-passwd=“password”

謝謝!居然可以當, :-D
页: [1]
查看完整版本: HOWTO - wget with proxy