function FindProxyForURL(url, host) {
if (isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "172.0.0.0", "255.0.0.0"))
return "DIRECT";
if ( shExpMatch(host, "*.facebook.com") )
return "SOCKS 127.0.0.1:9000";
if ( shExpMatch(host, "*.pchome.com.tw") )
return "SOCKS 127.0.0.1:9000";
if ( shExpMatch(host, "*.ruten.com.tw") )
return "SOCKS 127.0.0.1:9000";
if ( shExpMatch(host, "tw.*.yahoo.com") )
return "SOCKS 127.0.0.1:9000";
if ( shExpMatch(host, "*.blogspot.*") )
return "SOCKS 127.0.0.1:9000";
return "DIRECT";
}
2013年12月22日 星期日
hdd image for PXE boot
dd if=/dev/zero of=kido bs=512 count=20160 --> S63*H16*C20
fdisk -u -C20 -H16 -S63 kido
c--> DOS Compatibility flag is set
n --> p --> 1
t --> b
a --> 1
ms-sys -9 -f kido
losetup -o32256 /dev/loop0 kido
mkfs.msdos -F 16 -n "KIDO" /dev/loop0
ms-sys -f -6 /dev/loop0
hexedit /dev/loop0
15h-F8
18h-3F (S63)
1Ah-10 (H16)
1Ch-1Dh (3f 00)
24h-80
shrink down image size by gzip
gzip kido
mv kido kido.img
fdisk -u -C20 -H16 -S63 kido
c--> DOS Compatibility flag is set
n --> p --> 1
t --> b
a --> 1
ms-sys -9 -f kido
losetup -o32256 /dev/loop0 kido
mkfs.msdos -F 16 -n "KIDO" /dev/loop0
ms-sys -f -6 /dev/loop0
hexedit /dev/loop0
15h-F8
18h-3F (S63)
1Ah-10 (H16)
1Ch-1Dh (3f 00)
24h-80
cp command.com drvspace.bin io.sys msdos.sys to image
losetup -d /dev/loop0
mount -o loop,offset=32256 kido hdd --> 32256 = 63*512
shrink down image size by gzip
gzip kido
mv kido kido.img
PXE config
label dos
kernel /tool/memdisk
append initrd=/tool/kido.img harddisk c=20 h=16 s=63
mbr --> master boot record (at offset 0)
boot program (at offset 32256)
ms-sys --> http://ms-sys.sourceforge.net/
ms-sys --> http://ms-sys.sourceforge.net/
hexedit --> http://rigaux.org/hexedit.html
f2 to save
f10 to exit
訂閱:
文章 (Atom)