Published by eexpress under ●Opera标签 Edit This
代码: 全选
~/应用/脚本 ☎ cat fetch_proxy.bash
#!/bin/bash
mask="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}:[0-9]\{2,4\}"
wget http://www.proxycn.com/html_proxy/30fastproxy-1.html
ip=`cat 30fastproxy-1.html |grep ‘>1′|grep -o $mask`
echo “最新的代理地址:$ip”
sed “s/$mask/$ip/” -i ~/.exp-proxy-0.pac
☎ cat .exp-proxy-0.pac
var patterns = new Array(
"tw.news.yahoo",
"wikipedia.org",
"wikimedia.org",
"wretch.cc",
"googlepages.com",
"my.opera.com",
"blogspot.com",
"*** end of GFWed patterns ***"
)
function FindProxyForURL(url, host)
{
for (i in patterns)
{
if( url.indexOf( patterns ) >= 0 )
{
return "PROXY 217.17.244.166:80";
}
}
return "DIRECT";
}