定制编译openwrt.

配置完openwrt之后,觉得实在是还不够。想装个tcpdump,结果发现没有空间了。看样子得想办法省出点空间。

仔细看了看openwrt的文件系统结构,发现openwrt是把编译出来的一份只读系统打包了,装载在/rom下,然后,修改新加的内容,单独放在另一个可读写的地方,装载在/overlay上。/rom和/overlay的文件都不是全部,两者结合,才真正形成了一个复合的文件系统,加载于/。对系统文件进行替换后,由于/rom不可写,不要的那个文件并没有真正删除,其空间也就浪费了。这在小小的路由器上,是不可接受的。因此对系统的修改,比如我重新弄了个改完BUG后的dropbear,就实在是大大的浪费。

而且/rom里的文件,实际存储是压缩了的,文件压缩自然可省空间。因此有必要编译一份openwrt。过程:
1. host安装必要的组件: apt-get install gawk flex unzip git subversion
2. 下载源代码。 svn co svn://svn.openwrt.org/openwrt/trunk/ 。从此trunk目录就成了build_root目录。
3. 更新feeds. ./scripts/feeds update -a
4. 安装必须的组件 ./scripts/feeds install tcpdump psmisc
5. make menuconfig,设置一些组件。使得Target System为Atheros AR71xx/AR7240/AR913x/AR934x。Target Profile为TP-LINK TL-WR841ND v7。
6. 继续设置menuconfig里的组件。完了后make defconfig检查,确保得到以下结果:

diff  y
kmod-ipt-nathelper-extra y
kmod-mppe y
kmod-pptp y
pptp y
uhttpd  y
tcpdump y
pstree y

注意psmisc用Module方式就可以了,因为里面有多个程序,我只需要最重要的pstree。
7. make
8. 修改dropbear bug。见: http://www.swigger.net/archives/291.html
cd ./build_dir/target-mips_r2_uClibc-0.9.32/dropbear-0.53.1

