V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
endoffight
V2EX  ›  问与答

在路由器上使用 wget 命令总是不成功

  •  1
     
  •   endoffight · 2015-04-12 12:11:08 +08:00 · 9267 次点击
    这是一个创建于 3317 天前的主题,其中的信息可能已经有所发展或是发生改变。

    硬件信息:小米路由mini
    软件信息:PandoraBox 14.09 r601

    命令:

    wget http://openwrt-dist.sourceforge.net/releases/ramips/packages

    这个命令是opkg update中的某一步。

    在netstat中总是能看到一个SYN_SENT 的请求。
    然是在子网设备中,wget就没问题。

    我的推论:

    目测是被墙了,但是子网设备能够下载,我就很郁闷了。
    现在的解决办法是用反代。

    请问大神们,如何配置能够更简单的使用这个命令,而不需要配置,因为这个命令是在运行opkg update的时候自动运行的,所以无法修改这个命令。

    另问:

    为嘛我发一篇文章扣了我 46铜币

    情景重现:

    [root@PandoraBox:/root]#wget -d -S http://openwrt-dist.sourceforge.net/releases/ramips/packages
    Setting --server-response (serverresponse) to 1
    DEBUG output created by Wget 1.16 on linux-gnu.
    
    --2015-04-12 11:59:19--  http://openwrt-dist.sourceforge.net/releases/ramips/packages
    Resolving openwrt-dist.sourceforge.net... 216.34.181.96
    Caching openwrt-dist.sourceforge.net => 216.34.181.96
    Connecting to openwrt-dist.sourceforge.net|216.34.181.96|:80... Closed fd 3
    failed: Connection timed out.
    Releasing 0x00a5a328 (new refcount 1).
    Retrying.
    
    --2015-04-12 12:01:28--  (try: 2)  http://openwrt-dist.sourceforge.net/releases/ramips/packages
    Found openwrt-dist.sourceforge.net in host_name_addresses_map (0xa5a328)
    Connecting to openwrt-dist.sourceforge.net|216.34.181.96|:80... Closed fd 3
    failed: Connection timed out.
    Releasing 0x00a5a328 (new refcount 1).
    Retrying.
    
    --2015-04-12 12:03:37--  (try: 3)  http://openwrt-dist.sourceforge.net/releases/ramips/packages
    Found openwrt-dist.sourceforge.net in host_name_addresses_map (0xa5a328)
    Connecting to openwrt-dist.sourceforge.net|216.34.181.96|:80... Closed fd 3
    failed: Connection timed out.
    Releasing 0x00a5a328 (new refcount 1).
    Retrying.
    
    --2015-04-12 12:05:47--  (try: 4)  http://openwrt-dist.sourceforge.net/releases/ramips/packages
    Found openwrt-dist.sourceforge.net in host_name_addresses_map (0xa5a328)
    Connecting to openwrt-dist.sourceforge.net|216.34.181.96|:80... Closed fd 3
    failed: Connection timed out.
    Releasing 0x00a5a328 (new refcount 1).
    Retrying.
    
    --2015-04-12 12:07:58--  (try: 5)  http://openwrt-dist.sourceforge.net/releases/ramips/packages
    Found openwrt-dist.sourceforge.net in host_name_addresses_map (0xa5a328)
    Connecting to openwrt-dist.sourceforge.net|216.34.181.96|:80...
    

    netstat:

    [root@PandoraBox:/tmp]#netstat -anp|grep wget
    tcp        0      1 xx.xx.xx.xxxx.xx.xx.xx:36406     216.34.181.96:80        SYN_SENT    18077/wget
    
    6 条回复    2015-04-12 16:57:35 +08:00
    jacy
        1
    jacy  
       2015-04-12 12:33:29 +08:00
    你直接在浏览器能打开这个sourceforge网址吗
    endoffight
        2
    endoffight  
    OP
       2015-04-12 13:13:57 +08:00
    @jacy 可以,笔记本装ss了
    rentaro
        3
    rentaro  
       2015-04-12 13:30:33 +08:00
    我记得 sourceforge.net 被墙了,用 proxychains 代理命令,或者转成伪全局代理,不过我没在路由器上试过
    acmetal
        4
    acmetal  
       2015-04-12 13:57:17 +08:00
    1、将文件下载到本地,然后wget本地地址。
    2、反代一个openwrt-dist.sourceforge.net并绑定同样的域名,再用dnsmasq将openwrt-dist.sourceforge.net的地址指向反代地址。

    ps.铜币除了发帖和回复也没什么样实际用途了,留着干嘛。
    endoffight
        5
    endoffight  
    OP
       2015-04-12 14:35:27 +08:00
    @acmetal 目前就是这么做的。
    不过铜币这个说的我无言以对。
    cattyhouse
        6
    cattyhouse  
       2015-04-12 16:57:35 +08:00 via iPhone
    opkg可以用代理的。先把ss用polipo转成http代理。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5487 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 07:18 · PVG 15:18 · LAX 00:18 · JFK 03:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.