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

2015-04-12 12:11:08 +08:00
 endoffight

硬件信息:小米路由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
9393 次点击
所在节点    问与答
6 条回复
jacy
2015-04-12 12:33:29 +08:00
你直接在浏览器能打开这个sourceforge网址吗
endoffight
2015-04-12 13:13:57 +08:00
@jacy 可以,笔记本装ss了
rentaro
2015-04-12 13:30:33 +08:00
我记得 sourceforge.net 被墙了,用 proxychains 代理命令,或者转成伪全局代理,不过我没在路由器上试过
acmetal
2015-04-12 13:57:17 +08:00
1、将文件下载到本地,然后wget本地地址。
2、反代一个openwrt-dist.sourceforge.net并绑定同样的域名,再用dnsmasq将openwrt-dist.sourceforge.net的地址指向反代地址。

ps.铜币除了发帖和回复也没什么样实际用途了,留着干嘛。
endoffight
2015-04-12 14:35:27 +08:00
@acmetal 目前就是这么做的。
不过铜币这个说的我无言以对。
cattyhouse
2015-04-12 16:57:35 +08:00
opkg可以用代理的。先把ss用polipo转成http代理。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/183193

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX