<?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/"
	>

<channel>
	<title>Niclau Liu&#039;s Blog</title>
	<atom:link href="https://www.niclau.net/blog/feed" rel="self" type="application/rss+xml" />
	<link>https://www.niclau.net/blog</link>
	<description>Google、Firefox、游戏、动漫</description>
	<lastBuildDate>Thu, 05 Mar 2026 06:09:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>在VPS架设6IN4 Tunnel服务器</title>
		<link>https://www.niclau.net/blog/setup-6in4-tunnel-server-on-vps.html</link>
					<comments>https://www.niclau.net/blog/setup-6in4-tunnel-server-on-vps.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Fri, 06 Mar 2026 05:49:02 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[6in4]]></category>
		<category><![CDATA[VPS]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1705</guid>

					<description><![CDATA[<p>一直想把HE tunnel的固定ipv6地址拿到家中的局域网使用，但中国直连HE节点网络质量不佳，所以尝试通过VPS与HE建立6in4 tunnel，然后把routed prefix（路由前缀）分发到家中网络，于是有了以下文章。 前提条件： 1、一台VPS已与HE建立6in4 tunnel 2、已从HE取得/48 routed prefix 3、宽带有一个公网IPv4地址 4、一个支持sit tunnel的路由器，我此处使用飞塔 因为sit tunnel两端是对等的，所以配置上基本相同本例中VPS已与HE建立ipv6 tunnel，并从HE取得了routed /48的路由前缀。现把/48中的其中一个/56分配到本地局域网 VPS配置sit tunnel 确保以上填写正确，sudo netplan try 或 sudo netplan apply此时VPS路由表如下 本地飞塔防火墙配置sit tunnel与VPS建立连接 飞塔防火墙配置LAN接口的路由前缀与SLAAC 对于飞塔，接下来还需要配置进、出站规则，在此不作详述。 马上从虚拟机上测试网是否通</p>
<p>The post <a href="https://www.niclau.net/blog/setup-6in4-tunnel-server-on-vps.html">在VPS架设6IN4 Tunnel服务器</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>一直想把HE tunnel的固定ipv6地址拿到家中的局域网使用，但中国直连HE节点网络质量不佳，所以尝试通过VPS与HE建立6in4 tunnel，然后把routed prefix（路由前缀）分发到家中网络，于是有了以下文章。</p>



<p><strong>前提条件：</strong>
<br>1、一台VPS已与HE建立6in4 tunnel
<br>2、已从HE取得/48 routed prefix
<br>3、宽带有一个公网IPv4地址
<br>4、一个支持sit tunnel的路由器，我此处使用飞塔</p>



<p>因为sit tunnel两端是对等的，所以配置上基本相同<br>本例中VPS已与HE建立ipv6 tunnel，并从HE取得了routed /48的路由前缀。现把/48中的其中一个/56分配到本地局域网</p>



<p><strong>VPS配置sit tunnel</strong></p>



<p><pre class="brush: bash; title: ; notranslate">~$ sudo cat /etc/netplan/99-to-ugf-ipv6.yaml 
network:
  version: 2
  tunnels:
    to-ugf-ipv6:
      mode: sit
      remote: 1.2.3.4     //此处填写宽带IPv4
      local: 10.0.10.209  //VPS网卡上显示的IPv4
      addresses:
        - &quot;2001:470:a79:b::1/64&quot;;     //从routed /48中分一个/64作为VPS与家中路由器sit tunnel的互联IP段
      routes:
        - to: 2001:470:a79:b00::/56    //从routed /48中分一个/56作为家中局域网设备分配的IP段
</pre></p> 



<p>确保以上填写正确，sudo netplan try 或 sudo netplan apply<br><strong>此时VPS路由表如下</strong></p>
<pre class="brush: bash; title: ; notranslate">
~$ ip -6 r
2001:470:220:190::/64 dev he-ipv6 proto kernel metric 256 pref medium
2001:470:a79:b::/64 dev to-ugf-ipv6 proto kernel metric 256 pref medium
2001:470:a79:d::/64 dev br-80b2c5c798a6 proto kernel metric 256 pref medium
2001:470:a79:b00::/56 dev to-ugf-ipv6 proto static metric 1024 pref medium
fe80::/64 dev enp0s6 proto kernel metric 256 pref medium
fe80::/64 dev docker0 proto kernel metric 256 linkdown pref medium
fe80::/64 dev vethf0072eb proto kernel metric 256 pref medium
fe80::/64 dev br-80b2c5c798a6 proto kernel metric 256 pref medium
default via 2001:470:220:190::1 dev he-ipv6 proto static metric 99 pref medium
</pre>



<p><strong>本地飞塔防火墙配置sit tunnel与VPS建立连接</strong></p>



<pre class="brush: bash; title: ; notranslate">config system sit-tunnel
    edit &quot;to-vps-ipv6&quot;;
        set source 1.2.3.4           //宽带IPv4
        set destination 8.8.8.8      //VPS IPv4
        set ip6 2001:470:a79:b::2/64 //与VPS sit tunnel的IP同一个网段
        set interface &quot;cmcc&quot;;
    next
end</pre>



<p><strong>飞塔防火墙配置LAN接口的路由前缀与SLAAC</strong></p>



<pre class="brush: bash; title: ; notranslate">
config system interface
    edit &quot;lag3.104&quot;;
        set vdom &quot;MGMT&quot;;
        set device-identification enable
        set role lan
        set snmp-index 42
        set ip-managed-by-fortiipam disable
        config ipv6
            set ip6-address 2001:470:a79:bbb::1/64     //从2001:470:a79:b00::/56中随意选中一段/64作为此接口的IP
            set ip6-allowaccess ping ssh
            set ip6-send-adv enable
            config ip6-prefix-list
                edit 2001:470:a79:bbb::/64             //分配给局域网设备
                next
            end
        end
        set interface &quot;lag3&quot;;
        set vlanid 104             //这是我虚拟机的VLAN
    next
end
</pre>

<p>对于飞塔，接下来还需要配置进、出站规则，在此不作详述。
马上从虚拟机上测试网是否通</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\niclau&gt;ping -6 www.cloudflare.com

Pinging www.cloudflare.com &#x5B;2606:4700::6810:7c60] with 32 bytes of data:
Reply from 2606:4700::6810:7c60: time=74ms
Reply from 2606:4700::6810:7c60: time=67ms
Reply from 2606:4700::6810:7c60: time=66ms
Reply from 2606:4700::6810:7c60: time=68ms

Ping statistics for 2606:4700::6810:7c60:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 66ms, Maximum = 74ms, Average = 68ms

C:\Users\niclau&gt;curl -6 ip.sb
2001:470:a79:bbb:21a:5dbf:de09:f915
</pre><p>The post <a href="https://www.niclau.net/blog/setup-6in4-tunnel-server-on-vps.html">在VPS架设6IN4 Tunnel服务器</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/setup-6in4-tunnel-server-on-vps.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在OpenWRT上运行Podman</title>
		<link>https://www.niclau.net/blog/openwrt-as-podman-host.html</link>
					<comments>https://www.niclau.net/blog/openwrt-as-podman-host.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Tue, 14 Jan 2025 06:13:24 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[OpenWrt]]></category>
		<category><![CDATA[Podman]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1621</guid>

					<description><![CDATA[<p>折腾Podman的原因是：Dockerd与Tproxy运行在同一台机器上有冲突，导致Tproxy透明代理失效。此文章用于记录此配置过程。 设备信息： root@r5c:~# ubus call system board { &#34;kernel&#34;: &#34;6.6.69&#34;, &#34;hostname&#34;: &#34;r5c&#34;, &#34;system&#34;: &#34;ARMv8 Processor rev 0&#34;, &#34;model&#34;: &#34;FriendlyElec NanoPi R5C&#34;, &#34;board_name&#34;: &#34;friendlyarm,nanopi-r5c&#34;, &#34;rootfs_type&#34;: &#34;ext4&#34;, &#34;release&#34;: { &#34;distribution&#34;: &#34;OpenWrt&#34;, &#34;version&#34;: &#34;24.10.0-rc5&#34;, &#34;revision&#34;: &#34;r28304-6dacba30a7&#34;, &#34;target&#34;: &#34;rockchip/armv8&#34;, &#34;description&#34;: &#34;OpenWrt 24.10.0-rc5 r28304-6dacba30a7&#34;, &#34;builddate&#34;: &#34;1736026537&#34; } } &#160; 安装Podman opkg install conmon crun catatonit netavark podman external-protocol kmod-macvlan 请注意安装kmod-macvlan这个包，这是用于给容器创建单独的vlan网络。 &#8230; <a href="https://www.niclau.net/blog/openwrt-as-podman-host.html" class="more-link">Continue reading <span class="screen-reader-text">在OpenWRT上运行Podman</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.niclau.net/blog/openwrt-as-podman-host.html">在OpenWRT上运行Podman</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>折腾<a href="https://podman.io/get-started">Podman</a>的原因是：Dockerd与Tproxy运行在同一台机器上有<a href="https://stackoverflow.com/questions/57710177/tproxy-compatibility-with-docker/57726114#57726114">冲突</a>，导致Tproxy透明代理失效。此文章用于记录此配置过程。</p>
<p>设备信息：</p>
<pre class="brush: bash; title: ; notranslate">root@r5c:~# ubus call system board
{
        &quot;kernel&quot;: &quot;6.6.69&quot;,
        &quot;hostname&quot;: &quot;r5c&quot;,
        &quot;system&quot;: &quot;ARMv8 Processor rev 0&quot;,
        &quot;model&quot;: &quot;FriendlyElec NanoPi R5C&quot;,
        &quot;board_name&quot;: &quot;friendlyarm,nanopi-r5c&quot;,
        &quot;rootfs_type&quot;: &quot;ext4&quot;,
        &quot;release&quot;: {
                &quot;distribution&quot;: &quot;OpenWrt&quot;,
                &quot;version&quot;: &quot;24.10.0-rc5&quot;,
                &quot;revision&quot;: &quot;r28304-6dacba30a7&quot;,
                &quot;target&quot;: &quot;rockchip/armv8&quot;,
                &quot;description&quot;: &quot;OpenWrt 24.10.0-rc5 r28304-6dacba30a7&quot;,
                &quot;builddate&quot;: &quot;1736026537&quot;
        }
}</pre>
<p><span id="more-1621"></span></p>
<p>&nbsp;</p>
<p><strong>安装Podman</strong></p>
<pre class="brush: bash; title: ; notranslate">opkg install conmon crun catatonit netavark podman external-protocol kmod-macvlan</pre>
<p>请注意安装kmod-macvlan这个包，这是用于给容器创建单独的vlan网络。</p>
<p>&nbsp;</p>
<p><strong>配置OpenWRT macvlan网络</strong></p>
<p><code class="cx rk rl rm qy b">/etc/config/network</code>相关配置如下：</p>
<pre class="brush: bash; title: ; notranslate">config interface 'docker102'
option proto 'static'
option device 'br-lan.102'
option ipaddr '10.0.102.1'
option netmask '255.255.255.0'
option ip6assign '60'
list ip6class 'local'
option ip6hint 'd0c0'

config device
option type 'macvlan'
option ifname 'br-lan'
option mode 'bridge'
option name 'br-lan.102'
option acceptlocal '1'
option macaddr 'EA:02:06:1F:36:C3'</pre>
<p>从 LUCI -&gt; 网络 -&gt; 接口 看到如下：</p>
<p><a href="https://filecdn.niclau.net/image/blog/2025/01/interface.png"><img fetchpriority="high" decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2025/01/interface.png" alt="" width="963" height="228" /></a></p>
<p>从 LUCI -&gt; 网络 -&gt; 设备 看到如下：<br />
<a href="https://filecdn.niclau.net/image/blog/2025/01/device.png"><img decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2025/01/device.png" alt="" width="966" height="269" /></a><a href="https://filecdn.niclau.net/image/blog/2025/01/device-info-1.png"><img decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2025/01/device-info-1.png" alt="" width="900" height="636" /></a><a href="https://filecdn.niclau.net/image/blog/2025/01/device-info-2.png"><img loading="lazy" decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2025/01/device-info-2.png" alt="" width="900" height="710" /></a></p>
<p><code class="cx rk rl rm qy b">/etc/config/firewall</code>相关配置如下：</p>
<pre class="brush: bash; title: ; notranslate">config zone
option name 'docker102'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'docker102'

config forwarding
option src 'docker102'
option dest 'wan'

config forwarding
option src 'lan'
option dest 'docker102'</pre>
<p><a href="https://filecdn.niclau.net/image/blog/2025/01/device-firewall-1.png"><img loading="lazy" decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2025/01/device-firewall-1.png" alt="" width="900" height="225" /></a><a href="https://filecdn.niclau.net/image/blog/2025/01/device-firewall-2.png"><img loading="lazy" decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2025/01/device-firewall-2.png" alt="" width="900" height="697" /></a></p>
<p>&nbsp;</p>
<p><strong>配置Podman网络</strong></p>
<p>创建一个名为docker102的macvlan网络，接口为刚在OpenWRT创建的br-lan.102。</p>
<pre class="brush: bash; title: ; notranslate">podman network create -d macvlan -o parent=br-lan.102 --ipv6 --gateway fde7:751f:4185:d0c0::1 --subnet fde7:751f:4185:d0c0::/60 --gateway 10.0.102.1 --subnet 10.0.102.0/24 docker102</pre>
<p>查看/etc/containers/networks/docker102.json：</p>
<pre class="brush: bash; title: ; notranslate">root@r5c:~# cat /etc/containers/networks/docker102.json
{
&quot;name&quot;: &quot;docker102&quot;,
&quot;id&quot;: &quot;5dea5c95c00e177887b4fead3a35eb2a3b9174d91b7382c0b2b3885a373edb81&quot;,
&quot;driver&quot;: &quot;macvlan&quot;,
&quot;network_interface&quot;: &quot;br-lan.102&quot;,
&quot;created&quot;: &quot;2025-01-13T16:02:12.070370904Z&quot;,
&quot;subnets&quot;: &#x5B;
{
&quot;subnet&quot;: &quot;10.0.102.0/24&quot;,
&quot;gateway&quot;: &quot;10.0.102.1&quot;
},
{
&quot;subnet&quot;: &quot;fde7:751f:4185:d0c0::/60&quot;,
&quot;gateway&quot;: &quot;fde7:751f:4185:d0c0::1&quot;
}
],
&quot;ipv6_enabled&quot;: true,
&quot;internal&quot;: false,
&quot;dns_enabled&quot;: false,
&quot;ipam_options&quot;: {
&quot;driver&quot;: &quot;host-local&quot;
}
}</pre>
<p>&nbsp;</p>
<p><strong>配置Podman</strong></p>
<p>编辑/etc/containers/containers.conf：</p>
<pre class="brush: bash; title: ; notranslate">
#只需更改两项
&#x5B;network]
firewall_driver = &quot;none&quot; #禁止podman修改openwrt防火墙配置
default_network = &quot;docker102&quot; #设置默认网络为我们创建的docker102
</pre>
<p>编辑/etc/containers/storage.conf：</p>
<pre class="brush: bash; title: ; notranslate">
&#x5B;storage]
graphroot = &quot;/opt/lib/containers/storage&quot; #默认在/var/lib，设备重启将丢失已安装的容器
</pre>
<p>&nbsp;</p>
<p><strong>启动Podman容器</strong></p>
<pre class="brush: bash; title: ; notranslate">
root@r5c:~# podman run --rm -it jonlabelle/network-tools
✔ docker.io/jonlabelle/network-tools:latest
Trying to pull docker.io/jonlabelle/network-tools:latest...
Getting image source signatures
Copying blob db5c77ca555f done   | 
Copying blob 52f827f72350 done   | 
Copying config 1cb1759421 done   | 
Writing manifest to image destination

&#x5B;network-tools]$ ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto kernel_lo 
       valid_lft forever preferred_lft forever
2: eth0@if4: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 22:a8:cc:7a:a4:b2 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.0.102.6/24 brd 10.0.102.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fde7:751f:4185:d0c0::7/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::20a8:ccff:fe7a:a4b2/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever

&#x5B;network-tools]$ ping -c 3 www.he.net
PING he.net (216.218.236.2) 56(84) bytes of data.
64 bytes from he.net (216.218.236.2): icmp_seq=1 ttl=52 time=267 ms
64 bytes from he.net (216.218.236.2): icmp_seq=2 ttl=52 time=266 ms
64 bytes from he.net (216.218.236.2): icmp_seq=3 ttl=52 time=267 ms

--- he.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 266.450/266.687/267.003/0.232 ms

&#x5B;network-tools]$ ping -c 3 -6 www.he.net
PING www.he.net (2001:470:0:503::2) 56 data bytes
64 bytes from he.net (2001:470:0:503::2): icmp_seq=1 ttl=52 time=169 ms
64 bytes from he.net (2001:470:0:503::2): icmp_seq=2 ttl=52 time=169 ms
64 bytes from he.net (2001:470:0:503::2): icmp_seq=3 ttl=52 time=169 ms

--- www.he.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 168.975/169.066/169.139/0.068 ms
</pre>
<p>&nbsp;</p>
<p>相关参考文章：<br />
<a href="https://openwrt.org/docs/guide-user/virtualization/docker_host#podman">OpenWrt as Docker container host</a><br />
<a href="https://paul-mackinnon.medium.com/openwrt-raspberry-pi-docker-vlan-project-9cb1db10684c">OpenWRT Raspberry Pi Docker &#038; VLAN Project</a><br />
<a href="https://developers.redhat.com/articles/2022/08/10/how-conifgure-podman-40-ipv6#">How to configure Podman 4.0 for IPv6</a><br />
<a href="https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md">Basic Networking Guide for Podman</a><br />
<a href="https://gist.github.com/nerdalert/3d2b891d41e0fa8d688c">Experimental Docker Libnetwork DHCP Driver</a><br />
<a href="https://github.com/containers/common/blob/main/pkg/config/containers.conf">https://github.com/containers/common/blob/main/pkg/config/containers.conf</a><br />
<a href="https://github.com/containers/podman/issues/21194">https://github.com/containers/podman/issues/21194</a></p><p>The post <a href="https://www.niclau.net/blog/openwrt-as-podman-host.html">在OpenWRT上运行Podman</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/openwrt-as-podman-host.html/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>990元包年的移动互联网专线</title>
		<link>https://www.niclau.net/blog/cmcc-dia.html</link>
					<comments>https://www.niclau.net/blog/cmcc-dia.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sun, 21 Jul 2024 01:57:35 +0000</pubDate>
				<category><![CDATA[其它]]></category>
		<category><![CDATA[互联网专线]]></category>
		<category><![CDATA[移动到企]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1590</guid>

					<description><![CDATA[<p>早前，为了迎合国内消费降级的潮流，我把使用多年的电信千兆融合宽带（2040/元年）更换为移动到企990包年的套餐，这个套餐包含了下行500M/上行25M的商务宽带，和下行100M/上行10M的互联网专线。但其实上只是一个GPON的光猫上通过VLAN分了两路宽带，默认光猫的LAN1是互联网专线，LAN2是商务宽带。 移动的详细海报介绍如下： 商务宽带应该只是给家宽换一个名字，同样是PPPOE拨号，分配到动态内网IPv4（目前是NAT1），IPv6 /64 + PD /60。 而互联网专线的亮点就是分配了一个固定公网IPv4，没有IPv6，如果分配一个固定IPv6 /64，则不能分配公网IPv4。 使用下来，我感觉这两条宽带没有什么太大的区别，traceroute的节点基本是一样的。 都说南电信，北联通（网通），现在用移动宽带访问国内网站，也没感觉到电信的优势在哪里。但移动到亚州的线路确实比电信要优秀不少，如能连接到cloudflare、cloudfront香港的cdn节点，Ping不到20ms，但现在cloudfront被限速严重，基本不能用；Orcale东京、AWS新加坡机房也基本能跑满的。 以下是测速时间： &#160; PS：其实也有点不舍得原本的电信宽带，可以双拨、双栈公网IP，未提速前上、下行带宽能叠加（提速到一千兆后就不行了），手机不限流量，超45G后限速3Mbps。</p>
<p>The post <a href="https://www.niclau.net/blog/cmcc-dia.html">990元包年的移动互联网专线</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>早前，为了迎合国内消费降级的潮流，我把使用多年的电信千兆融合宽带（2040/元年）更换为移动到企990包年的套餐，这个套餐包含了下行500M/上行25M的商务宽带，和下行100M/上行10M的互联网专线。但其实上只是一个GPON的光猫上通过VLAN分了两路宽带，默认光猫的LAN1是互联网专线，LAN2是商务宽带。<span id="more-1590"></span></p>
<p>移动的详细海报介绍如下：</p>
<p><a href="https://filecdn.niclau.net/image/blog/2024/07/yidongdaoqi11.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/yidongdaoqi11.jpg" alt="" width="900" height="1600" /></a></p>
<p>商务宽带应该只是给家宽换一个名字，同样是PPPOE拨号，分配到动态内网IPv4（目前是NAT1），IPv6 /64 + PD /60。</p>
<p>而互联网专线的亮点就是分配了一个固定公网IPv4，没有IPv6，如果分配一个固定IPv6 /64，则不能分配公网IPv4。</p>
<p>使用下来，我感觉这两条宽带没有什么太大的区别，traceroute的节点基本是一样的。</p>
<p>都说南电信，北联通（网通），现在用移动宽带访问国内网站，也没感觉到电信的优势在哪里。但移动到亚州的线路确实比电信要优秀不少，如能连接到cloudflare、cloudfront香港的cdn节点，Ping不到20ms，但现在cloudfront被限速严重，基本不能用；Orcale东京、AWS新加坡机房也基本能跑满的。</p>
<p>以下是测速时间：</p>
<p><figure style="width: 820px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2024/07/ct-gz-dns.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/ct-gz-dns.png" alt="广州电信DNS" width="820" height="312" /></a><figcaption class="wp-caption-text">广州电信DNS</figcaption></figure></p>
<p><figure style="width: 789px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2024/07/cu-gz-dns.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/cu-gz-dns.png" alt="广州联通DNS" width="789" height="331" /></a><figcaption class="wp-caption-text">广州联通DNS</figcaption></figure></p>
<p><figure style="width: 827px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2024/07/cf-hk-cdn.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/cf-hk-cdn.png" alt="Cloudflare香港节点" width="827" height="358" /></a><figcaption class="wp-caption-text">Cloudflare香港节点</figcaption></figure></p>
<p><figure style="width: 621px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2024/07/speedtest-nju.png"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2024/07/speedtest-nju.png" width="621" height="504" /></a><figcaption class="wp-caption-text">南京大学测速站</figcaption></figure></p>
<p><figure style="width: 750px" class="wp-caption aligncenter"><a href="https://www.speedtest.net/result/16520192641.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/speedtest-suzhou-tel.png" alt="苏州电信" width="750" height="400" /></a><figcaption class="wp-caption-text">苏州电信</figcaption></figure></p>
<p><figure style="width: 750px" class="wp-caption aligncenter"><a href="https://www.speedtest.net/result/16520214085.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/speedtest-aws-sg.png" alt="AWS新加坡" width="750" height="400" /></a><figcaption class="wp-caption-text">AWS新加坡</figcaption></figure></p>
<p><figure style="width: 750px" class="wp-caption aligncenter"><a href="https://www.speedtest.net/result/16520202785.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/speedtest-oracle-tokyo.png" alt="Oracle东京" width="750" height="400" /></a><figcaption class="wp-caption-text">Oracle东京</figcaption></figure></p>
<p><figure style="width: 750px" class="wp-caption aligncenter"><a href="https://www.speedtest.net/result/16520729283.png"><img loading="lazy" decoding="async" class="size-medium" src="https://filecdn.niclau.net/image/blog/2024/07/speedtest-oracle-phoenix.png" alt="Oracle凤凰城" width="750" height="400" /></a><figcaption class="wp-caption-text">Oracle凤凰城</figcaption></figure></p>
<p>&nbsp;</p>
<p>PS：其实也有点不舍得原本的电信宽带，可以双拨、双栈公网IP，未提速前上、下行带宽能叠加（提速到一千兆后就不行了），手机不限流量，超45G后限速3Mbps。</p><p>The post <a href="https://www.niclau.net/blog/cmcc-dia.html">990元包年的移动互联网专线</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/cmcc-dia.html/feed</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>使用Derper架设Tailscale中继服务器</title>
		<link>https://www.niclau.net/blog/tailscale-custom-relay.html</link>
					<comments>https://www.niclau.net/blog/tailscale-custom-relay.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Fri, 14 Jan 2022 05:07:30 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[tailscale]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1524</guid>

					<description><![CDATA[<p>以下命令均使用root身份运行 安装golang 1、下载、安装 wget https://go.dev/dl/go1.17.6.linux-amd64.tar.gz rm -rf /usr/local/go &#38;&#38; tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz 2、添加环境变量 export PATH=$PATH:/usr/local/go/bin source $HOME/.profile 3、验证是否成功安装 go version go version go1.17.6 linux/amd64 安装Derper服务 1、下载、安装 go install tailscale.com/cmd/derper@main 2、验证是否成功安装 /root/go/bin/derper -h Usage of ./go/bin/derper: -a string server address (default &#34;:443&#34;) -bootstrap-dns-names string optional comma-separated list of hostnames to make available at /bootstrap-dns &#8230; <a href="https://www.niclau.net/blog/tailscale-custom-relay.html" class="more-link">Continue reading <span class="screen-reader-text">使用Derper架设Tailscale中继服务器</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.niclau.net/blog/tailscale-custom-relay.html">使用Derper架设Tailscale中继服务器</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>以下命令均使用root身份运行</p>
<p><strong>安装golang</strong><br />
1、下载、安装</p>
<pre class="brush: bash; title: ; notranslate">wget https://go.dev/dl/go1.17.6.linux-amd64.tar.gz
rm -rf /usr/local/go &amp;&amp; tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
</pre>
<p><span id="more-1524"></span></p>
<p>2、添加环境变量</p>
<pre class="brush: bash; title: ; notranslate">export PATH=$PATH:/usr/local/go/bin
source $HOME/.profile</pre>
<p>3、验证是否成功安装</p>
<pre class="brush: bash; title: ; notranslate">go version
go version go1.17.6 linux/amd64</pre>
<p><strong>安装Derper服务</strong><br />
1、下载、安装</p>
<pre class="brush: bash; title: ; notranslate">go install tailscale.com/cmd/derper@main</pre>
<p>2、验证是否成功安装</p>
<pre class="brush: bash; title: ; notranslate">/root/go/bin/derper -h
Usage of ./go/bin/derper:
  -a string
        server address (default &quot;:443&quot;)
  -bootstrap-dns-names string
        optional comma-separated list of hostnames to make available at /bootstrap-dns
  -c string
        config file path
#以下省略</pre>
<p>3、测试启动服务</p>
<pre class="brush: bash; title: ; notranslate">/root/go/bin/derper -c=$HOME/derper.conf -hostname=yourhostname.com -stun
#如有以下返回信息，即说明derper服务启动成功了，derper会自动为您的域名申请letsencrypte的ssl证书
2021/09/18 15:04:31 derper: serving on :443 with TLS
2021/09/18 15:04:31 running STUN server on &#x5B;::]:3478</pre>
<p>如果443端口已被其它服务占用，则可以使用自定义端口,但SSL证书需自行提前准备好：</p>
<pre class="brush: bash; title: ; notranslate">/root/go/bin/derper -c=$HOME/derper.conf -http-port -1 -a &quot;:12345&quot; -hostname &quot;your.domain.net&quot; --stun -certmode manual -certdir /etc/certs/
#同样的，当看到以下返回信息，则说明derper服务启动成功
2021/09/18 15:32:09 derper: serving on :12345 with TLS
2021/09/18 15:32:09 running STUN server on &#x5B;::]:3478
</pre>
<p>4、守护进程</p>
<pre class="brush: bash; title: ; notranslate">
vim /etc/systemd/system/derp.service
&#x5B;Unit]
Description=Tailscale DERP Server
After=network.target

&#x5B;Service]
User=root
Restart=always
RestartSec=5
ExecStart= /root/go/bin/derper -c=$HOME/derper.conf -http-port -1 -a &quot;:12345&quot; -hostname &quot;your.domain.net&quot; --stun -certmode manual -certdir /etc/certs/

&#x5B;Install]
WantedBy=multi-user.target
</pre>
<p>5、启动服务</p>
<pre class="brush: bash; title: ; notranslate">systemctl enable --now derp.service
#查看返回结果
systemctl status derp.service
● derp.service - Tailscale DERP Server
   Loaded: loaded (/etc/systemd/system/derp.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2022-01-12 16:20:50 HKT; 1 day 20h ago
 Main PID: 748 (derper)
    Tasks: 4
   Memory: 10.3M
      CPU: 3.502s
   CGroup: /system.slice/derp.service</pre>
<p>6、配置控制台节点信息</p>
<pre class="brush: bash; title: ; notranslate">
// Example/default ACLs for unrestricted connections.
{
  // Declare static groups of users beyond those in the identity service.
  &quot;groups&quot;: {
    &quot;group:example&quot;: &#x5B; &quot;user1@example.com&quot;, &quot;user2@example.com&quot; ],
  },
  // Declare convenient hostname aliases to use in place of IP addresses.
  &quot;hosts&quot;: {
    &quot;example-host-1&quot;: &quot;100.100.100.100&quot;,
  },
  // Access control lists.
  &quot;acls&quot;: &#x5B;
    // Match absolutely everything. Comment out this section if you want
    // to define specific ACL restrictions.
    { &quot;action&quot;: &quot;accept&quot;, &quot;users&quot;: &#x5B;&quot;*&quot;], &quot;ports&quot;: &#x5B;&quot;*:*&quot;] },
  ],
	&quot;derpMap&quot;: {
		&quot;OmitDefaultRegions&quot;: true, //只使用自建中继
		&quot;Regions&quot;: {
			&quot;901&quot;: {
				&quot;RegionID&quot;: 901,
				&quot;RegionCode&quot;: &quot;myderp1&quot;,
				&quot;Nodes&quot;: &#x5B;
					{
						&quot;Name&quot;: &quot;1&quot;,
						&quot;RegionID&quot;: 901,
						&quot;HostName&quot;: &quot;your1.domain.net&quot;
						//&quot;DERPPort&quot;: 12345
					}
				]
			},
			&quot;900&quot;: {
				&quot;RegionID&quot;: 900,
				&quot;RegionCode&quot;: &quot;myderp2&quot;,
				&quot;Nodes&quot;: &#x5B;
					{
						&quot;Name&quot;: &quot;1&quot;,
						&quot;RegionID&quot;: 900,
						&quot;HostName&quot;: &quot;your2.domain.net&quot;,
						&quot;DERPPort&quot;: 12345
					}
				]
			}
		}
	}


}
</pre><p>The post <a href="https://www.niclau.net/blog/tailscale-custom-relay.html">使用Derper架设Tailscale中继服务器</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/tailscale-custom-relay.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress编辑器中可视化与文本无法切换解决办法</title>
		<link>https://www.niclau.net/blog/wordpress-editor-problem.html</link>
					<comments>https://www.niclau.net/blog/wordpress-editor-problem.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Mon, 21 Jan 2019 12:49:49 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1431</guid>

					<description><![CDATA[<p>找到程序中的配置wp-config.php文件（具体在哪？站点根目录下）高级编辑器打开，找到以下代码： require_once(ABSPATH . 'wp-settings.php'); 后面加入： define('CONCATENATE_SCRIPTS', false ); 修改好了之后保存上传到对应的代码下覆盖就可以了。</p>
<p>The post <a href="https://www.niclau.net/blog/wordpress-editor-problem.html">WordPress编辑器中可视化与文本无法切换解决办法</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>找到程序中的配置wp-config.php文件（具体在哪？站点根目录下）高级编辑器打开，找到以下代码：</p>
<pre class="brush: bash; title: ; notranslate">require_once(ABSPATH . 'wp-settings.php');</pre>
<p>后面加入：</p>
<pre class="brush: bash; title: ; notranslate">define('CONCATENATE_SCRIPTS', false );</pre>
<p>修改好了之后保存上传到对应的代码下覆盖就可以了。</p><p>The post <a href="https://www.niclau.net/blog/wordpress-editor-problem.html">WordPress编辑器中可视化与文本无法切换解决办法</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/wordpress-editor-problem.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>iOS描述文件</title>
		<link>https://www.niclau.net/blog/ios-profiles.html</link>
					<comments>https://www.niclau.net/blog/ios-profiles.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Mon, 21 Jan 2019 12:42:33 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[iOS]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1424</guid>

					<description><![CDATA[<p>iOS描述文件</p>
<p>The post <a href="https://www.niclau.net/blog/ios-profiles.html">iOS描述文件</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<ul>
<li>禁止iOS更新提示</li>
</ul>
<p><a href="https://ibeta.me/static/configs/tvOS_12_Beta_Profile.mobileconfig">https://ibeta.me/static/configs/tvOS_12_Beta_Profile.mobileconfig</a></p>
<p><a href="https://ibeta.me/download/4">https://ibeta.me/download/4</a></p>
<ul>
<li>禁止iOS低电量提醒（文件来自serverdbs.com）</li>
</ul>
<p><a href="https://filecdn.niclau.net/apple/HideLowPowerAlerts.mobileconfig">https://filecdn.niclau.net/apple/HideLowPowerAlerts.mobileconfig</a></p><p>The post <a href="https://www.niclau.net/blog/ios-profiles.html">iOS描述文件</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/ios-profiles.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Project Fi漫游在中国大陆的体验</title>
		<link>https://www.niclau.net/blog/project-fi-roaming-china.html</link>
					<comments>https://www.niclau.net/blog/project-fi-roaming-china.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Wed, 30 May 2018 13:18:42 +0000</pubDate>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Project Fi]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1405</guid>

					<description><![CDATA[<p>这个月初，从fi.google.com注册了一张Project Fi的sim卡，历时半个月，终于从水深火热的美帝运送到我的手中。 把sim卡放进Nexus 5X，打开Project Fi App，成功激活，并搜索到了中国联通的信号。激活后就可以把sim卡放在您喜欢的手机中使用了。 Fi的套餐内容很简单： 基本月租：20刀/月，美国境内无限通话和短信，对于我们来说没啥用 流量：10刀/1GB，当月使用超过6GB不再计费，当月使用超过15G开始限速 Google对于激活sim卡的设备是有限制的，所以如果没有设备那就比较麻烦了~： Pixel 2 (All versions) Pixel 2 XL (All versions) Pixel Model G-2PW4100 (North American version) Pixel XL Model G-2PW2100 (North American version) Android One Moto X4 (North American versions) Nexus 5X Model LGH790 (North American version) Nexus 6P Model H1511 (North American version) Nexus 6 &#8230; <a href="https://www.niclau.net/blog/project-fi-roaming-china.html" class="more-link">Continue reading <span class="screen-reader-text">Project Fi漫游在中国大陆的体验</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.niclau.net/blog/project-fi-roaming-china.html">Project Fi漫游在中国大陆的体验</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>这个月初，从<a href="https://fi.google.com">fi.google.com</a>注册了一张Project Fi的sim卡，历时半个月，终于从水深火热的美帝运送到我的手中。<br />
把sim卡放进Nexus 5X，打开Project Fi App，成功激活，并搜索到了中国联通的信号。激活后就可以把sim卡放在您喜欢的手机中使用了。<br />
<span id="more-1405"></span></p>
<p><strong>Fi的<a href="https://fi.google.com/about/plan/">套餐内容</a>很简单：</strong><br />
<strong>基本月租：20刀/月</strong>，美国境内无限通话和短信，对于我们来说没啥用<br />
<strong>流量：10刀/1GB</strong>，当月使用超过6GB不再计费，当月使用超过15G开始限速</p>
<p>Google对于激活sim卡的设备是<strong><a href="https://support.google.com/fi/answer/6224695#supported_model">有限制</a></strong>的，所以如果没有设备那就比较麻烦了~：<br />
Pixel 2 (All versions)<br />
Pixel 2 XL (All versions)<br />
Pixel Model G-2PW4100 (North American version)<br />
Pixel XL Model G-2PW2100 (North American version)<br />
Android One Moto X4 (North American versions)<br />
Nexus 5X Model LGH790 (North American version)<br />
Nexus 6P Model H1511 (North American version)<br />
Nexus 6 Model XT1103 (North American version)</p>
<p>好，说了那么多，现在来测试一下Fi在联通网络的表现吧~</p>
<ul>
<li>根据出口IP，可以看到是T-mobile的网络<br />
<img decoding="async" src="https://filecdn.niclau.net/image/blog/2018/fi-ip.jpg" alt="Fi IP address" /></li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Traceroute至Youtube.com,唔~~世界加钱可及&gt;_&lt;||<br />
<img decoding="async" src="https://filecdn.niclau.net/image/blog/2018/fi-traceroute.jpg" alt="Fi traceroute" /></li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Speedtest <a href="http://www.speedtest.net/result/a/3949570121">上/下行速度</a>与本地网络无异，Ping值偏高可以理解<br />
<img decoding="async" src="https://filecdn.niclau.net/image/blog/2018/fi-speedtest.jpg" alt="Fi speedtest.net" /></li>
</ul>
<p>&nbsp;</p>
<p>最后，Project Fi是可以随时停机的，停机后不会扣费，每3个月自动复机，但可以再停机。</p>
<p>PS：使用我的<a href="https://g.co/fi/r/596CVF">邀请码</a>申请Project Fi,激活30天后大家各自能获得$20的使用额度。</p><p>The post <a href="https://www.niclau.net/blog/project-fi-roaming-china.html">Project Fi漫游在中国大陆的体验</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/project-fi-roaming-china.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>工银亚洲见证开户记要</title>
		<link>https://www.niclau.net/blog/icbcasia-account-opening.html</link>
					<comments>https://www.niclau.net/blog/icbcasia-account-opening.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sun, 07 Jan 2018 08:56:11 +0000</pubDate>
				<category><![CDATA[其它]]></category>
		<category><![CDATA[ICBCASIA]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1370</guid>

					<description><![CDATA[<p>因为目前中国大陆居民在香港银行开户越来越难，所以我就决定先占个坑，或许日后能用得上呢。~ 我是在2017年9月28日到网点申请的，拿到工银亚洲的借记卡（提款卡）用时约一个月（中间经历了一个国庆长假>_</p>
<p>The post <a href="https://www.niclau.net/blog/icbcasia-account-opening.html">工银亚洲见证开户记要</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>因为目前中国大陆居民在香港银行开户越来越难，所以我就决定先占个坑，或许日后能用得上呢。~<br />
我是在2017年9月28日到网点申请的，拿到工银亚洲的借记卡（提款卡）用时约一个月（中间经历了一个国庆长假>_<）。
</br><span id="more-1370"></span></p>
<p></ br><strong>官方的开户指南这里</strong>：<a href="https://www.icbcasia.com/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E4%BA%9A%E6%B4%B2/CN/%E4%B8%AA%E4%BA%BA%E9%87%91%E8%9E%8D/%E4%BA%BA%E6%B0%91%E5%B8%81%E5%8F%8A%E8%B7%A8%E5%A2%83%E7%90%86%E8%B4%A2/%E5%86%85%E5%9C%B0%E5%AE%A2%E6%88%B7%E6%9C%8D%E5%8A%A1%E4%B8%93%E5%8C%BA/scm_aow.htm">工银亚洲内地客户见证开户服务介绍</a></p>
<p>需要准备好的东西：</p>
<ul>
<li>身份证</li>
<li>港澳通行证或护照</li>
<li>中国工商银行借记卡</li>
</ul>
<p>以下是申请开户要点：</p>
<ul>
<li>建议先在线填写申请表，打印出来，并记下申请编号，方便日后在线<a href="https://myebankasia.icbc.com.cn/icbc/abroadperbank/apply/HWHKMHApplyEditMain.jsp?dse_locale=zh-CN&#038;areaCode=0110">查询申请进度</a>。</li>
<li>不需要住址证明，除了公司地址外，其它都填写身份证上的地址即可。</li>
<li>申请综合账户即可，除非你很有钱。</li>
<li>钩选借记卡服务，并钩选“海外柜员机提款功能”。</li>
<li>钩选网上银行服务（难道你天天往香港跑？）。
<li>在工作日带齐资料到一间支持见证开户的工行网点办理（有网友指出预约排队严重，要找一间偏僻一些的网点，但我当场就能办理了）。</li>
<li>开户现场会给你两封密码信（分别是工银亚洲网上银行密码和借记卡密码）和一个电子密码器（开户成功后会收到来自工银亚洲的激活短信，如果没收到可以打客服电话要）。</li>
<li>开户手续费100元</li>
</ul>
<p>现场办理完成后，大约过了10天，会收到短信提醒，将会有工银亚洲客服来电，注意接听。<br />
又过了两天，接到了从香港打来的电话，主要是核实信息（身份证，通讯地址之类的）。</p>
<p>再过了一星期的样子，收到了开户成功的短信，并需要通过同名账户往工银亚洲的账户汇入一笔钱来激活（在柜台开户时拿到的凭证上有主账号和各个子账号，向其中一个汇款即可）。金额多少应该不是问题，工行手机APP不会收取汇款手续费，但工银亚洲会收取60HKD的落地费，自己看着办吧。<br />
然后就可以在手机APP上购汇并汇款即可（实时到账）。</p>
<p>再过了几天后收到邮政的挂号信，从香港寄来的一张借记卡和一封欢迎信（含回执），因为借记卡密码我们在开户时已经拿到了，所以回执不用寄回去了。但如果想修改借记卡密码就需要跑香港一趟了。</p>
<p>其它需要注意事项：</p>
<ul>
<li>综合账户第一年免除账户<a href="https://www.icbcasia.com/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E4%BA%9A%E6%B4%B2/CN/e%E5%B7%A5%E5%85%B7/%E6%9C%8D%E5%8A%A1%E6%94%B6%E8%B4%B9/default.htm">管理费</a>，但从第二年开始总资产（包括股票、基金等）不足一万港元，每月收取15港元管理费。</li>
<li>每年至少登录网上银行并操作一次实际业务，避免被冻结账户。以我理解，转账或买基金都应该算数。</li>
<li>因为在内地见证开户的综合账户是没有人民币往来和储蓄账户的，如果想增加人民币账户，可在网上银行再申请一个综合账户和一张新借记卡，并将此借记卡绑定到人民币储蓄账户即可（这个带有人民币的综合账户不会额外收费，只要其中一个综合账户总资产在一万港元以上）。</li>
<li>港币借记卡在香港的银通（JETCO）ATM和中国大陆工行ATM取现免手续费。</li>
</ul><p>The post <a href="https://www.niclau.net/blog/icbcasia-account-opening.html">工银亚洲见证开户记要</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/icbcasia-account-opening.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>为nghttp2 proxy配置客户端证书认证</title>
		<link>https://www.niclau.net/blog/nghttp2-proxy-verify-client-certificate.html</link>
					<comments>https://www.niclau.net/blog/nghttp2-proxy-verify-client-certificate.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Wed, 01 Apr 2015 03:53:01 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[nghttp2]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1341</guid>

					<description><![CDATA[<p>为nghttp2 proxy配置客户端证书认证</p>
<p>The post <a href="https://www.niclau.net/blog/nghttp2-proxy-verify-client-certificate.html">为nghttp2 proxy配置客户端证书认证</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre class="brush: bash; title: ; notranslate"># 建立 CA 目录结构
mkdir -p ./demoCA/{private,newcerts}
touch ./demoCA/index.txt
echo 01 &gt; ./demoCA/serial

# 生成 CA 的 RSA 密钥对
openssl genrsa -des3 -out ./demoCA/private/cakey.pem 2048

# 自签发CA证书
openssl req -new -x509 -days 365 -key ./demoCA/private/cakey.pem \
-out ./demoCA/cacert.pem

# 把CA证书移至nghttpx配置目录
sudo mv ./demoCA/cacert.pem /etc/nghttpx/certs/

# 修改nghttpx启动脚本(supervisor)
&#x5B;program:nghttpx]
command=nghttpx -s -f0.0.0.0,443 -b127.0.0.1,8080 /etc/nghttpx/certs/ssl.key /etc/nghttpx/certs/ssl.crt --verify-client --verify-client-cacert=/etc/nghttpx/certs/cacert.pem --npn-list=spdy/3.1,h2
autorestart=true
user=root
</pre>
<p>接下来把vps上的cacert.pem和cakey.pem下载到本机并导入操作系统。在OSX中cacert.pem（公钥）双击导入即可，但cakey.pem（私钥）需从终端导入（GUI有Bug导不进）：</p>
<pre class="brush: bash; title: ; notranslate">security import cakey.pem -k ~/Library/Keychains/login.keychain</pre>
<p>最后，理论上只要在Chrome安装扩展<a href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?utm_source=chrome-app-launcher-info-dialog">Proxy SwitchyOmega</a>，设置好https proxy就万时大吉；但实际上Chrome 41 stable对需要证书认证的https代理有一个无限崩溃的Bug，所以需要更新到Chrome 43 dev或以上才行。当然Firefox 33以上已支持https proxy，需通过<a href="https://github.com/clowwindy/gfwlist2pac">pac</a>使用。</p><p>The post <a href="https://www.niclau.net/blog/nghttp2-proxy-verify-client-certificate.html">为nghttp2 proxy配置客户端证书认证</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/nghttp2-proxy-verify-client-certificate.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>编译安装nghttp2遇到的问题</title>
		<link>https://www.niclau.net/blog/compile-nghttp2-encounter-problems.html</link>
					<comments>https://www.niclau.net/blog/compile-nghttp2-encounter-problems.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Tue, 31 Mar 2015 16:43:38 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[nghttp2]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.niclau.net/blog/?p=1319</guid>

					<description><![CDATA[<p>本文只是记录编译nghttp2所遇到的问题的解决方法，具体步骤请看这里（十分详细）。 环璄：Ubuntu 14.04TLS X64 1、nghttp2依赖spdylay，安装spdylay后，运行spdycat提示： spdycat: error while loading shared libraries: libspdylay.so.7: cannot open shared object file: No such file or directory 然后ldd `which spdycat`，会发现缺少运行库libspdylay.so.7 ldd `which spdycat` linux-vdso.so.1 =&#62; (0x00007fffced6e000) libssl.so.1.0.0 =&#62; /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007ff963dff000) libcrypto.so.1.0.0 =&#62; /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007ff963a24000) libxml2.so.2 =&#62; /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007ff9636bd000) libspdylay.so.7 =&#62; not found libstdc++.so.6 =&#62; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff9633b9000) libgcc_s.so.1 =&#62; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff9631a2000) &#8230; <a href="https://www.niclau.net/blog/compile-nghttp2-encounter-problems.html" class="more-link">Continue reading <span class="screen-reader-text">编译安装nghttp2遇到的问题</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.niclau.net/blog/compile-nghttp2-encounter-problems.html">编译安装nghttp2遇到的问题</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>本文只是记录编译nghttp2所遇到的问题的解决方法，具体步骤请看<a href="https://nghttp2.org/documentation/package_README.html">这里</a>（十分详细）。</p>
<p><span id="more-1319"></span><br />
环璄：Ubuntu 14.04TLS X64<br />
1、nghttp2依赖spdylay，安装spdylay后，运行spdycat提示：</p>
<pre class="brush: bash; title: ; notranslate">spdycat: error while loading shared libraries: libspdylay.so.7: cannot open shared object file: No such file or directory</pre>
<p>然后ldd `which spdycat`，会发现缺少运行库libspdylay.so.7</p>
<pre class="brush: bash; title: ; notranslate">ldd `which spdycat`
	linux-vdso.so.1 =&gt;  (0x00007fffced6e000)
	libssl.so.1.0.0 =&gt; /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007ff963dff000)
	libcrypto.so.1.0.0 =&gt; /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007ff963a24000)
	libxml2.so.2 =&gt; /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007ff9636bd000)
	libspdylay.so.7 =&gt; not found
	libstdc++.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff9633b9000)
	libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff9631a2000)
	libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff962f84000)
	libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff962bbf000)
	libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff9629ba000)
	libz.so.1 =&gt; /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff9627a1000)
	liblzma.so.5 =&gt; /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff96257f000)
	libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff962278000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff964066000)
</pre>
<p>运行find /usr/local -name libspdylay.so</p>
<pre class="brush: bash; title: ; notranslate">/usr/local/lib/libspdylay.so</pre>
<p>创建libspdylay.so的软链接，再次运行spdycat，无错误返回即可</p>
<pre class="brush: plain; title: ; notranslate">sudo ln -s /usr/local/lib/libspdylay.so /lib/x86_64-linux-gnu/libspdylay.so.7</pre>
<p>2、nghttp2同样会遇到缺运行库的错误，同样地ln -s</p>
<pre class="brush: bash; title: ; notranslate">sudo ln -s /usr/local/lib/libnghttp2.so /lib/x86_64-linux-gnu/libnghttp2.so.5
nghttpx
Usage: nghttpx &#x5B;OPTIONS]... &#x5B;&lt;PRIVATE_KEY&gt; &lt;CERT&gt;]
A reverse proxy for HTTP/2, HTTP/1 and SPDY.
01/Apr/2015:00:20:13 +0800 PID14428 &#x5B;FATAL] shrpx.cc:1999 Too few arguments</pre>
<p>至此，编译、安装部分完成。</p>
<p>3、Chrome连接nghttp2 proxy时报spdy错误<br />
&#8220;Error code:ERR_SPDY_PROTOCOL_ERROR&#8221;,这是Chrome的<a href="https://github.com/tatsuhiro-t/nghttp2/issues/151">BUG</a>，只需要把nghttpx协商的优先顺序改为spdy/3.1即可</p>
<pre class="brush: bash; title: ; notranslate">sudo nghttpx -s -f0.0.0.0,443 -b127.0.0.1,8080 \
/etc/nghttpx/certs/ssl.key /etc/nghttpx/certs/ssl.crt \
--npn-list=spdy/3.1,h2</pre><p>The post <a href="https://www.niclau.net/blog/compile-nghttp2-encounter-problems.html">编译安装nghttp2遇到的问题</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/compile-nghttp2-encounter-problems.html/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>为Android Lollipop开启Google Now</title>
		<link>https://www.niclau.net/blog/lollipop-enable-googlenow.html</link>
					<comments>https://www.niclau.net/blog/lollipop-enable-googlenow.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sun, 04 Jan 2015 08:09:31 +0000</pubDate>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Android]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1305</guid>

					<description><![CDATA[<p>为Android Lollipop开启Google Now</p>
<p>The post <a href="https://www.niclau.net/blog/lollipop-enable-googlenow.html">为Android Lollipop开启Google Now</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>此方法无需root、无需修改位置信息，需全程开启VPN。</p>
<p>步聚：</p>
<ol>
<li>更新google search到最新版。</li>
<li>把系统语言改为English(US)，清除google play services、 google app、google play store和google services framework的数据（如果使用Google Now Launcher，桌面设置将清空）。</li>
<li>开启飞行模式（可选）、禁用定位服务，在桌面空白处长按，点选“settings”，进入后点击“Accounts &amp; privacy”，再点击“Google Account”，点击“Sign out”。</li>
<li>然后返回桌面，原无意外开启Google Now的向导出来啦。</li>
<li><strong><span style="color: #ff6600;">千</span></strong><span style="color: #ff6600;"><strong><span style="color: #ff6600;">万</span>不要把系统语言改为简体中文了。</strong></span></li>
</ol>
<p><span id="more-1305"></span></p>
<p>Reference:<a href="http://www.zhihu.com/question/26603947/answer/33843093">http://www.zhihu.com/question/26603947/answer/33843093</a></p><p>The post <a href="https://www.niclau.net/blog/lollipop-enable-googlenow.html">为Android Lollipop开启Google Now</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/lollipop-enable-googlenow.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>用ArchLinux架设Time Capsule</title>
		<link>https://www.niclau.net/blog/archlinux-diy-timecapsule.html</link>
					<comments>https://www.niclau.net/blog/archlinux-diy-timecapsule.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Fri, 28 Feb 2014 14:22:11 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[ArchLinux]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[Time Machine]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1283</guid>

					<description><![CDATA[<p>本人入手Macbook Pro Retina（early 2013）后还转门买了一个1T的移动硬盘作为Time Machine的备份盘，但用着感觉每次备份还得接上硬盘实在不方便，也曾经想过把路由器作为Time Capsule，但路由器的性能是个问题，所以最后还是用PC吧。</p>
<p>The post <a href="https://www.niclau.net/blog/archlinux-diy-timecapsule.html">用ArchLinux架设Time Capsule</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>本人入手Macbook Pro Retina（early 2013）后还转门买了一个1T的移动硬盘作为Time Machine的备份盘（其实前10G用作OS X安装、后600G用作文件交换），但用着感觉每次备份还得接上硬盘实在不方便，也曾经想过把路由器作为Time Capsule，但路由器的性能是个问题，所以最后还是用PC吧。</p>
<p><span id="more-1283"></span></p>
<p>首先从AUR上拿下提供AFP服务的netatalk，我装上的是3.0.7版。</p>
<p>关于更详细的netatalk设置可参考万能的<a href="https://wiki.archlinux.org/index.php/Netatalk">ArchLinux Wiki</a>。</p>
<pre class="brush: bash; title: ; notranslate">sudo yaourt -Sy netatalk</pre>
<p>netatalk的配置文件在/etc/afp.conf</p>
<pre class="brush: bash; title: ; notranslate">sudo vi /etc/afp.conf</pre>
<p>编辑如下：</p>
<pre class="brush: bash; title: ; notranslate">
&#x5B;Global]
mimic model = TimeCapsule6,106
log level = default:warn
log file = /var/log/afpd.log
hosts allow = 192.168.1.0/24 #允许访问的网段

&#x5B;TimeMachine]
path = /home/user/tm #Time Machine的备份目录
time machine = yes
</pre>
<p>启动netatalk和avahi服务：</p>
<pre class="brush: bash; title: ; notranslate">
sudo systemctl enable netatalk.service
sudo systemctl start netatalk.service
sudo systemctl enable avahi-daemon.service #让OS X发现Linux这台机子
sudo systemctl start avahi-daemon.service
</pre>
<p>至此服务端的设置已经完成，接下来到MacBook上操作。</p>
<p>1、从Finder访问ArchLinux的Time Capsule：afp://archlinux-tm.lan，如果提示输入密码请填上登录Archlinux的用户名和密码（非root），将会看到一个叫timemachine的空目录。</p>
<p>2、打开Time Machine偏好设置→添加或移除备份磁盘，原无意外将会看到ArchLinux的Time Capsule，选上它。</p>
<p><img loading="lazy" decoding="async" class="alignnone" alt="" src="https://filecdn.niclau.net/image/blog/2014/02/tm-backup-setting.png" width="671" height="447" /></p>
<p>3、从Time Machine菜单点“立即备份”，注意afp的timemachine目录，将会生成一个your macbook host name.<code>sparsebundle</code>的文件，然后马上停止备份，并关闭Time Machine。双击挂载your macbook host name.<code>sparsebundle，从Finder左则将会看到一个“Time Machine 备份”的磁盘。如果Time Machine提示备份失败，注意Linux上的TimeMachine目录是否具有写入权限。</code></p>
<p>4、运行磁盘工具，把移动硬盘中的备份恢复到<code>“Time Machine 备份”的磁盘</code>。注意源磁盘和目标磁盘，别搞错了。<code></code></p>
<p><a href="https://filecdn.niclau.net/image/blog/2014/02/recover-from-mobile-drive.png"><img loading="lazy" decoding="async" class="alignnone" alt="" src="https://filecdn.niclau.net/image/blog/2014/02/recover-from-mobile-drive.png" width="594" height="514" /></a></p>
<p>接下来就是漫长的等待了。强烈建议、务必在千兆网络环境下进行！我这80多G的数据用了3个多小时才完成。</p>
<p><a href="https://filecdn.niclau.net/image/blog/2014/02/migrate-timemachine-backup-to-linux.png"><img loading="lazy" decoding="async" class="alignnone" alt="" src="https://filecdn.niclau.net/image/blog/2014/02/migrate-timemachine-backup-to-linux.png" width="1212" height="732" /></a></p>
<p>5、备份迁移完成后就可以把移动硬盘从Time Machine中移除了。</p><p>The post <a href="https://www.niclau.net/blog/archlinux-diy-timecapsule.html">用ArchLinux架设Time Capsule</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/archlinux-diy-timecapsule.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>编译Shadowsocks for Gargoyle</title>
		<link>https://www.niclau.net/blog/build-shadowsocks-for-gargoyle.html</link>
					<comments>https://www.niclau.net/blog/build-shadowsocks-for-gargoyle.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Tue, 04 Feb 2014 04:17:07 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[Gargoyle]]></category>
		<category><![CDATA[OpenWrt]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1269</guid>

					<description><![CDATA[<p>本次编译环境在Arch Linux下进行、路由器为水星mw4530r（tp-link wdr4310的马甲）；在编译shadowsocks之前先把环境准备妥当：</p>
<p>The post <a href="https://www.niclau.net/blog/build-shadowsocks-for-gargoyle.html">编译Shadowsocks for Gargoyle</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>因为<strong><a href="http://shadowsocks.org/en/download/clients.html">shadowsocks-libev</a></strong>提供的nightly版是基于<strong>openwrt trunk</strong>编译的，而<strong><a href="http://www.gargoyle-router.com/phpbb/viewtopic.php?f=3&amp;t=4264">gargoyle 1.5.11</a></strong>基于openwrt attitude adjustment，所以在<strong>gargoyle</strong>上安装会出错：</p>
<pre class="brush: plain; title: ; notranslate">root@Gargoyle:/# opkg install /tmp/ss.ipk
 ERROR: No package named shadowsocks-libev-polarssl found, try updating your package lists</pre>
<p>当然，最简单快捷的方法是把ipk解压，再把文件放进对应目录就可以了。我主要是想趁着这次机会学习<strong>编译</strong>一下openwrt，接着开始记录本次<strong>编译</strong>过程。</p>
<p><span id="more-1269"></span></p>
<p>更详细说明请参阅<a href="http://wiki.openwrt.org/zh-tw/doc/howto/buildroot.exigence">openwrt wiki</a>。</p>
<p>&nbsp;</p>
<p>本次编译环境在Arch Linux下进行、<strong>路由器</strong>为水星<strong>mw4530r</strong>（tp-link wdr4310的马甲）；在编译<strong>shadowsocks</strong>之前先把环境准备妥当：</p>
<pre class="brush: bash; title: ; notranslate">pacman -Sy
pacman -S base-devel subversion git</pre>
<p>接下来获取<strong>openwrt</strong>源码：</p>
<pre class="brush: bash; title: ; notranslate">mkdir ~/openwrt
cd ~/openwrt
svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment</pre>
<p>检查是否缺少编译所需的套件：</p>
<pre class="brush: bash; title: ; notranslate">
cd ~/openwrt/attitude_adjustment
make defconfig
make prereq</pre>
<p>下载<strong>shadowsocks-libev</strong>源码到package目录：</p>
<pre class="brush: bash; title: ; notranslate">cd ~/openwrt/attitude_adjustment/package
git clone https://github.com/madeye/shadowsocks-libev.git</pre>
<p>执行<strong>make menuconfig</strong>进行<strong>openwrt</strong>编译配置：</p>
<pre class="brush: bash; title: ; notranslate">cd ~/openwrt/attitude_adjustment
make menuconfig</pre>
<p>Target System (<strong>Atheros AR7xxx/AR9xxx</strong>)<br />
Subtarget (Generic)<br />
Target Profile (TP-LINK TL-WDR3600/4300/4310)</p>
<p>在<strong>Network</strong>里面选上<strong>shadowsocks-libev</strong>（按空格出现M即可，代表编译为<strong>ipk包</strong>），其它的不用管，因为这次目的是<strong>编译shadowsocks</strong>，保存退出menuconfig。</p>
<p><strong>At last</strong>，开始编译：</p>
<pre class="brush: bash; title: ; notranslate">make V=s</pre>
<p>然后就是漫长的等待了，编译过程中会下载必要的工具包，请保持网络畅通。大约一小时后，原无意外<strong>shadowsocks</strong>会出现在：</p>
<pre class="brush: bash; title: ; notranslate">ls ~/openwrt/attitude_adjustmentbin/bin/ar71xx/packages/ |grep shadow
shadowsocks-libev_1.4.2-343940e6ffd2062b11dccab0894b73f7f32722f7_ar71xx.ipk</pre>
<p>把它放到路由器上<strong>opkg install ./shadow[TAB]</strong>，大家懂的。</p><p>The post <a href="https://www.niclau.net/blog/build-shadowsocks-for-gargoyle.html">编译Shadowsocks for Gargoyle</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/build-shadowsocks-for-gargoyle.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Gargoyle简易Qos规则</title>
		<link>https://www.niclau.net/blog/gargoyle-qos-rule.html</link>
					<comments>https://www.niclau.net/blog/gargoyle-qos-rule.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sun, 19 Jan 2014 12:45:13 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[Gargoyle]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1266</guid>

					<description><![CDATA[<p>最近刷了据说Qos功能不错的Gargoyle（石像鬼）固件，记录以下Qos设置。</p>
<p>The post <a href="https://www.niclau.net/blog/gargoyle-qos-rule.html">Gargoyle简易Qos规则</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>最近刷了据说Qos功能不错的<a href="http://www.gargoyle-router.com">Gargoyle</a>（石像鬼）固件，记录以下Qos设置。</p>
<p>本人小水管电信ADSL 4Mb/512Kb用这规则边P2P边浏览网页无压力，P2P的同时玩CS Ping能控制在50ms左右。可以完全抛弃用了多年的cfosspeed了。</p>
<p><span id="more-1266"></span></p>
<p><img loading="lazy" decoding="async" alt="" src="https://filecdn.niclau.net/image/blog/2014/01/gargoyle-qos-download-rule.jpg" width="580" height="632" /></p>
<p><img decoding="async" alt="" src="https://filecdn.niclau.net/image/blog/2014/01/gargoyle-qos-upload-rule.jpg" /></p><p>The post <a href="https://www.niclau.net/blog/gargoyle-qos-rule.html">Gargoyle简易Qos规则</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/gargoyle-qos-rule.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>排插的重要性~</title>
		<link>https://www.niclau.net/blog/apc-surge-protection.html</link>
					<comments>https://www.niclau.net/blog/apc-surge-protection.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sat, 14 Dec 2013 06:04:38 +0000</pubDate>
				<category><![CDATA[其它]]></category>
		<category><![CDATA[APC]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1259</guid>

					<description><![CDATA[<p>我的电脑主机一直以来都有漏电现像，从P4到现在的Core I5不时手碰到主机上都会被电，因为成台主机都换了也漏电，所以问题一定是出在排插（我才不会说是山寨的 :roll: ）上：地线没了。因为问题不是很严重，所以一直没去处理。</p>
<p>The post <a href="https://www.niclau.net/blog/apc-surge-protection.html">排插的重要性~</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>我的电脑主机一直以来都有漏电现像，从<a title="P4 2.53真热" href="http://www.niclau.net/blog/p4-temperature.html">P4</a>到现在的<a title="新机最终形态" href="http://www.niclau.net/blog/new-pc.html">Core I5</a>不时手碰到主机上都会被电，因为成台主机都换了也漏电，所以问题一定是出在排插（我才不会说是山寨的 <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f644.png" alt="🙄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ）上：地线没了。因为问题不是很严重，所以一直没去处理。</p>
<p><span id="more-1259"></span></p>
<p>直到上月买了rMBP，只要机器插在这排插上充电就有被电的风险。SO，下决心买了2个APC的排插，把APC插到这个山寨的排插上果然显示接地失效了。</p>
<p><img loading="lazy" decoding="async" alt="" src="https://filecdn.niclau.net/image/blog/2013/12/apc-surge-protection.jpg" width="1024" height="1019" /></p><p>The post <a href="https://www.niclau.net/blog/apc-surge-protection.html">排插的重要性~</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/apc-surge-protection.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>终于搞定了WordPress feed解释错误的问题了</title>
		<link>https://www.niclau.net/blog/wordpress-feed-error.html</link>
					<comments>https://www.niclau.net/blog/wordpress-feed-error.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sat, 10 Aug 2013 10:04:50 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1244</guid>

					<description><![CDATA[<p>从Google找了不少文章，错误原因无非2个：</p>
<p>The post <a href="https://www.niclau.net/blog/wordpress-feed-error.html">终于搞定了WordPress feed解释错误的问题了</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>XML解析错误：xml处理指令不在实体的开始部分</p>
<p>位置：http://www.niclau.net/blog/feed</p>
<p>行：2，列：1：</p>
<p>&lt;?xml version=”1.0″ encoding=”UTF-8″?&gt;</p>
<p><span id="more-1244"></span></p>
<p>&nbsp;</p>
<p>从Google找了不少文章，错误原因无非<a href="http://ju.outofmemory.cn/entry/30426">2个</a>：</p>
<ol>
<li><strong>安装的相关插件冲突</strong></li>
<li><strong>相关feed输出的php文件内容中&lt;?php前或?&gt;有空行</strong></li>
</ol>
<p>对于第2点已排除，我已经重新安装了一次wordpress，仍无法解决，所以错误为插件引起；</p>
<p>经过一翻禁用、启用后，最后排查出元凶是：<strong>WordPress Database Backup</strong>，果断禁用之。</p><p>The post <a href="https://www.niclau.net/blog/wordpress-feed-error.html">终于搞定了WordPress feed解释错误的问题了</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/wordpress-feed-error.html/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>DIY了一个毫无技术含量的国内网盘搜索引擎</title>
		<link>https://www.niclau.net/blog/google-cse-search.html</link>
					<comments>https://www.niclau.net/blog/google-cse-search.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Tue, 06 Aug 2013 14:44:49 +0000</pubDate>
				<category><![CDATA[其它]]></category>
		<guid isPermaLink="false">http://www.niclau.net/blog/?p=1239</guid>

					<description><![CDATA[<p>基于Google自定义搜索<br />
包括了几个国内比较多人用的网盘，例如：百毒、某雷快传什么的</p>
<p>The post <a href="https://www.niclau.net/blog/google-cse-search.html">DIY了一个毫无技术含量的国内网盘搜索引擎</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>基于<a href="http://www.google.com/cse">Google自定义搜索</a></p>
<p>包括了几个国内比较多人用的网盘，例如：百毒、某雷快传什么的；</p>
<p>其实嘛，作用就是少打个site:pan.baidu.com什么的；</p>
<p>嗯，具体见<a href="http://www.google.com/cse/home?cx=000689404142415060556:b7y4vz06e2e">连接</a>。</p>
<p>如果不出结果，请自行寻找clients1.google.com、clients2.google.com、www.googleapis.com可用ip或添加到代理名单中。</p><p>The post <a href="https://www.niclau.net/blog/google-cse-search.html">DIY了一个毫无技术含量的国内网盘搜索引擎</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/google-cse-search.html/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>迟来的开箱</title>
		<link>https://www.niclau.net/blog/7870hawk.html</link>
					<comments>https://www.niclau.net/blog/7870hawk.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sun, 03 Mar 2013 07:30:36 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1199</guid>

					<description><![CDATA[<p>由于GTX480的公版散热器就是一个大型抽油烟机，本来想换AC三奶，但也不便宜，前天看见MSI 7870 HAWK已经降到1499软妹币，实在忍不住入手了，今天拿到手，开箱上图。</p>
<p>The post <a href="https://www.niclau.net/blog/7870hawk.html">迟来的开箱</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>由于<a title="新机最终形态" href="http://www.niclau.net/blog/new-pc.html">GTX480</a>的公版散热器就是一个大型抽油烟机，本来想换AC三奶，但也不便宜，前天看见MSI 7870 HAWK已经降到1499软妹币，实在忍不住入手了，今天拿到手，开箱上图。</p>
<p><span id="more-1199"></span></p>
<p>包装盒比想像中要大，有点沉。</p>
<p>附件该有的都有了:DVI→VGA、miniDP→DP、电压测量线，各种光盘说明书什么的；不对少了交火线 ←_←。</p>
<p style="text-align: center;"><a href="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-1.jpg"><img decoding="async" class="aligncenter" alt="" src="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-1.jpg" width="600" /></a></p>
<p style="text-align: center;"><a href="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-2.jpg"><img decoding="async" class="aligncenter" alt="" src="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-2.jpg" width="600" /></a></p>
<p style="text-align: center;"><a href="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-3.jpg"><img decoding="async" class="aligncenter" alt="" src="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-3.jpg" width="600" /></a></p>
<p style="text-align: center;"><a href="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-4.jpg"><img decoding="async" class="aligncenter" alt="" src="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-4.jpg" width="600" /></a></p>
<p style="text-align: center;"><a href="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-5.jpg"><img decoding="async" class="aligncenter" alt="" src="https://filecdn.niclau.net/image/blog/2013/03/7870hawk-5.jpg" width="600" /></a></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/7870+gtx480.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/7870+gtx480.jpg" width="600" /></a><figcaption class="wp-caption-text">曾经的卡王与7870HAWK合照</figcaption></figure></p>
<p>接下来上机测试，一次点亮，装驱动13.1 for win7 x64。</p>
<p>然后就是7870大战GTX480。</p>
<p><strong>CPU：</strong>Intel Core I5 2310</p>
<p><strong>主板：</strong>MSI P67A-G45</p>
<p><strong>内存：</strong>Kingston 4G DDR3 1333 *2</p>
<p><strong>显卡：</strong>MSI R7870 HAWK</p>
<p>次噢，开机时显卡的风扇很噪，进系统后才安静下来</p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/3dmark11_7870.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/3dmark11_7870.jpg" width="600" /></a><figcaption class="wp-caption-text">7870HAWK 3DMark11 X2338</figcaption></figure></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/3dmark11_gtx480.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/3dmark11_gtx480.jpg" width="600" /></a><figcaption class="wp-caption-text">GTX480 3DMark11 X1800</figcaption></figure></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/3dmark_7870.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/3dmark_7870.jpg" width="600" /></a><figcaption class="wp-caption-text">7870HAWK 3DMark FS4939</figcaption></figure></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/3dmark_gtx480.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/3dmark_gtx480.jpg" width="600" /></a><figcaption class="wp-caption-text">GTX480 3DMark FS 2860</figcaption></figure></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/vallery.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/vallery.jpg" width="600" /></a><figcaption class="wp-caption-text">Vallery</figcaption></figure></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/dirt3_7870.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/dirt3_7870.jpg" width="600" /></a><figcaption class="wp-caption-text">DIRT3 7870HAWK 1920*1080 ALL HIGH 4MSAA</figcaption></figure></p>
<p><figure style="width: 600px" class="wp-caption aligncenter"><a href="https://filecdn.niclau.net/image/blog/2013/03/dirt3_gtx480.jpg"><img decoding="async" class=" " alt="" src="https://filecdn.niclau.net/image/blog/2013/03/dirt3_gtx480.jpg" width="600" /></a><figcaption class="wp-caption-text">DIRT3 GTX480 1920*1080 ALL HIGH 4MSAA</figcaption></figure></p>
<p><strong>总结：</strong></p>
<ol>
<li>开机后进入系统前显卡风扇转速较高，噪音明显；准确来说如果系统没装上显卡驱动，噪音就一直这么大，MSI的工程师脑残了？</li>
<li>游戏玩了下DIRT3、COD9、BF3、NFS17，FPS比GTX480高点（废话），BF3 7870比480好不少，温度与噪音方面完胜GTX480。</li>
</ol><p>The post <a href="https://www.niclau.net/blog/7870hawk.html">迟来的开箱</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/7870hawk.html/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>备份LG Optimus LTE2（F160）基带</title>
		<link>https://www.niclau.net/blog/lte2-baseband-backup.html</link>
					<comments>https://www.niclau.net/blog/lte2-baseband-backup.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sat, 10 Nov 2012 09:01:49 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1186</guid>

					<description><![CDATA[<p>备份LG Optimus LTE2（F160）基带</p>
<p>The post <a href="https://www.niclau.net/blog/lte2-baseband-backup.html">备份LG Optimus LTE2（F160）基带</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>准备工作：</strong></p>
<ol>
<li>LTE2一台、打开USB调试</li>
<li>USB数据线一条</li>
<li>电脑安装上LG驱动</li>
<li>adb工具</li>
</ol>
<p><span id="more-1186"></span></p>
<p>&nbsp;</p>
<p><strong>现在开始</strong>：</p>
<ol>
<li>打开手机USB调试与电脑连接，并且确保电脑正确识别手机，设备管理器中没出现感叹号</li>
<li>以管理员权限打开“命令与提示符”，进入adb目录，依次输入以下命令</li>
</ol>
<pre class="brush: plain; title: ; notranslate">

adb devices    #查看当前已连接设备
adb shell    #进入shell
su    #获取root权限
busybox df -h    #这里是查看分区，能看到那个区是system,boot等
dd if=/dev/block/mmcblk0p1 of=/sdcard/firmware.img    #分区1备份到sdcard中一个叫firmware.img的文件中,这个就是基带分区

</pre>
<p>&nbsp;</p>
<p><strong>PS：</strong><br />
(&#8220;firmware.img&#8221;, &#8220;/dev/block/mmcblk0p1&#8221;);<br />
(&#8220;boot.img&#8221;, &#8220;/dev/block/mmcblk0p7&#8221;);<br />
(&#8220;recovery.img&#8221;, &#8220;/dev/block/mmcblk0p19&#8221;);<br />
(&#8220;system.img&#8221;, &#8220;/dev/block/mmcblk0p14&#8221;);</p>
<p>&nbsp;</p>
<p><strong>PS2：</strong></p>
<p>感谢机锋机友<a href="http://bbs.gfan.com/android-5238958-1-1.html" target="_blank">@无厘头九</a>提供以上信息</p><p>The post <a href="https://www.niclau.net/blog/lte2-baseband-backup.html">备份LG Optimus LTE2（F160）基带</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/lte2-baseband-backup.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>联通2G(GSM)卡用3G(WCDMA)网络</title>
		<link>https://www.niclau.net/blog/unicom-gsm-wcdma.html</link>
					<comments>https://www.niclau.net/blog/unicom-gsm-wcdma.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Wed, 05 Sep 2012 12:10:34 +0000</pubDate>
				<category><![CDATA[其它]]></category>
		<category><![CDATA[WCDMA]]></category>
		<category><![CDATA[联通]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1177</guid>

					<description><![CDATA[<p>前段时间在某QQ群中看到：用联通的GSM卡在不改变套餐的情况下也能使用WCDMA的网络，这个是多么好的事情啊！~</p>
<p>The post <a href="https://www.niclau.net/blog/unicom-gsm-wcdma.html">联通2G(GSM)卡用3G(WCDMA)网络</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>前段时间在某QQ群中看到：用联通的GSM卡在不改变套餐的情况下也能使用WCDMA的网络，这个是多么好的事情啊！~</p>
<p>然后从网络搜索了一下，原来联通早在<a href="http://bbs.dospy.com/thread-10464233-1-266-4.html" target="_blank">2011年初</a>已经把GSM卡开通了WCDMA网络的使用权限（真是后知后觉啊！），真的实现了从2G到3G不换卡、不换号（这貌似是移不动的口号么？），只不过对上下行网速进行了限制：</p>
<p><span id="more-1177"></span></p>
<p>&nbsp;</p>
<p>我实测是限制在60K/S；但也<a href="http://bbs.uc.cn/forum.php?mod=redirect&amp;goto=findpost&amp;ptid=1718140&amp;pid=19515506" target="_blank">有网友反映是120K/S，更有说不限速的</a>。这个我就不清楚原因了。</p>
<p>接下来，当然是找出我的一张130联通SIM卡放进手机中，开机果然顺利用上WCDMA了，网络制式显示为HSPA，实测如下图：</p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/09/gsm-card-hspa.jpg"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/09/gsm-card-hspa.jpg" alt="" width="290" height="514" /></a><a href="https://filecdn.niclau.net/image/blog/2012/09/gsm-card-hspa-speedtest.jpg">  <img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/09/gsm-card-hspa-speedtest.jpg" alt="" width="290" height="517" /></a></p>
<p>怎么说呢，其实日上用来上上Q，看看网页，上上推什么的60K/S也够了，就是相当于512K的ADSL嘛。。。WCDMA相对于EDGE（GSM）我觉得最大的改善是响应该时间快了，EDGE要好几百呢！~</p>
<p>&nbsp;</p>
<p>最后，其实我发这文章的主要目的是刷存在感的说。。。。。</p>
<p>完</p><p>The post <a href="https://www.niclau.net/blog/unicom-gsm-wcdma.html">联通2G(GSM)卡用3G(WCDMA)网络</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/unicom-gsm-wcdma.html/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>为MSI P67A-G45 EFI BIOS添加SLIC2.1表</title>
		<link>https://www.niclau.net/blog/msi-p67-efi-bios-slic.html</link>
					<comments>https://www.niclau.net/blog/msi-p67-efi-bios-slic.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Sat, 12 May 2012 04:06:26 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[SLIC]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1165</guid>

					<description><![CDATA[<p>作用是什么这个大家都懂的，就不说了。</p>
<p>The post <a href="https://www.niclau.net/blog/msi-p67-efi-bios-slic.html">为MSI P67A-G45 EFI BIOS添加SLIC2.1表</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>作用是什么这个大家都懂的，就不说了。</p>
<p>&nbsp;</p>
<p><strong>准备工作：</strong></p>
<ol>
<li>下载<a href="http://download2.msi.com/files/downloads/bos_exe/7673v1I.zip">MSI P67A-G45</a>最新版BIOS，根据txt文本说明此BIOS适用于P67A/S-C45、P67A-G45/43等主板，如果不放心可以用<a href="http://download2.msi.com/files/downloads/uti_exe/LiveUpdate.zip">MSI Live Update</a>下载最新BIOS。</li>
<li>修改BIOS需要用到几个软件：<span style="font-family: Calibri;">PhoenixTool</span> V1.98、AMIBCP V4.53、SLIC ToolKit V3.2。</li>
<li>刷新BIOS可以用MSI主板BIOS中的M-FLASH功能。</li>
</ol>
<p><span id="more-1165"></span></p>
<p><iframe loading="lazy" src="https://skydrive.live.com/embed?cid=AE6349B69D0D5CB6&amp;resid=AE6349B69D0D5CB6%21419&amp;authkey=AC2zhJGi5cQBWzU" frameborder="0" scrolling="no" width="165" height="128"></iframe></p>
<p>&nbsp;</p>
<p><strong>开始改BIOS：</strong></p>
<ol>
<li>运行PhoenixTool，在<strong>Original</strong>（原BIOS）选中刚下载回来的BIOS文件E7673IMS.1I0，途中会弹出2次对话框，都按确定就是了。</li>
<li>在<strong>Manufacturer</strong>（制造商）选中主板的牌子，这里当然选上MSI了。</li>
<li><strong>SLIC File</strong>（SLIC文件）这里选上你喜欢的OEM品牌；我选了DELL。</li>
<li>打开Advanced（高级），<span style="color: #ff0000;">把“Remove manufacturer specific locks”取消掉（不要钩）</span>。<a href="https://filecdn.niclau.net/image/blog/2012/05/PhoenixTool-setting.png"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/05/PhoenixTool-setting.png" alt="" width="499" height="226" /></a></li>
<li>最后点Go，开始修改，时间有点长。。。</li>
<li>顺利加上SLIC表后用AMIBCP打开修改后的E7673IMS_SLIC.1I0，依次进入settings→advanced→integrated peripherals，把右则SLIC Table Controller中的Failsafe、Optimal均改为Enable。（听说这个步聚可以不做）</li>
<li>再次运行PhoenixTool，打开修改后的BIOS E7673IMS_SLIC.1I0，一轮等待后出现下图对话框则说明修改是正确的。（<span style="color: #ff0000;">注：橙色框中的字符会根据所选不同OEM牌子而不同</span>）<a href="https://filecdn.niclau.net/image/blog/2012/05/PhoenixTool-check.png"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/05/PhoenixTool-check.png" alt="" width="250" height="140" /></a></li>
<li>最后把修改后的BIOS刷进主板就行了。</li>
<li><strong>刷新BIOS后可以用SLIC ToolKit V3.2验证SLIC表、OEM证书、序列号的正确性</strong>。</li>
</ol>
<p><a href="https://filecdn.niclau.net/image/blog/2012/05/slic_toolkit_check.png"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/05/slic_toolkit_check.png" alt="" width="500" height="354" /></a></p><p>The post <a href="https://www.niclau.net/blog/msi-p67-efi-bios-slic.html">为MSI P67A-G45 EFI BIOS添加SLIC2.1表</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/msi-p67-efi-bios-slic.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Plextor M3 128G SSD 体验</title>
		<link>https://www.niclau.net/blog/m3-128.html</link>
					<comments>https://www.niclau.net/blog/m3-128.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Tue, 14 Feb 2012 14:17:38 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[Plextor]]></category>
		<category><![CDATA[SSD]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1146</guid>

					<description><![CDATA[<p>在M3性能上我比较满意，但对Plextor在附件上的缩水行为上十分不满！严重坑爹！！</p>
<p>The post <a href="https://www.niclau.net/blog/m3-128.html">Plextor M3 128G SSD 体验</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>本来是打算入M3P 128G的，但想了想写入350M/S（M3P）和210M/S（M3），在日常使用中基本体验不出来，除非天天你都复制粘贴复制粘贴、跑测试&#8230;&#8230; <img src="https://www.niclau.net/blog/wp-includes/images/smilies/mrgreen.png" alt=":mrgreen:" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ，所以还是回归理性买M3好了。</p>
<p>&nbsp;</p>
<p>在M3性能上我比较满意，<strong>但对Plextor在附件上的缩水行为上十分不满！<span style="color: #ff0000;">严重坑爹！！</span></strong></p>
<p><span id="more-1146"></span></p>
<p>包装很简陋，包装盒不是密封的，一边有Plextor的帖纸，另一边可以随意打开，装SSD的防静电袋只是用透明胶粘着。</p>
<p>JS说新到的货都是这样~~~</p>
<p>&nbsp;</p>
<p>本人懒就不拍照了，想看图的见以下两连接：</p>
<p>新包装图见：http://bbs.pceva.com.cn/thread-36403-1-1.html</p>
<p>旧包装图见：http://www.chiphell.com/thread-334455-1-1.html</p>
<p>旧包装中配有：</p>
<ul>
<li><strong>Acronis True Image OEM光盘一张</strong></li>
<li><strong>金属3.5寸支架一个</strong></li>
<li><strong>保修卡和说明书</strong></li>
<li>SSD一只</li>
</ul>
<p>&nbsp;</p>
<p>但我买回来的就只有：</p>
<ul>
<li>绿色3.5寸塑料支架（可以说是废物）</li>
<li>4颗螺丝</li>
<li>SSD一只</li>
</ul>
<p>&nbsp;</p>
<p>那个塑料支架我搞了半小时都不能把SSD完全的装进去，最后放弃了。</p>
<p>先上SMART，通电次数为1，说明是新盘，但还有很多参数未能显示出来：</p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/02/m3-smart.jpg"><img loading="lazy" decoding="async" class="aligncenter" src="https://filecdn.niclau.net/image/blog/2012/02/m3-smart.jpg" alt="" width="500" height="409" /></a></p>
<p>以下测试系统无做任何优化。</p>
<p>在性能方面是不错的啦,如果要说不足就是4K比不上32nm NAND的盘，例如M4，空盘跑分：</p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/02/m3-empty-as.jpg"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/02/m3-empty-as.jpg" alt="" width="290" height="251" /></a>    <a href="https://filecdn.niclau.net/image/blog/2012/02/m3-empty-crystaldiskmark.jpg"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/02/m3-empty-crystaldiskmark.jpg" alt="" width="290" height="263" /></a></p>
<p>&nbsp;</p>
<p>用GHOST把OS从HDD还原到SSD第一分区，然后再复制40G数据到SSD第二分区后跑分：性能基本无区别</p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/02/m3-os-as.jpg"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/02/m3-os-as.jpg" alt="" width="290" height="252" /></a>    <a href="https://filecdn.niclau.net/image/blog/2012/02/m3-os-crystaldiskmark.jpg"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/02/m3-os-crystaldiskmark.jpg" alt="" width="290" height="262" /></a></p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/02/m3-os-atto.jpg"><img loading="lazy" decoding="async" class="alignnone" src="https://filecdn.niclau.net/image/blog/2012/02/m3-os-atto.jpg" alt="" width="400" height="442" /></a></p>
<p>&nbsp;</p>
<p>吐嘈结束，谢谢观赏。</p>
<p>Plextor M3P测试见<a href="http://www.coolaler.com/showthread.php?p=3016295#post3016295">这里</a>。</p>
<p>&nbsp;</p>
<p><span style="color: #ff0000; font-size: medium;"><strong>18日Update：</strong></span></p>
<p>前几天在浦科特的性浪微博吐嘈了一下那个<a href="http://weibo.com/1784199935/y5uNRcfCI">塑料支架的问题</a>，昨天接到浦科特的来电，说会快递一个铁支架给我，今天就到收那个支架了。在这里要赞一下浦科特的售后服务。</p>
<p>来个合照~</p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/02/m3.jpg"><img loading="lazy" decoding="async" class="aligncenter" src="https://filecdn.niclau.net/image/blog/2012/02/m3.jpg" alt="" width="400" height="300" /></a></p>
<p><strong>PS：</strong></p>
<ol>
<li>从开机到进WIN7桌面大约15秒</li>
<li>Firefox冷启秒开感觉不错</li>
<li>进游戏Loading过程短多了</li>
<li>没听到SSD的电流声</li>
</ol><p>The post <a href="https://www.niclau.net/blog/m3-128.html">Plextor M3 128G SSD 体验</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/m3-128.html/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>入手迅捷FW330R，再战OpenWRT</title>
		<link>https://www.niclau.net/blog/fw330r-openwrt.html</link>
					<comments>https://www.niclau.net/blog/fw330r-openwrt.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Mon, 02 Jan 2012 12:15:12 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[FW330R]]></category>
		<category><![CDATA[OpenWrt]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1136</guid>

					<description><![CDATA[<p>迅捷/水星330R V1均是TP-Link 941N V4的马甲，所以我们只要先把941N V4的固件刷进330R，然后刷941N V4的OpenWRT/DD-WRT的固件即可。</p>
<p>The post <a href="https://www.niclau.net/blog/fw330r-openwrt.html">入手迅捷FW330R，再战OpenWRT</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>简单刷机思路：</strong></p>
<p>迅捷/水星330R V1均是TP-Link 941N V4的马甲，所以我们只要先把941N V4的固件刷进330R，然后刷941N V4的OpenWRT/DD-WRT的固件即可。</p>
<p>刷机过程十分简单，都是采用web升级。</p>
<p><span id="more-1136"></span></p>
<p>&nbsp;</p>
<p>具体刷机教程看<strong><a href="http://www.right.com.cn/forum/forum.php?mod=viewthread&amp;tid=70829&amp;page=1#pid395122">这里</a></strong>。</p>
<p><strong>固件备份下载：</strong><br />
<iframe loading="lazy" style="padding: 0pt; background-color: #fcfcfc;" title="Preview" src="https://skydrive.live.com/embed?cid=AE6349B69D0D5CB6&amp;resid=AE6349B69D0D5CB6%21390&amp;authkey=AIJdRpKBH6KBIcE" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="165px" height="128px"></iframe></p>
<p>&nbsp;</p>
<p><a href="https://filecdn.niclau.net/image/blog/2012/01/fw330r-1.jpg"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2012/01/fw330r-1.jpg" alt="" width="600" height="549" /></a></p>
<p>&nbsp;</p>
<p>重点在版本V1<br />
<a href="https://filecdn.niclau.net/image/blog/2012/01/fw330r-2.jpg"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2012/01/fw330r-2.jpg" alt="" width="500" height="375" /></a></p>
<p>&nbsp;</p>
<p>事成后登入OPENWRT，帐号root，密码admin<br />
<a href="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-overview.jpg"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-overview.jpg" alt="" width="600" height="337" /></a></p>
<p>&nbsp;</p>
<p>最正的地方是单WAN多拨，带宽叠加，2M带宽变6M。前提是局端到modem带宽&gt;帐号限制的宽带。<br />
<a href="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-nwan-setting.jpg"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-nwan-setting.jpg" alt="" width="600" height="94" /></a></p>
<p>&nbsp;</p>
<p>多拨成功后能看到3个不同的IP<br />
<a href="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-nwan.jpg"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-nwan.jpg" alt="" width="600" height="175" /></a></p>
<p>&nbsp;</p>
<p>测速！！<br />
<a href="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-nwan-speedtest.jpg"><img loading="lazy" decoding="async" src="https://filecdn.niclau.net/image/blog/2012/01/fw330r-openwrt-nwan-speedtest.jpg" alt="" width="398" height="355" /></a></p>
<p>&nbsp;</p>
<p><strong>不足：</strong></p>
<ul>
<li>UPNP功能不太好使，很多时需要手动设置端口映射</li>
<li>这里并不是真正的均衡负载，带宽叠加只有在P2P或多线程下载中有效</li>
</ul><p>The post <a href="https://www.niclau.net/blog/fw330r-openwrt.html">入手迅捷FW330R，再战OpenWRT</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/fw330r-openwrt.html/feed</wfw:commentRss>
			<slash:comments>17</slash:comments>
		
		
			</item>
		<item>
		<title>博客进入Amazon EC2云端</title>
		<link>https://www.niclau.net/blog/blog-migrate-ec2.html</link>
					<comments>https://www.niclau.net/blog/blog-migrate-ec2.html#comments</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Wed, 28 Dec 2011 13:03:17 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[VPS]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1126</guid>

					<description><![CDATA[<p>之前吐嘈过IXwebhosting的访问速度太慢了，尝试申款退款，然后买burst.net或者ramhost的VPS，但要扣各种的费用，所以搁置了。</p>
<p>The post <a href="https://www.niclau.net/blog/blog-migrate-ec2.html">博客进入Amazon EC2云端</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>之前吐嘈过<a title="IXWebHosting空间折腾记" href="http://www.niclau.net/blog/ixwebhosting-note.html">IXwebhosting的访问速度太慢了</a>，尝试申款退款，然后买burst.net或者ramhost的VPS，但要扣各种的费用，所以搁置了。</p>
<p>后来发现<a href="http://aws.amazon.com/free/">Amzone EC2</a>首年是有限免费使用，由于本人没信用卡，所以用原IXwebhosting合租者之一@ybbtflwwx的信用卡注册了一个EC2下来，一起共用吧。</p>
<p>&nbsp;</p>
<p>EC2有好几个机房：</p>
<p>美国东西部、日本、新加波、欧洲、南非</p>
<p>最后选了日本东京，ping值十分理想在80-120ms之间，但不知什么回事从昨天开始飙升到300-400ms&#8230;&#8230; <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f62f.png" alt="😯" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>&nbsp;</p>
<p>WEB服务部署也是大众化配置：ubuntu+nginx+php+mysql</p><p>The post <a href="https://www.niclau.net/blog/blog-migrate-ec2.html">博客进入Amazon EC2云端</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/blog-migrate-ec2.html/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>nginx配置摘要</title>
		<link>https://www.niclau.net/blog/nginx-conf.html</link>
					<comments>https://www.niclau.net/blog/nginx-conf.html#respond</comments>
		
		<dc:creator><![CDATA[Niclau]]></dc:creator>
		<pubDate>Mon, 05 Dec 2011 12:11:29 +0000</pubDate>
				<category><![CDATA[IT天地]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[StartSSL]]></category>
		<category><![CDATA[菜鸟折腾记]]></category>
		<guid isPermaLink="false">http://niclau.net/blog/?p=1108</guid>

					<description><![CDATA[<p>以下内容算不上什么教程什么的，都是从网络上东凑西凑得来，自己折腾后记录下来，方便日后查找。 server { listen 80; listen 443 ssl; #监听443端口 server_name yourdomain.com www.yourdomain.com; #填上域名 index index.html index.htm index.php; root /var/www/yourdomain.com; #设置站点根目录 #-------SSL证书配置 ssl_certificate /home/ssl/server.crt; ssl_certificate_key /home/ssl/server.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; #-------PHP FastCGI配置 location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /var/www/yourdomain.com$fastcgi_script_name; fastcgi_param HTTPS on; } location &#8230; <a href="https://www.niclau.net/blog/nginx-conf.html" class="more-link">Continue reading <span class="screen-reader-text">nginx配置摘要</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.niclau.net/blog/nginx-conf.html">nginx配置摘要</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>以下内容算不上什么教程什么的，都是从网络上东凑西凑得来，自己折腾后记录下来，方便日后查找。<br />
<span id="more-1108"></span></p>
<pre class="brush: plain; title: ; notranslate">
server
	{
	listen       80;
	listen		 443 ssl;		#监听443端口
	server_name yourdomain.com www.yourdomain.com;		#填上域名
	index index.html index.htm index.php;
	root  /var/www/yourdomain.com;		#设置站点根目录

#-------SSL证书配置
	ssl_certificate         /home/ssl/server.crt;
	ssl_certificate_key     /home/ssl/server.key;
	ssl_session_timeout 5m;

	ssl_protocols SSLv2 SSLv3 TLSv1;
	ssl_ciphers HIGH:!aNULL:!MD5;
	ssl_prefer_server_ciphers   on;

#-------PHP FastCGI配置
	location ~ .php$ {
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME /var/www/yourdomain.com$fastcgi_script_name;
		fastcgi_param   HTTPS on;
	}

	location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
		{
			expires      6h;
		}

	location ~ .*.(js|css)?$
		{
			expires      12h;
		}

	location / {
#-----------只允许FX/Opera/Chrome访问
			if ($http_user_agent !~* &quot;(firefox|opera|chrome)&quot;) {
			return 403;
			}
#-----------防盗链
			valid_referers none blocked *.yourdomain.com;
			if ($invalid_referer) {
			return 403;
			}
		}

#--------wordpress rewrite start---------
	location /blog/
		{
			try_files $uri $uri/ /blog/index.php?q=$uri&amp;$args;
		}
#--------wordpress rewrite end---------

#--------twip rewrite start-----------
	location /DIR1/DIR2/
		{
		if (!-e $request_filename) {
		rewrite ^/DIR1/DIR2/(.*)$ /DIR1/DIR2/index.php last;
		}
	}
#--------twip rewrite end-----------

#--------dabr rewrite start-----------
	location /DIR1/DIR2/ {
        if (!-e $request_filename) {
        rewrite ^/DIR1/DIR2/(.*)$ /DIR1/DIR2/index.php?q=$1 last;
        }
	}
	location /DIR1/DIR2/oauthproxy/ {
		if (!-e $request_filename) {
		rewrite . /DIR1/DIR2/oauthproxy/index.php last;
		}
	}
#--------dabr rewrite end-----------

	log_format  yourdomain.com  '$remote_addr - $remote_user &#x5B;$time_local] $request '
        '$status $body_bytes_sent $http_referer '
        '$http_user_agent $http_x_forwarded_for';
		access_log  /var/www/logs/yourdomain.com.log  yourdomain.com;
	}

</pre>
<p>对于从StartSSL申请的SSL证书还需要做以下步聚——合并证书链，否则浏览器有可能提示证书不受信任。</p>
<pre class="brush: plain; title: ; notranslate">
wget http://cert.startssl.com/certs/sub.class1.server.ca.pem
cat sub.class1.server.ca.pem &gt;&gt; server.crt
</pre>
<p>然后我们用vi OR nano打开合并后的server.crt，找到文本中部</p>
<pre class="brush: plain; title: ; notranslate">
-----END CERTIFICATE----------BEGIN CERTIFICATE-----
#修改为
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
</pre>
<p>至此，nginx的.conf和SSL证书配置完成。接下来我们重新加载nginx。</p>
<pre class="brush: plain; title: ; notranslate">
# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
# nginx -s reload
</pre><p>The post <a href="https://www.niclau.net/blog/nginx-conf.html">nginx配置摘要</a> first appeared on <a href="https://www.niclau.net/blog">Niclau Liu's Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.niclau.net/blog/nginx-conf.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
