<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8</id>
		<title>项目二十一--便携式广告过滤路由器 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8&amp;action=history"/>
		<updated>2026-04-21T22:56:13Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8&amp;diff=10353&amp;oldid=prev</id>
		<title>Shengkai81@gmail.com：/* 配置MicroWRT */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8&amp;diff=10353&amp;oldid=prev"/>
				<updated>2015-10-03T08:33:09Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;配置MicroWRT&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2015年10月3日 (六) 08:33的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot; &gt;第43行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第43行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 30 6 * * * /etc/init.d/dnsmasq restart&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; 30 6 * * * /etc/init.d/dnsmasq restart&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;当然，玩家也可以对照自己的时间雪球更改即可，其中，时间参数分别如下：&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;当然，玩家也可以对照自己的需求更改即可，其中，时间参数分别如下：&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [minute] [hour] [day of month] [month] [day of week] [program to be run] &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [minute] [hour] [day of month] [month] [day of week] [program to be run] &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Shengkai81@gmail.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8&amp;diff=10351&amp;oldid=prev</id>
		<title>Shengkai81@gmail.com：Created page with &quot;{| style=&quot;width: 800px;&quot; |- | 大家都有这样的经历，经过一个星期紧张而忙碌的上班时间，终于到了周末，打开电影网站，追一下漏掉的美...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%8D%81%E4%B8%80--%E4%BE%BF%E6%90%BA%E5%BC%8F%E5%B9%BF%E5%91%8A%E8%BF%87%E6%BB%A4%E8%B7%AF%E7%94%B1%E5%99%A8&amp;diff=10351&amp;oldid=prev"/>
				<updated>2015-10-03T08:18:52Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- | 大家都有这样的经历，经过一个星期紧张而忙碌的上班时间，终于到了周末，打开电影网站，追一下漏掉的美...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
大家都有这样的经历，经过一个星期紧张而忙碌的上班时间，终于到了周末，打开电影网站，追一下漏掉的美剧或者电影。要等30s秒的广告！顿时&lt;br /&gt;
心情不好了，想看的意愿都减半了。遇到这种情况，我们能不能装个广告过滤插件呢？当然可以。但是问题又来了，是把插件装载电脑上还是装载路由器上呢？&lt;br /&gt;
作为一名geek，安装在路由器上才会更有成就感。好吧，本项目就是介绍如何让MicroWRT变成一个带有广告过滤功能的路由器。&lt;br /&gt;
&lt;br /&gt;
==广告过滤方案==&lt;br /&gt;
&lt;br /&gt;
目前在openwrt上实现广告过滤功能，有多种方案，总的来说有dnsmasq和nginx，一种是走代理，一种是重定向。而开源的过滤广告方案有openGG，adbyby等。&lt;br /&gt;
本教程主要使用adblockplus提供的过滤列表。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==固件定制==&lt;br /&gt;
延续我们以前教程的思路，我们首先介绍一下，如何在openwrt上配置实现广告过滤功能的软件。在这个方案中，我们要用到dnsmasq，所以先要配置它，具体如下图所示：&lt;br /&gt;
&lt;br /&gt;
[[File:dnsmasq.png|600px|thumb|center|dnsmasq configuration]]&lt;br /&gt;
&lt;br /&gt;
将编译好的固件烧写到microWRT上，重新启动。&lt;br /&gt;
&lt;br /&gt;
==配置MicroWRT==&lt;br /&gt;
&lt;br /&gt;
1. 登陆到MicroWRT，并运行下面的命令，从adblockplus官网上下载列表，当然前提是要参考我们的基础教程，将microWRT设置成可以上外网。&lt;br /&gt;
&lt;br /&gt;
  wget --no-check-certificate -qO - https://easylist-downloads.adblockplus.org/chinalist+easylist.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' &amp;gt; /etc/adblock.conf&lt;br /&gt;
  &lt;br /&gt;
通过下面的命令，将列表写入dnsmasq&lt;br /&gt;
&lt;br /&gt;
  grep conf-file /etc/dnsmasq.conf || echo -e &amp;quot;\nconf-file=/etc/adblock.conf&amp;quot; &amp;gt;&amp;gt; /etc/dnsmasq.conf&lt;br /&gt;
&lt;br /&gt;
重启dsnmasq&lt;br /&gt;
  &lt;br /&gt;
  /etc/init.d/dnsmasq restart&lt;br /&gt;
  &lt;br /&gt;
2. 修改crontab&lt;br /&gt;
&lt;br /&gt;
通过SSH登陆到microWRT上，crontab -e 编辑计划任务，加入如下内容：&lt;br /&gt;
&lt;br /&gt;
每天19.30自动更新列表：&lt;br /&gt;
  30 19 * * * wget --no-check-certificate -qO - https://easylist-downloads.adblockplus.org/chinalist+easylist.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' &amp;gt; /etc/adblock.conf   &lt;br /&gt;
  &lt;br /&gt;
每天6.30自动重启dnsmasq&lt;br /&gt;
  30 6 * * * /etc/init.d/dnsmasq restart&lt;br /&gt;
  &lt;br /&gt;
当然，玩家也可以对照自己的时间雪球更改即可，其中，时间参数分别如下：&lt;br /&gt;
  [minute] [hour] [day of month] [month] [day of week] [program to be run] &lt;br /&gt;
  &lt;br /&gt;
具体的cron用法，可以问问“度娘“&lt;br /&gt;
&lt;br /&gt;
通过上面的设置，我们的MicroWRT就能实现广告过滤的功能的。赶快动手试试吧。。&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Shengkai81@gmail.com</name></author>	</entry>

	</feed>