jiangtiandao / smarthosts

Automatically exported from code.google.com/p/smarthosts
0 stars 0 forks source link

dnsmasq版的几个问题 #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
首先感谢这个项目!然后因为我之前也研究过类似的问题,��
�以希望可以帮到一点。
1. address=/blogspot.com/203.208.45.208 
这个是没用的,可以删掉。blogspot、blogger都是不能通过修改ho
sts访问的,这个ip段不行,可用ip都封了。
2. address=/top100.cn/203.208.45.208 
这个会造成网站无法访问,应该删掉,或者仅保留几个子域��
�。
3. 
附件中是我之前研究某类似功能软件时总结的一个列表,都��
�过我确认,应该没有问题,可以根据情况部分整合到您的列�
��中。格式稍有不同但是很容易看懂。
4. 
暂时就发现这两个问题,其他的比如facebook没有加入等问题可
以慢慢再说。最后,希望这个dnsmasq版的列表也能时常更新。�
��常感谢!

Original issue reported on code.google.com by wyf88.1...@gmail.com on 29 Dec 2011 at 6:47

Attachments:

GoogleCodeExporter commented 9 years ago
另外,看到这个帖子的人不知有没有使用dd-wrt路由器中dnsmasq�
��?求每次打开路由器后自动更新此hosts的方法

Original comment by wyf88.1...@gmail.com on 29 Dec 2011 at 6:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
自己用网上的某个脚本简单改了改
#!/bin/sh
logger WAN up script executing
sleep 2
if test ! -s /tmp/dlhosts
then
    cat >/tmp/dlhosts <<"EOF"
logger Downloading hosts
cd /tmp
wget -O smarthosts http://smarthosts.googlecode.com/svn/trunk/dnsmasq.conf
cat dnsmasq.conf smarthosts > newconf
rm dnsmasq.conf
mv newconf dnsmasq.conf
logger Restarting dnsmasq
killall dnsmasq
dnsmasq --conf-file=/tmp/dnsmasq.conf
EOF
    chmod 777 /tmp/dlhosts
    /tmp/dlhosts
fi
grep -q '/tmp/dlhosts' /tmp/crontab || 
    echo "45 23 * * 5 root /tmp/dlhosts" >>/tmp/crontab

Original comment by wyf88.1...@gmail.com on 30 Dec 2011 at 5:44

GoogleCodeExporter commented 9 years ago
感谢反馈。
今晚的更新会解决这个问题。

Original comment by azly...@gmail.com on 2 Jan 2012 at 6:02