note @2012-01-22: this bug is fixed by dropbear.
9. 修改config.sh ./package/base-files-network/files/lib/network/config.sh
http://www.swigger.net/archives/316.html
– if [ -d /proc/sys/net/$fam ]; then
+ if ls /proc/sys/net/$fam/*/$ifn 2>/dev/null ; then
10. 修改package/base-files-network/files/sbin/ifdown . 见 http://www.swigger.net/archives/336.html
11. 修改 rcS

--- package/base-files/files/etc/init.d/rcS     (revision 29839)
+++ package/base-files/files/etc/init.d/rcS     (working copy)
@@ -4,15 +4,15 @@
 run_scripts() {
        for i in /etc/rc.d/$1*; do
                [ -x $i ] && $i $2 2>&1
-       done | $LOGGER
+       done
 }
 
 system_config() {
        config_get_bool foreground $1 foreground 0
 }
 
-LOGGER="cat"
-[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
+#LOGGER="cat"
+#[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
 
 . /etc/functions.sh

12. 来到build_root目录,执行:

$ mkdir -p files/etc/config
$ mkdir files/etc/ppp
$ cp ./build_dir/target-mips_r2_uClibc-0.9.32/dropbear-0.53.1/ipkg-ar71xx/dropbear/etc/config/dropbear files/etc/config
$ vim files/etc/config/dropbear
+  option GatewayPorts 1
$ cp ./build_dir/target-mips_r2_uClibc-0.9.32/pptp-1.7.1/ipkg-ar71xx/pptp/etc/ppp/options.pptp files/etc/ppp/
$ vim files/etc/ppp/options.pptp
- defaultroute
$ cp build_dir/target-mips_r2_uClibc-0.9.32/root-ar71xx/etc/shells files/etc/
$ vim files/etc/shells
+ /bin/false
$ mkdir -p files/usr/bin
$ cp build_dir/target-mips_r2_uClibc-0.9.32/psmisc-22.13/ipkg-ar71xx/psmisc/usr/bin/pstree files/usr/bin/
$ ./staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/bin/mips-openwrt-linux-strip files/usr/bin/pstree 
$ make

13. 大功告成。使用 bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-factory.bin 刷系统。
刷完系统再改改配置文件。(/rom/etc/config下的总是会copy到/overlay/etc/config中,预置配置文件省不了空间)组件就不用装了。
结果是嵌了tcpdump和其它我需要的几个组件,最后还剩下几百K的空间。总的来说成果很好。

root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1792      1792         0 100% /rom
tmpfs                    14780        84     14696   1% /tmp
tmpfs                      512         0       512   0% /dev
/dev/mtdblock3             844        80       764   9% /overlay
overlayfs:/overlay         844        80       764   9% /
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14780k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
发表在 linux | 标签为 | 留下评论

simple shell script for help compiling progs for openwrt.

#!/bin/bash
basedir=/bld/trunk/staging_dir
#/bld/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2
toolchaindir=$(echo $basedir/toolchain-mips*)
#/bld/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2
targetdir=$(echo $basedir/target-mips*)
 
export STAGING_DIR=$basedir
export PATH=$toolchaindir/bin:$PATH
gcc_cmd="mips-openwrt-linux-uclibc-gcc
-I$targetdir/usr/include
-I$targetdir/include
-I$toolchaindir/usr/include
-I$toolchaindir/include
 
-Os
-pipe
-mips32r2
-mtune=mips32r2
-fno-caller-saves
-fhonour-copts
-msoft-float
-ffunction-sections
-fdata-sections
 
-L$targetdir/usr/lib
-L$targetdir/lib
-L$toolchaindir/usr/lib
-L$toolchaindir/lib
-Wl,--gc-sections
"
alias mgcc=$(echo $gcc_cmd)

usage:
$ source ./rt_gcc.sh
$ mgcc -o hello hello.c

发表在 linux | 标签为 | 一条评论

我的openwrt配置

路由器: tp-link wr841n (v7)
优点:11n路由器,信号不错,价格便宜。
缺点:空间较小,只有4M。刷openwrt是没有图形配置界面了,只能手动ssh配置。

刷openwrt:
http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-factory.bin

配置记录:
1. 安装必要的工具diff,pstree,以方便改设置和检查。
# opkg update
# rm -f /usr/bin/cmp
# opkg install diffutils
# opkg install psmisc
弄完后,把diff和pstree备份,
# opkg remove psmisc diffutils
然后把备份还原。没有办法,路由器空间较少。

2. 安装拨vpn所需组件:
# opkg install pptp mppe kmod-ipt-nathelper-extra
其中,前两个是保证路由器上能拔VPN(PPTP)。
最后一个是使接入的设备也能拨,这个说起来容易,但出事的时候很难知道是缺了哪个包。
仔细google来google去看了很多页面才偶然找到。

3. 配置网络
配置文件/etc/config/network
配置拔号:
config interface wan
option ifname eth1
option proto pppoe
option username xxxxx@163.xx
option password PASSWORD
option peerdns 1
配置VPN:
config interface vpn
option ifname pptp-vpn
option proto pptp
option username the_username
option password the_password
option server 74.117.x.x
option defaultroute 0
编辑/etc/ppp/options.pptp 删除其中的 defaultroute

4. 配置路由,使得不同的IP可以走VPN出口,也可以走默认的pppoe拔号出口。
修改 /etc/firewall
config zone
option name wan
list network ‘wan’
list network ‘vpn’

5. 配置dns, 使得*.google.com为某个固定IP,然后这个IP走VPN出口,防止google被河蟹。
编辑 /etc/dnsmasq.conf
address=/.google.com/74.125.153.106
编辑 /etc/config/network
config route
option interface vpn
option target 8.8.0.0
option netmask 255.255.0.0

config route
option interface vpn
option target 74.125.153.0
option netmask 255.255.255.0
由于google一个IP可以实现所有服务,因此这样配置是可以的。搜索,邮件啥的都不会有事。

6. 加速app store下载:
在/etc/hosts中:
203.69.113.238 itunes.apple.com
203.69.113.137 ax.init.itunes.apple.com
203.69.113.174 ax.su.itunes.apple.com

在 /etc/dnsmasq.conf 中:
address=/.phobos.apple.com/203.69.113.128

7. 使twitter和facebook的IP解析不被河蟹:
在/etc/dnsmasq.conf中:
server=/.facebook.com/8.8.8.8
server=/.twitter.com/8.8.8.8
注意前面已经设置了8.8.*.*走VPN出口,不担心它本身被河蟹。
暂时没时间进一步配置使它们解析后的地址走VPN了,反正已经不上了。
不过用类似前面GOOGLE的方式可以做到,只是要多写一些IP地址。

8. 增加一个普通用户,配置外部网SSH连接:
add @ /etc/shells
/bin/false
add @ /etc/passwd:
test1:*:1001:1001:test1:/home/test1:/bin/false
add @ /etc/group:
test1:x:1001:

#mkdir -p /home/test1/.ssh
#chown test1.test1 /home/test1
#chown test1.test1 /home/test1/.ssh
#chmod 0700 /home/test1
#chmod 0700 /home/test1/.ssh
#cp some-id-file.pub /home/test1/.ssh/authorized_keys
#chown test1.test1 /home/test1/.ssh/authorized_keys
#chmod 0600 /home/test1/.ssh/authorized_keys

add @ /etc/firewall
config redirect
option src wan
option src_dport 220
option dest lan
option dest_port 22
option proto tcp

9. 安装简单http服务器,使得可以看一些基本信息,并承载proxy.pac
#opkg install uhttpd
#/etc/init.d/uhttpd start
#cd /www
/www# ln -s /var/dhcp.leases dhcp.leases.txt
/www# vim proxy.pac

发表在 linux | 标签为 | 3条评论

a simple script to prevent bricking for openwrt

root@OpenWrt:~# cat /etc/init.d/unbrick 
#!/bin/sh /etc/rc.common
 
START=20
 
bakcat() {
	for i in $* ; do
		echo "################file seperator for $i##################"
		cat $i
		echo
	done
}
 
revert() {
	echo revert config...
	bakcat /etc/config/* >/root/cfgbak.all 2>&1
	cp -R /root/cfgbak/* /etc/config/
}
 
start() {
	count=$(cat /root/count_file)
	if [ $count -eq 0 ] ; then
		revert
	fi
	count=$((count-1))
	echo $count > /root/count_file
}
 
root@OpenWrt:~# /etc/init.d/unbrick enable
root@OpenWrt:~# echo 3 >  /root/count_file 
root@OpenWrt:~# mkdir /root/cfgbak

before modifying files in /etc/config, put an usable copy in /root/cfgbak.
if the script can run perfectly, echo 3 > /root/count_file after every reboot.
disable this script if the config files are valid and need no more change.
if any config file is wrong, reboot 3 times to unblick.

发表在 linux | 标签为 | 留下评论

openwrt dropbear bug of reverse tcp forwarding.

If someone creates a reverse tcp forwarding channel by ssh into an openwrt dropbear server, bad things are happening.
the dropbear process will crash on connecting to the binded port. Even worse, a connection with reverse tcp reverse forwarding cannot be created if GatewayPorts is set to 1 in /etc/config/dropbear.

Surely, there are bugs in dropbear.

Using gdb to find out whre the bugs are is not an easy job as there is no enough space left out on my router, but eventually I beat it.

This is the patch:

--- dropbear_1/svr-tcpfwd.c     2011-03-02 21:23:36.000000000 +0800
+++ dropbear-0.53.1/svr-tcpfwd.c        2011-08-11 01:45:17.000000000 +0800
@@ -211,7 +211,7 @@
        tcpinfo->tcp_type = forwarded;
 
        if (!opts.listen_fwd_all 
-                       || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) {
+                       || (strcmp(bindaddr, "localhost") == 0) ) {
         // NULL means "localhost only"
         tcpinfo->listenaddr = NULL;
        }
@@ -221,6 +221,7 @@
     }
 
        ret = listen_tcpfwd(tcpinfo);
+       tcpinfo->listenaddr = NULL;
 
 out:
        if (ret == DROPBEAR_FAILURE) {
diff -ur dropbear_1/tcp-accept.c dropbear-0.53.1/tcp-accept.c
--- dropbear_1/tcp-accept.c     2011-03-02 21:23:36.000000000 +0800
+++ dropbear-0.53.1/tcp-accept.c        2011-08-11 01:45:37.000000000 +0800
@@ -80,6 +80,7 @@
                        addr = tcpinfo->listenaddr;
                        port = tcpinfo->listenport;
                }
+               if (!addr) addr = "";
 
                buf_putstring(ses.writepayload, addr, strlen(addr));
                buf_putint(ses.writepayload, port);

There are three modifications.
1st. tcpinfo->listenaddr is used without inited. this might be typo. Use bindaddr , obviously.
2nd. to avoid double free, set tcpinfo->listenaddr to NULL after use as there are codes like free(tcpinfo->listenaddr) somewhere. this might take no effect but won’t take any disadvantage.
3rd. protect null string usage in tcp-accept.c

发表在 linux | 标签为 | 留下评论

openwrt build log.

make shows:

 make[1] world
 make[2] target/compile
 make[3] -C target/linux compile
 make[2] package/cleanup
 make[2] package/compile
 make[3] -C package/opkg host-compile
 make[3] -C package/base-files compile
 make[3] -C package/busybox compile
 make[3] -C package/button-hotplug compile
 make[3] -C package/libnl-tiny compile
 make[3] -C package/iw compile
 make[3] -C package/wireless-tools compile
 make[3] -C package/mac80211 compile
 make[3] -C package/crda compile
 make[3] -C package/dnsmasq compile
 make[3] -C package/dropbear compile
 make[3] -C package/iptables compile
 make[3] -C package/firewall compile
 make[3] -C package/libreadline compile
 make[3] -C package/ncurses compile
 make[3] -C package/ncurses compile
 make[3] -C package/gdb compile
 make[3] -C package/hostapd compile
 make[3] -C package/hotplug2 compile
 make[3] -C package/kernel compile
 make[3] -C package/mtd compile
 make[3] -C package/opkg compile
 make[3] -C package/libpcap compile
 make[3] -C package/linux-atm compile
 make[3] -C package/ppp compile
 make[3] -C package/resolveip compile
 make[3] -C package/pptp compile
 make[3] -C package/lua compile
 make[3] -C package/uci compile
 make[3] -C package/swconfig compile
 make[3] -C package/uboot-ar71xx compile
 make[2] package/install
 make[3] -C package/busybox install
 make[3] -C package/button-hotplug install
 make[3] -C package/crda install
 make[3] -C package/dnsmasq install
 make[3] -C package/dropbear install
 make[3] -C package/firewall install
 make[3] -C package/hostapd install
 make[3] -C package/hotplug2 install
 make[3] -C package/iptables install
 make[3] -C package/iw install
 make[3] -C package/kernel install
 make[3] -C package/libnl-tiny install
 make[3] -C package/mac80211 install
 make[3] -C package/mtd install
 make[3] -C package/opkg install
 make[3] -C package/ppp install
 make[3] -C package/pptp install
 make[3] -C package/resolveip install
 make[3] -C package/swconfig install
 make[3] -C package/uboot-ar71xx install
 make[3] -C package/uci install
 make[3] -C package/wireless-tools install
 make[3] -C package/base-files install
 make[2] package/rootfs-prepare
 make[3] package/preconfig
 make[2] target/install
 make[3] -C target/linux install
 make[3] -C target/sdk install
 make[3] -C target/toolchain install
 make[2] package/index

to build a single package:
make package/xxx/compile

these are steps that generate binary for my router:
vmlinux:

mips-openwrt-linux-uclibc-objcopy -O binary -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id -S /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/linux-2.6.39.2/vmlinux /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux
 
cp /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-tl-wr841nd-v7
/ow/openwrt/trunk/staging_dir/host/bin/patch-cmdline /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-tl-wr841nd-v7 'board=TL-WR741ND console=ttyS0,115200'
gzip -9 -c /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-tl-wr841nd-v7 > /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-tl-wr841nd-v7.bin.gz

root filesystem:

/ow/openwrt/trunk/staging_dir/host/bin/mksquashfs4 /ow/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.32/root-ar71xx /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 -processors 1
 
cp /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/root.squashfs /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/root.squashfs-64k
 
/ow/openwrt/trunk/staging_dir/host/bin/padjffs2 /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/root.squashfs-64k 4 8 64
padding image to 00164000
padding image to 00170000
 
cp /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/root.squashfs-64k /ow/openwrt/trunk/bin/ar71xx/openwrt-ar71xx-generic-root.squashfs-64k

generates final binary:

/ow/openwrt/trunk/staging_dir/host/bin/mktplinkfw -B TL-WR841NDv7 -N OpenWrt -V r27929    -k /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-tl-wr841nd-v7.bin.gz -r /ow/openwrt/trunk/bin/ar71xx/openwrt-ar71xx-generic-root.squashfs-64k -o /ow/openwrt/trunk/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-factory.bin
/ow/openwrt/trunk/staging_dir/host/bin/mktplinkfw -B TL-WR841NDv7 -N OpenWrt -V r27929 -s -k /ow/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-tl-wr841nd-v7.bin.gz -r /ow/openwrt/trunk/bin/ar71xx/openwrt-ar71xx-generic-root.squashfs-64k -o /ow/openwrt/trunk/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-sysupgrade.bin
发表在 linux | 标签为 | 留下评论

svn behind firewall that needs http proxy

just edit ~/.subversion/servers

add these two lines under [global]
http-proxy-host = xxx.xxx.com
http-proxy-port = 8080

there is no way to set a socks proxy for svn.
svn is using apr for socket IO. there is no code supporting socks proxy seen in svn’s source.
However, tsocks is a workaround for this case.

发表在 linux | 留下评论

change shell for jail-broken iphone/ipad

One can ssh into his iphone/ipad by ssh once jailbroked and installed openssh in cydia. But the shell is /bin/sh by default.

Today I tried to change the shell to /bin/bash by modifying /etc/passwd, but then I found this didn’t help.

I got nothing useful after a bit of googling.

Finally  by analysis strings in pam_unix.so I found /etc/master.passwd in it. So this is the answer: modifying /etc/master.passwd changes the shell.

Enjoy bash on ios!

 

发表在 ios | 留下评论

calling task_for_pid on MAC OS X

from mac 10.5 on, task_for_pid fails if the calling process has no root privilege.

today I wrote a small app that needs this function, so I decided to make it run.

Finding out the web , I found the result.

There are something wrong or outdated on sites talk about it, so I wrote this article to helper those meet this problem.

Just follow these steps:

1. Find your .plist file in XCode and add a new entry “SecTaskAccess” and set it to string value “allowed”. Make sure the Info.plist file generated in your bundle actually has this value in it.

2. You need get a real code signing certificate NOT a self made one. Some websites are still talking making a self-signed certificate. This is outdated. An iphone certificate is OK while I think a MAC dev center certificate is better.

3. Make XCode sign the executable during the build process, or sign it yourself manually using the codesign command line utility.

4.Call the following method before making calls to task_for_pid()

 
#include <Security/Authorization.h>
 
int acquireTaskportRight()
{
OSStatus status;
AuthorizationItem taskport_item = {"system.privilege.taskport"};
AuthorizationRights rights = {1, &taskport_item}, *out_rights = NULL;
AuthorizationRef author;
AuthorizationFlags authorizationFlags = kAuthorizationFlagExtendRights | kAuthorizationFlagPreAuthorize	|
kAuthorizationFlagInteractionAllowed | (1 << 5);
status = AuthorizationCreate(NULL,   kAuthorizationEmptyEnvironment, authorizationFlags, &author);
if (status != errAuthorizationSuccess) {  return -1;  }
status = AuthorizationCopyRights(author, &rights, kAuthorizationEmptyEnvironment,
authorizationFlags, &out_rights);
if (status != errAuthorizationSuccess) {  return -2;  }
return 0;
}

NOTE:

If you’re writing a command-line tool which has no info.plist file, you should make one and add the following arguments to your link command:

-sectcreate __TEXT   __info_plist  Info.plist.file.path

where Info.plist.file.path is the path to the Info.plist file.
发表在 MAC, 开发 | 一条评论

怎么加速你的 iTunes 下载

以下文字为转载:

by Paveo owind.com

今天 Andy 叔叔问我怎么在 hosts 文件里面添加

*.phobos.apple.com 208.46.163.74

不幸的是,hosts 文件这种老古董是不支持通配符滴。。那么怎么才能强行给众多的 Apple 的服务器指定 IP 地址来加快 iTunes 下载呢。。?显然不能从a1一直加到a1999 。。

那我们就用 dnsmasq 吧,如果你的 Mac 里面已经装了 dnsmasq,那很简单,加上这条规则:

address=/.phobos.apple.com/173.223.52.163

就能把 *.phobos.apple.com 强制指定到 IP 173.223.52.163。173.223.52.163 这个IP在我网络里下 iTunes 的东西是满速的。所以你可以根据你的网络得到一个最快的IP,然后强制指定 *.phobos.apple.com 到那个IP地址。

那么如何知道哪个IP对你来说速度最佳呢?也很简单,打开你的终 端,ping a*.phobos.apple.com,比如 ping a10.phobos.apple.com ping a45.phobos.apple.com 。。。多ping几个地址,然后用那个延迟最低的即可(200左右或者以下最好)。

然后你懂了吧。。享受高速的 iTunes 下载吧。

one more thing。。

如果你老换网络环境,或者,你根本不知道怎么在 Mac 安装 dnsmasq,好吧。你可以在路由器上弄。刷了 ddwrt 或者 tomato 的路由器都可以添加 dnsmasq 选项。在 Advanced – DHCP / DNS – Dnsmasq Custom configuration 添加:

address=/.phobos.apple.com/173.223.52.163

 

以上文字为转载,再记一下自己的发现过程:

在ipad上下载一个软件,在网关抓包,发现它是通过a623.phobos.apple.com下载的ipa。然后搜索phobos.apple.com,找到该文,

不过文中的IP 173.223.52.163 速度并不好。于是找来一堆香港台湾的dns服务器:

202.60.252.8
202.45.84.58
168.95.1.1
139.175.252.16
61.10.1.130
203.80.96.10
210.200.211.225
208.67.220.220
61.10.0.130
61.56.211.185
168.95.192.1
168.95.192.2
139.175.10.20
139.175.55.244
139.175.150.20
202.45.84.59
211.78.130.2
202.14.67.14
202.14.67.4
208.67.222.222
210.200.211.193

用这堆服务器来解析a1.phobos.apple.com

得到一堆这样的结果IP和ping值:

203.186.47.56 34.176
203.69.113.128 57.967
203.69.138.49 58.888
210.201.31.70 66.606
203.186.47.58 113.944
210.0.146.40 123.9
203.69.138.34 166.874
203.69.113.136 167.232
210.201.31.71 174.126
203.69.138.18 175.379
139.175.236.225 358.2
60.254.131.54 393.824
210.0.146.18 433.961
60.254.175.11 473.824
60.254.175.17 499.184
60.254.131.55 515.065
139.175.236.203 531.428
96.17.180.152 573.789
96.17.180.153 600.659

选中最快的 203.186.47.56

大功告成。

 

发表在 软件使用 | 留下评论