<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>广告时间 by Hugo Zhu</title>
	<atom:link href="https://hugozhu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://hugozhu.wordpress.com</link>
	<description>广告怎么才能不烦人哩？其实广告也是一种分享啊！</description>
	<lastBuildDate>Tue, 10 Jan 2012 11:29:37 +0000</lastBuildDate>
	<language>zh-cn</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hugozhu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s-ssl.wordpress.com/i/buttonw-com.png</url>
		<title>广告时间 by Hugo Zhu</title>
		<link>https://hugozhu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://hugozhu.wordpress.com/osd.xml" title="广告时间 by Hugo Zhu" />
	<atom:link rel='hub' href='https://hugozhu.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Storm Installation</title>
		<link>https://hugozhu.wordpress.com/2012/01/10/storm-installation/</link>
		<comments>https://hugozhu.wordpress.com/2012/01/10/storm-installation/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 11:27:01 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[生活随笔]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=479</guid>
		<description><![CDATA[Storm installation Note: sudo ln -s /usr/local/share/aclocal/pkg.m4 /usr/share/aclocal/pkg.m4 sudo ln -s /System/Library/Frameworks/JavaVM.framework/Headers/ /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/include Filed under: 生活随笔<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=479&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Storm installation Note: </p>
<p>sudo ln -s /usr/local/share/aclocal/pkg.m4 /usr/share/aclocal/pkg.m4</p>
<p>sudo ln -s /System/Library/Frameworks/JavaVM.framework/Headers/ /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/include</p>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e7%94%9f%e6%b4%bb%e9%9a%8f%e7%ac%94/'>生活随笔</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=479&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2012/01/10/storm-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>用Markdown格式写Blog</title>
		<link>https://hugozhu.wordpress.com/2011/09/07/%e7%94%a8markdown%e6%a0%bc%e5%bc%8f%e5%86%99blog/</link>
		<comments>https://hugozhu.wordpress.com/2011/09/07/%e7%94%a8markdown%e6%a0%bc%e5%bc%8f%e5%86%99blog/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 06:17:47 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[生活随笔]]></category>
		<category><![CDATA[markdown]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=475</guid>
		<description><![CDATA[Markdown (http://en.wikipedia.org/wiki/Markdown) 标题: 第一行 第二行   第二行   代码（用四个空格缩进） local action = ngx.ctx.action local cgi = ngx.ctx.cgi for k, v in pairs(cgi.params) do print(v) end 强调 顶 文章块 &#62; This text will be enclosed in an HTML blockquote element. &#62; Blockquote elements are reflowable. You may arbitrarily &#62; wrap the text to your liking, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=475&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Markdown (http://en.wikipedia.org/wiki/Markdown)</p>
<hr />
<h1>标题:</h1>
<ul>
<li>第一行
<ul>
<li>第二行</li>
</ul>
<p> </p>
</li>
<li>第二行</li>
</ul>
<p> </p>
<h1>代码（用四个空格缩进）</h1>
<pre><code>local action = ngx.ctx.action
local cgi    = ngx.ctx.cgi
for k, v in pairs(cgi.params) do
    print(v)
end
</code></pre>
<h1>强调</h1>
<p><strong>顶</strong></p>
<h1>文章块</h1>
<p>&gt; This text will be enclosed in an HTML blockquote element. &gt; Blockquote elements are reflowable. You may arbitrarily &gt; wrap the text to your liking, and it will all be parsed &gt; into a single blockquote element.</p>
<h1>链接：</h1>
<p>短短的</p>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e7%94%9f%e6%b4%bb%e9%9a%8f%e7%ac%94/'>生活随笔</a> Tagged: <a href='https://hugozhu.wordpress.com/tag/markdown/'>markdown</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/475/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=475&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/09/07/%e7%94%a8markdown%e6%a0%bc%e5%bc%8f%e5%86%99blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet another Mac常用软件列表</title>
		<link>https://hugozhu.wordpress.com/2011/09/04/yet-another-mac%e5%b8%b8%e7%94%a8%e8%bd%af%e4%bb%b6%e5%88%97%e8%a1%a8/</link>
		<comments>https://hugozhu.wordpress.com/2011/09/04/yet-another-mac%e5%b8%b8%e7%94%a8%e8%bd%af%e4%bb%b6%e5%88%97%e8%a1%a8/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 12:22:27 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[苹果技巧]]></category>
		<category><![CDATA[mac software]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=467</guid>
		<description><![CDATA[又一个Mac常用软件列表 输入法 QQ Mac 拼音(五笔）输入法 (freeware)推荐，速度更快，界面更简洁 搜狗 Mac 拼音输入法 (freeware) 文档处理 Microsoft Office 2011 for Mac，建议使用Outlook做为Exchange客户端，Apple Mail有时会乱码 iWorks 09: Keynote, Pages, Numbers 图片，多媒体处理，流程图绘制 iLife 2011：这个应该都内置了 OmniGaffle 画各种图（流程图，架构图，UML图）必须安装！ Pixelmator 或 Acorn：精简版的Photoshop Skitch: 截屏软件 (Appstore freeware) LittleSnapper: 截屏截网页软件 (freeware) Xee: 看图软件，类似ACDsee(freeware) 文本编辑器 BBEdit Coda jEdit (freeware) 开发工具 Xcode 4.2 and iOS SDK for Lion 及其以上: 包含了gcc等编译工具，必须装 Versions: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=467&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>又一个Mac常用软件列表</h3>
<ul>
<li><strong>输入法</strong>
<ul>
<li><a href="http://shurufa.qq.com/mac/">QQ Mac 拼音(五笔）输入法</a> (freeware)推荐，速度更快，界面更简洁</li>
<li>搜狗 Mac 拼音输入法 (freeware)</li>
</ul>
</li>
<li><strong>文档处理</strong>
<ul>
<li>Microsoft Office 2011 for Mac，建议使用Outlook做为Exchange客户端，Apple Mail有时会乱码</li>
<li>iWorks 09: Keynote, Pages, Numbers</li>
</ul>
</li>
<li><strong>图片，多媒体处理，流程图绘制</strong>
<ul>
<li>iLife 2011：这个应该都内置了</li>
<li>OmniGaffle 画各种图（流程图，架构图，UML图）必须安装！</li>
<li>Pixelmator 或 Acorn：精简版的Photoshop</li>
<li>Skitch: 截屏软件 (Appstore freeware)</li>
<li>LittleSnapper: 截屏截网页软件 (freeware)</li>
<li>Xee: 看图软件，类似ACDsee(freeware)</li>
</ul>
</li>
<li><strong>文本编辑器</strong>
<ul>
<li>BBEdit</li>
<li>Coda</li>
<li>jEdit (freeware) </li>
</ul>
</li>
<li><strong>开发工具</strong>
<ul>
<li>Xcode 4.2 and iOS SDK for Lion 及其以上: 包含了gcc等编译工具，必须装</li>
<li>Versions: SVN客户端</li>
<li>Github for Mac: Git客户端 (freeware) </li>
<li>Eclipse (freeware)</li>
<li>IntelliJ IDEA: Java IDE</li>
<li>Charles: debug proxy</li>
<li>Navicat Premium: oracle/mysql GUI</li>
<li>Sequel Pro: mysql GUI (freeware)</li>
</ul>
</li>
<li><strong>其它工具</strong>
<ul>
<li>QuickSilver: 快捷键启动应用或执行命令</li>
<li>The Unarchiver: 解压缩软件 (AppStore freeware)</li>
<li>Reeder: Google Reader客户端</li>
<li>MPlayerX: 视频播放器 (AppStore freeware) </li>
<li>Evernote: 记笔记软件 (AppStore freeware) </li>
<li>Wunderlist: 个人安排软件 (AppStore freeware) </li>
<li>Quick Note: 个人安排软件 (AppStore freeware) </li>
<li>Caffeine: 暂时禁用屏幕保护，看电影时有用(AppStore freeware) </li>
<li>Sparrow Lite: Gmail 客户端(AppStore freeware) </li>
<li>Transmit: FTP/SFTP client</li>
<li>uTorrent: BT client (freeware)</li>
<li>Carbon Copy Cloner: 系统工具，快速全量备份大量文件</li>
<li>iChm: 看CHM格式文档</li>
<li>FanRadio: 豆瓣电台客户端，比官方的要好一些</li>
<li>VMware</li>
<li><a href="http://macww.org/">Aliwangwang</a></li>
</ul>
</li>
</ul>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e8%8b%b9%e6%9e%9c%e6%8a%80%e5%b7%a7/'>苹果技巧</a> Tagged: <a href='https://hugozhu.wordpress.com/tag/mac-software/'>mac software</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/467/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=467&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/09/04/yet-another-mac%e5%b8%b8%e7%94%a8%e8%bd%af%e4%bb%b6%e5%88%97%e8%a1%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world OpenWRT！</title>
		<link>https://hugozhu.wordpress.com/2011/07/25/helloworld-openwrt/</link>
		<comments>https://hugozhu.wordpress.com/2011/07/25/helloworld-openwrt/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 13:32:39 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[生活随笔]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=461</guid>
		<description><![CDATA[如果想在OpenWRT上运行自己的程序，就得准备一个开发环境，OpenWRT的开发环境是基于Linux的，所以得先安装一个Linux 安装VMWare； 下载Ubuntu Server最新版，有32位和64位，应该都可以，但我下载的是32位； 通过下载到的Ubuntu ISO文件在VMWare里安装； 准备必要的包： sudo apt-get update sudo apt-get install subversion git openssh-server gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev 获取OpenWRT源代码： svn checkout svn://svn.openwrt.org/openwrt/trunk cd trunk ./scripts/feeds update -a ./scripts/feeds install -a 配置编译选项 make menuconfig 最后一步，编译生成固件 make V=99 这一步会比较耗时，慢慢等 编译成功后，bin下会生成各种固件，这也说明你的环境已经准备好了， 写一个helloworld.c程序, 内容如下： [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=461&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ol>
如果想在OpenWRT上运行自己的程序，就得准备一个开发环境，OpenWRT的开发环境是基于Linux的，所以得先安装一个Linux</p>
<li>安装VMWare；</li>
<li>下载<a href="http://ubuntu.com/download/server/download">Ubuntu Server</a>最新版，有32位和64位，应该都可以，但我下载的是32位；</li>
<li>通过下载到的Ubuntu ISO文件在VMWare里安装；</li>
<li>准备必要的包：<br />
<code><br />
sudo apt-get update<br />
sudo apt-get install subversion git openssh-server gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev<br />
</code>
</li>
<li>获取OpenWRT源代码： svn checkout svn://svn.openwrt.org/openwrt/trunk</li>
<li>cd trunk</li>
<li>./scripts/feeds update -a</li>
<li>./scripts/feeds install -a</li>
<li>配置编译选项 make menuconfig</li>
<li>最后一步，编译生成固件 make V=99 这一步会比较耗时，慢慢等</li>
<li>编译成功后，bin下会生成各种固件，这也说明你的环境已经准备好了，</li>
<li>写一个helloworld.c程序, 内容如下：<br />
<code><br />
#include </p>
<p>int main(void)<br />
{<br />
    printf("Hello world!\n");<br />
    return 0;<br />
}<br />
</code>
</li>
<li>
staging_dir/toolchain-mips_r2_gcc-linaro_uClibc-0.9.32/bin/mips-openwrt-linux-uclibc-gcc -o helloworld helloworld.c
</li>
<li>把生成的helloworld程序上传到路由器上就可以跑起来了</li>
</ol>
<ol>
Targets for &#8216;make&#8217;</p>
<p>download<br />
    download all source tarballs (from the selected packages and it&#8217;s dependencies) at once before starting the build</p>
<p>prereq<br />
    checks if you have all prerequisites installed on the host-system for building the selected packages</p>
<p>world<br />
    build everything</p>
<p>tools/install toolchain/install<br />
    only build the tools and the toolchain</p>
<p>clean<br />
    cleans the packages (NOT the tools and toolchain)</p>
<p>distclean<br />
    cleans up everything expect $(TOPDIR)/.config and $(TOPDIR)/dl/</p>
<p>package/-{clean,compile}<br />
    rebuild a single package</p>
<p>package/index<br />
    updates $(TOPDIR)/bin/packages/Packages</p>
<p>V=99<br />
    turns on debugging</p>
<p>make kernel_menuconfig<br />
    If you want, you can also modify the kernel config for the selected target system. Simply run &#8220;make kernel_menuconfig&#8221;<br />
    and the build system will unpack the kernel sources (if necessary), run menuconfig inside of the kernel tree, and then<br />
    copy the kernel config to target/linux//config so that it is preserved over &#8220;make clean&#8221; call.  </p>
<p>Also look at the OpenWrt Kamikaze documentation at<br />
- http://nbd.name/openwrt.html#x1-250002.1 or<br />
- http://nbd.name/openwrt.pdf</p>
<p>Some more useful URLs:<br />
- Free VMware Player (enough for most users, no need for the VMware Server)<br />
- Download VMDK and VMX files for VMware Player<br />
- Ubuntu (for the Ubuntu ISO image)<br />
- Free VMware Server (also includes the VMware Tools)
</ol>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e7%94%9f%e6%b4%bb%e9%9a%8f%e7%ac%94/'>生活随笔</a> Tagged: <a href='https://hugozhu.wordpress.com/tag/openwrt/'>openwrt</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/461/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=461&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/07/25/helloworld-openwrt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenWRT设置Openvpn并自动智能翻墙</title>
		<link>https://hugozhu.wordpress.com/2011/07/17/opwrt%e8%ae%be%e7%bd%aeopenvpn%e5%b9%b6%e8%87%aa%e5%8a%a8%e7%bf%bb%e5%a2%99/</link>
		<comments>https://hugozhu.wordpress.com/2011/07/17/opwrt%e8%ae%be%e7%bd%aeopenvpn%e5%b9%b6%e8%87%aa%e5%8a%a8%e7%bf%bb%e5%a2%99/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 19:20:04 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[数码产品]]></category>
		<category><![CDATA[openwrt openvpn 翻墙]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=443</guid>
		<description><![CDATA[网络拓朴 1) 在NW300R上编辑openvpn client配置如下： cat /etc/config/openvpn config 'openvpn' 'client' option 'enable' '1' option 'client' '1' option 'dev' 'tun' option 'proto' 'udp' option 'keepalive' '10 120' option 'resolv_retry' 'infinite' option 'nobind' '1' option 'persist_key' '1' option 'persist_tun' '1' option 'comp_lzo' '1' option 'verb' '3' option 'tun_ipv6' '0' option 'remote' ' ' option 'ca' '/etc/openvpn/client.ca' option 'cert' [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=443&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div align="center"><img src="http://hugozhu.files.wordpress.com/2011/07/network1.png?w=489&#038;h=600" alt="Network" title="network.png" border="0" width="489" height="600" /><br />
<br />网络拓朴</div>
<p><strong>1) 在NW300R上编辑openvpn client配置如下：</strong><br />
cat /etc/config/openvpn</p>
<pre>
config 'openvpn' 'client'
	option 'enable' '1'
	option 'client' '1'
	option 'dev' 'tun'
	option 'proto' 'udp'
	option 'keepalive' '10 120'
	option 'resolv_retry' 'infinite'
	option 'nobind' '1'
	option 'persist_key' '1'
	option 'persist_tun' '1'
	option 'comp_lzo' '1'
	option 'verb' '3'
	option 'tun_ipv6' '0'
	option 'remote' ' '
	option 'ca' '/etc/openvpn/client.ca'
	option 'cert' '/etc/openvpn/client.cert'
	option 'key' '/etc/openvpn/client.key'
	option 'max-routes' '3000'
</pre>
<p>注意your_openvpn_port在服务器端最好设置成非缺省端口1194，因为这个端口在实际使用时由于GFW监控而不稳定。<br />
openvpn相关的CA证书/etc/openvpn/client.ca等需要通过scp传上去。</p>
<p><strong>2) /etc/init.d/openvpn start启动openvpn</strong></p>
<p><strong>3）可以输入route命令来校验（注意如下的路由表显示所有外网流量都将经过vpn服务器，这是因为在服务器端有设置<em>push &#8220;redirect-gateway def1&#8243;</em>）</strong></p>
<pre>
root@OpenWrt2:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  192.168.1.1     255.255.255.255 UGH   0      0        0 br-lan
10.8.0.5        *               255.255.255.255 UH    0      0        0 tun0
10.8.0.0        10.8.0.5        255.255.255.0   UG    0      0        0 tun0
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
default         10.8.0.5        128.0.0.0       UG    0      0        0 tun0
128.0.0.0       10.8.0.5        128.0.0.0       UG    0      0        0 tun0
default         192.168.1.1     0.0.0.0         UG    0      0        0 br-lan
</pre>
<p>或者通过ifconfig命令可以看到多了一个tun0接口<br />
这时可以通过ping 10.8.0.1来确认openvpn已通</p>
<p><strong>4) 修改NW300R的DNS服务器设置，确保DNS解析不被污染；否则DNS解析会走192.168.1.1而未经VPN保护</strong><br />
root@OpenWrt2:~# cat /etc/resolv.conf </p>
<pre>
search lan
nameserver 127.0.0.1
</pre>
<p>root@OpenWrt2:~# cat /etc/config/dhcp</p>
<pre>
config 'dnsmasq'
	option 'domainneeded' '1'
	option 'boguspriv' '1'
	option 'localise_queries' '1'
	option 'rebind_protection' '1'
	option 'rebind_localhost' '1'
	option 'local' '/lan/'
	option 'domain' 'lan'
	option 'expandhosts' '1'
	option 'readethers' '1'
	option 'leasefile' '/tmp/dhcp.leases'
	option 'resolvfile' '/etc/openvpn/resolv.conf'

config 'dhcp' 'lan'
	option 'interface' 'lan'
	option 'ignore' '1'

config 'dhcp' 'wan'
	option 'interface' 'wan'
	option 'ignore' '1'
</pre>
<p>root@OpenWrt2:~# cat /etc/openvpn/resolv.conf</p>
<pre>
nameserver 8.8.8.8
nameserver 8.8.4.4
</pre>
<p><strong>5) 设置智能路由</strong><br />
这里用到了<a href="http://code.google.com/p/chnroutes/">chnroutes</a>项目，点击下载<a href="http://code.google.com/p/chnroutes/downloads/detail?name=chnroutes_openvpn_v2.1&amp;can=2&amp;q=">openvpn</a>版本，并找一台有python的机器执行生成最新的路由规则脚本然后上传到路由器。<br />
该脚本会生成两个命令：vpnup, vpndown分别是启动和关闭openvpn时需要修改的路由规则（原理是把所有中国IP路由到192.168.1.1)。<br />
执行vpnup命令后再用route命令列出路由表会发现多了2000多路由规则。。。<br />
这时分别找一个中国和一个外国的IP来traceroute</p>
<pre>
root@OpenWrt2:~# traceroute tao123.com
traceroute to tao123.com (121.14.24.241), 30 hops max, 38 byte packets
 1  192.168.1.1 (192.168.1.1)  1.496 ms  1.322 ms  1.440 ms
 2  61.130.120.156 (61.130.120.156)  2.910 ms  2.218 ms  3.183 ms
 3  220.191.156.181 (220.191.156.181)  2.214 ms  2.136 ms  13.653 ms
 4  61.164.19.205 (61.164.19.205)  5.299 ms  2.298 ms  2.576 ms
 5  61.164.17.61 (61.164.17.61)  8.297 ms  7.966 ms  8.335 ms
 6  202.97.56.241 (202.97.56.241)  24.566 ms^C

root@OpenWrt2:~# traceroute facebook.com
traceroute to facebook.com (69.63.189.11), 30 hops max, 38 byte packets
 1  10.8.0.1 (10.8.0.1)  231.700 ms  210.645 ms  224.737 ms
 2  184.105.143.85 (184.105.143.85)  239.952 ms  259.713 ms  266.340 ms
 3  10gigabitethernet2-3.core1.fmt1.he.net (64.62.250.5)  273.158 ms  285.133 ms  285.376 ms
 4  10gigabitethernet1-1.core1.pao1.he.net (66.160.158.242)  284.708 ms  277.205 ms  277.986 ms
 5  paix.pr02.pao1.tfbnw.net (198.32.176.108)  275.467 ms  321.888 ms^C
</pre>
<p>可以注意到第一行走的路由正确了！</p>
<p><strong>6) 设置iptable</strong><br />
iptables -I FORWARD -o br-lan -j ACCEPT #允许br-lan端口流量被转发<br />
iptables -I FORWARD -o tun0 -j ACCEPT  #允许tun0端口流量被转发<br />
iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE #tun0出口的流量SNAT出去</p>
<p><strong>7) 设置客户端</strong><br />
因为NW300R关掉了DHCP（如果开启NW300R就需要设一个不同的子网如：192.168.2.1，这样还需要特殊设置来使得两个子网的机器可以互相访问），所以使用DHCP连上的客户端的gateway和dns都是192.168.1.1，这样是不能自动翻墙的，需要要手工配一下需要自动翻墙的网络设备的gateway和dns都为192.168.1.2，当然如果你只有一个无线路由器，就没这个问题了。这个部分我还没找到有多个无线路由器时比较好的解决办法，还请高手指教一下。</p>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e6%95%b0%e7%a0%81%e4%ba%a7%e5%93%81/'>数码产品</a> Tagged: <a href='https://hugozhu.wordpress.com/tag/openwrt-openvpn-%e7%bf%bb%e5%a2%99/'>openwrt openvpn 翻墙</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/443/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=443&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/07/17/opwrt%e8%ae%be%e7%bd%aeopenvpn%e5%b9%b6%e8%87%aa%e5%8a%a8%e7%bf%bb%e5%a2%99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>

		<media:content url="http://hugozhu.files.wordpress.com/2011/07/network1.png" medium="image">
			<media:title type="html">network.png</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenVPN服务器的配置</title>
		<link>https://hugozhu.wordpress.com/2011/07/15/openvpn%e7%9a%84%e9%85%8d%e7%bd%ae/</link>
		<comments>https://hugozhu.wordpress.com/2011/07/15/openvpn%e7%9a%84%e9%85%8d%e7%bd%ae/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 07:12:17 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[生活随笔]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=440</guid>
		<description><![CDATA[服务器端的iptable设置 iptables -F iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE iptables -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination 8.8.8.8 iptables -A INPUT -p udp --dport 1194 -j ACCEPT iptables -A INPUT -s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=440&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>服务器端的iptable设置</p>
<pre>
iptables -F
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE

iptables -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT
iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination 8.8.8.8

iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -A INPUT -s 10.8.0.0/24 -p all -j ACCEPT
iptables -A FORWARD -d 10.8.0.0/24 -j ACCEPT

iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source
</pre>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e7%94%9f%e6%b4%bb%e9%9a%8f%e7%ac%94/'>生活随笔</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/440/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=440&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/07/15/openvpn%e7%9a%84%e9%85%8d%e7%bd%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenWRT设置WDS</title>
		<link>https://hugozhu.wordpress.com/2011/07/13/openwrt%e8%ae%be%e7%bd%aewds/</link>
		<comments>https://hugozhu.wordpress.com/2011/07/13/openwrt%e8%ae%be%e7%bd%aewds/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 14:28:45 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[生活随笔]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[wds]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=438</guid>
		<description><![CDATA[如果你家里需要多个无线路由器，并需要组成一个局域网，使得所有连上的电脑（有线或无线）都能互相访问，WDS就是最简单的一种配置方法，无线组网还有Client + AP（需要设置两个网络），或Bridaged Client（仅适用与Broadcom芯片）等方法，这里只讨论WDS。 WDS原理图 使用WDS组网最好采用相同无线芯片的路由器，原因是各个厂商对WDS的实现不完全相同。 OpenWRT是一个强大的基于Linux的开源路由器操作系统。关于无线的配置文件在/etc/config/wireless。 假设你有两个路由器分别为A和B，其中A通过ADSL拨号上网，B则通过无线连接A。 假设A的mac地址是aa:aa:aa:aa:aa:aa，B的mac地址是：bb:bb:bb:bb:bb:bb 首先配置A的LAN IP为192.168.1.1/24，并开启DHCP服务；B的LAN IP为192.168.1.2/24，Gateway,DNS都设成192.168.1.1，并一定关闭DHCP服务。 A的/etc/config/wireless设置 config 'wifi-device' 'radio0' option 'type' 'mac80211' option 'macaddr' 'aa:aa:aa:aa:aa:aa' option 'hwmode' '11ng' list 'ht_capab' 'SHORT-GI-20' list 'ht_capab' 'SHORT-GI-40' list 'ht_capab' 'TX-STBC' list 'ht_capab' 'RX-STBC1' list 'ht_capab' 'DSSS_CCK-40' option 'channel' '3' option 'txpower' '20' option 'country' 'US' option 'htmode' 'HT20' option 'disabled' '0' [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=438&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>如果你家里需要多个无线路由器，并需要组成一个局域网，使得所有连上的电脑（有线或无线）都能互相访问，WDS就是最简单的一种配置方法，无线组网还有Client + AP（需要设置两个网络），或Bridaged Client（仅适用与Broadcom芯片）等方法，这里只讨论WDS。</p>
<p><a><img src="http://wiki.openwrt.org/_media/doc/howto/802.11-no-bridge-wds.png" width="600" /></a> <br />
WDS原理图</p>
<p>使用WDS组网最好采用相同无线芯片的路由器，原因是各个厂商对WDS的实现不完全相同。</p>
<p>OpenWRT是一个强大的基于Linux的开源路由器操作系统。关于无线的配置文件在/etc/config/wireless。</p>
<p>假设你有两个路由器分别为A和B，其中A通过ADSL拨号上网，B则通过无线连接A。<br />
假设A的mac地址是aa:aa:aa:aa:aa:aa，B的mac地址是：bb:bb:bb:bb:bb:bb</p>
<p>首先配置A的LAN IP为192.168.1.1/24，并开启DHCP服务；B的LAN IP为192.168.1.2/24，Gateway,DNS都设成192.168.1.1，并一定关闭DHCP服务。</p>
<hr />
A的/etc/config/wireless设置</p>
<pre>
config 'wifi-device' 'radio0'
	option 'type' 'mac80211'
	option 'macaddr' 'aa:aa:aa:aa:aa:aa'
	option 'hwmode' '11ng'
	list 'ht_capab' 'SHORT-GI-20'
	list 'ht_capab' 'SHORT-GI-40'
	list 'ht_capab' 'TX-STBC'
	list 'ht_capab' 'RX-STBC1'
	list 'ht_capab' 'DSSS_CCK-40'
	option 'channel' '3'
	option 'txpower' '20'
	option 'country' 'US'
	option 'htmode' 'HT20'
	option 'disabled' '0'
	option 'noscan' '1'

config 'wifi-iface'
	option 'device' 'radio0'
	option 'mode' 'ap'
	option 'ssid' 'hugo'
	option 'wds' '1'
	option 'network' 'lan'
	option 'encryption' 'psk2'
	option 'key' 'password'
</pre>
<hr />
B的/etc/config/wireless设置</p>
<pre>
config 'wifi-device' 'radio0'
	option 'type' 'mac80211'
	option 'macaddr' 'bb:bb:bb:bb:bb:bb'
	option 'hwmode' '11ng'
	list 'ht_capab' 'SHORT-GI-20'
	list 'ht_capab' 'SHORT-GI-40'
	list 'ht_capab' 'TX-STBC'
	list 'ht_capab' 'RX-STBC1'
	list 'ht_capab' 'DSSS_CCK-40'
	option 'channel' '3'
	option 'country' 'US'
	option 'txpower' '20'
	option 'htmode' 'HT20'
	option 'noscan' '1'
	option 'disabled' '0'

config 'wifi-iface'
	option 'device' 'radio0'
	option 'ssid' 'hugo'
	option 'mode' 'sta'
	option 'wds' '1'
	option 'network' 'lan'
	option 'essid' 'aa:aa:aa:aa:aa:aa'
	option 'encryption' 'psk2'
	option 'key' 'password'

config 'wifi-iface'
	option 'device' 'radio0'
	option 'mode' 'ap'
	option 'ssid' 'hugo2'
	option 'network' 'lan'
	option 'encryption' 'psk2'
	option 'key' 'password'
</pre>
<p>修改配置文件后可以执行wifi命令使之生效，这样就基本可以了。</p>
<p>配置好后可以通过A的openWRT的web界面登录进去看已经连上的无线终端中是否有B的mac地址，如果不成功，请注意无线的加密方式，我采用WPA2中继成功，但采用WEP就不行。</p>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e7%94%9f%e6%b4%bb%e9%9a%8f%e7%ac%94/'>生活随笔</a> Tagged: <a href='https://hugozhu.wordpress.com/tag/openwrt/'>openwrt</a>, <a href='https://hugozhu.wordpress.com/tag/wds/'>wds</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=438&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/07/13/openwrt%e8%ae%be%e7%bd%aewds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>

		<media:content url="http://wiki.openwrt.org/_media/doc/howto/802.11-no-bridge-wds.png" medium="image" />
	</item>
		<item>
		<title>mDNSResponder和syslog两个进程跑满CPU</title>
		<link>https://hugozhu.wordpress.com/2011/04/28/mdnsresponder%e5%92%8csyslog%e4%b8%a4%e4%b8%aa%e8%bf%9b%e7%a8%8b%e8%b7%91%e6%bb%a1cpu/</link>
		<comments>https://hugozhu.wordpress.com/2011/04/28/mdnsresponder%e5%92%8csyslog%e4%b8%a4%e4%b8%aa%e8%bf%9b%e7%a8%8b%e8%b7%91%e6%bb%a1cpu/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 01:41:57 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[苹果技巧]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=436</guid>
		<description><![CDATA[mDNSResponder进程属于Mac的Bonjour服务，出现这种情况一般是切换网络或休眠后唤醒： 可以用下面命令重新启动Bonjour： launchctl unload /path/to/relocated/com.apple.mDNSResponder.plist launchctl load /path/to/relocated/com.apple.mDNSResponder.plist Filed under: 苹果技巧<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=436&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>mDNSResponder进程属于Mac的Bonjour服务，出现这种情况一般是切换网络或休眠后唤醒：<br />
可以用下面命令重新启动Bonjour：</p>
<pre>
launchctl unload /path/to/relocated/com.apple.mDNSResponder.plist
launchctl load /path/to/relocated/com.apple.mDNSResponder.plist
</pre>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e8%8b%b9%e6%9e%9c%e6%8a%80%e5%b7%a7/'>苹果技巧</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/436/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=436&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/04/28/mdnsresponder%e5%92%8csyslog%e4%b8%a4%e4%b8%aa%e8%bf%9b%e7%a8%8b%e8%b7%91%e6%bb%a1cpu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>Xcode 4不购买证书发布iPhone App到真实设备</title>
		<link>https://hugozhu.wordpress.com/2011/04/20/xcode-4%e4%b8%8d%e8%b4%ad%e4%b9%b0%e8%af%81%e4%b9%a6%e5%8f%91%e5%b8%83iphone-app%e5%88%b0%e7%9c%9f%e5%ae%9e%e8%ae%be%e5%a4%87/</link>
		<comments>https://hugozhu.wordpress.com/2011/04/20/xcode-4%e4%b8%8d%e8%b4%ad%e4%b9%b0%e8%af%81%e4%b9%a6%e5%8f%91%e5%b8%83iphone-app%e5%88%b0%e7%9c%9f%e5%ae%9e%e8%ae%be%e5%a4%87/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 04:19:53 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[苹果技巧]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=434</guid>
		<description><![CDATA[1) 通过Keychain Access工具创建一个“iPhone Developer”自签名的证书； 2）sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' /Developer/Platforms/iPhoneOS.platform/Info.plist Filed under: 苹果技巧 Tagged: xcode<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=434&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>
1) 通过Keychain Access工具创建一个“iPhone Developer”自签名的证书；
2）sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' /Developer/Platforms/iPhoneOS.platform/Info.plist
</pre>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e8%8b%b9%e6%9e%9c%e6%8a%80%e5%b7%a7/'>苹果技巧</a> Tagged: <a href='https://hugozhu.wordpress.com/tag/xcode/'>xcode</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/434/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=434&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/04/20/xcode-4%e4%b8%8d%e8%b4%ad%e4%b9%b0%e8%af%81%e4%b9%a6%e5%8f%91%e5%b8%83iphone-app%e5%88%b0%e7%9c%9f%e5%ae%9e%e8%ae%be%e5%a4%87/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
		<item>
		<title>64位Linux跑32位JDK可以用多大的堆？</title>
		<link>https://hugozhu.wordpress.com/2011/03/24/64%e4%bd%8dlinux%e8%b7%9132%e4%bd%8djdk%e5%8f%af%e4%bb%a5%e7%94%a8%e5%a4%9a%e5%a4%a7%e7%9a%84%e5%a0%86%ef%bc%9f/</link>
		<comments>https://hugozhu.wordpress.com/2011/03/24/64%e4%bd%8dlinux%e8%b7%9132%e4%bd%8djdk%e5%8f%af%e4%bb%a5%e7%94%a8%e5%a4%9a%e5%a4%a7%e7%9a%84%e5%a0%86%ef%bc%9f/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 09:11:14 +0000</pubDate>
		<dc:creator>hugozhu</dc:creator>
				<category><![CDATA[生活随笔]]></category>

		<guid isPermaLink="false">https://hugozhu.wordpress.com/?p=432</guid>
		<description><![CDATA[The maximum theoretical heap limit for the 32-bit JVM is 4G. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. On most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=432&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The maximum theoretical heap limit for the 32-bit JVM is 4G. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. On most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit Solaris kernels the address space is limited to 2G. On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems.</p>
<p>As of Java SE 6, the Windows /3GB boot.ini feature is not supported.</p>
<p>If your application requires a very large heap you should use a 64-bit VM on a version of the operating system that supports 64-bit applications. See Java SE Supported System Configurations for details.</p>
<br />Filed under: <a href='https://hugozhu.wordpress.com/category/%e7%94%9f%e6%b4%bb%e9%9a%8f%e7%ac%94/'>生活随笔</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hugozhu.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hugozhu.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hugozhu.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hugozhu.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hugozhu.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hugozhu.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hugozhu.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hugozhu.wordpress.com/432/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hugozhu.wordpress.com&amp;blog=6063337&amp;post=432&amp;subd=hugozhu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://hugozhu.wordpress.com/2011/03/24/64%e4%bd%8dlinux%e8%b7%9132%e4%bd%8djdk%e5%8f%af%e4%bb%a5%e7%94%a8%e5%a4%9a%e5%a4%a7%e7%9a%84%e5%a0%86%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/7617bc17dcd536c501360d62bce4db25?s=96&#38;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">hugozhu</media:title>
		</media:content>
	</item>
	</channel>
</rss>
