LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1013|回复: 3

就是pacman里不是说可以用wget嘛,如果代理要用户名和密码请问要放哪?

[复制链接]
发表于 2005-5-13 23:18:45 | 显示全部楼层 |阅读模式
因为不能上国外网,要用代理
请问要用户名和密码的代理要放在哪呢?
发表于 2005-5-13 23:51:20 | 显示全部楼层
在/etc/wgetrc里面,可以用http_proxy = http://user:password@address:port/

另外想问大家,为什么socks4代理用上面这种方式写了不行呢?
回复 支持 反对

使用道具 举报

发表于 2005-5-14 00:57:23 | 显示全部楼层
Post by ak137
在/etc/wgetrc里面,可以用http_proxy = http://user:password@address:port/

另外想问大家,为什么socks4代理用上面这种方式写了不行呢?


form the GNU wget's manual:

Wget supports proxy servers, which can lighten the network load, speed up retrieval and provide access behind firewalls. However, if you are behind a firewall that requires that you use a socks style gateway, you can get the socks library and build Wget with support for socks. Wget also supports the passive FTP downloading as an option.

所以,我认为wget默认没有加入socks的支持。需要开启它并重新编译。
你可以试试下面这个PKGBUILD。


  1. pkgname=wget
  2. pkgver=1.9.1
  3. pkgrel=socks
  4. pkgdesc="A network utility to retrieve files from the Web"
  5. url="http://www.gnu.org/software/wget/wget.html"
  6. depends=('glibc' 'openssl')
  7. backup=('etc/wgetrc')
  8. source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
  9. md5sums=('e6051f1e1487ec0ebfdbda72bedc70ad')

  10. build() {
  11.   cd $startdir/src/$pkgname-$pkgver
  12.   ./configure --prefix=/usr --sysconfdir=/etc --with-socks
  13.   make || return 1
  14.   make DESTDIR=$startdir/pkg install
  15. }
复制代码
回复 支持 反对

使用道具 举报

发表于 2005-5-16 13:42:23 | 显示全部楼层
多谢版主,我用tsocks解决了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表