<?xml version="1.0" encoding="gb2312"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>windtear 追求完美</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/" />
   <link rel="self" type="application/atom+xml" href="http://windtear.net/atom.xml" />
   <id>tag:windtear.net,2011://3</id>
   <updated>2011-10-25T10:00:40Z</updated>
   <subtitle>计算机技术 网络技术 互联网应用学习研究 Linux Windows IT技术</subtitle>
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.35</generator>

<entry>
   <title>一年没更新了 测试更新</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2011/10/update_test.html" />
   <id>tag:windtear.net,2011://3.1364</id>
   
   <published>2011-10-25T09:19:33Z</published>
   <updated>2011-10-25T10:00:40Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2011/10/update_test.html
update test...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="206" label="test" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2011/10/update_test.html">http://windtear.net/2011/10/update_test.html</a></p>
<p>update test</p>]]>
      
   </content>
</entry>
<entry>
   <title>[BGP] CN asn / China Autonomous System Number 20101028</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2010/10/bgp_cn_asn.html" />
   <id>tag:windtear.net,2010://3.1363</id>
   
   <published>2010-10-28T09:24:57Z</published>
   <updated>2010-10-28T09:31:08Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2010/10/bgp_cn_asn.html
3460 1 20020801 3717 1 20020801 4134 1 20020801 4538 1 20020801 4659 1 19960206 4751 1 20031107 4789 1 19961028 4798 1 19960223 4799 1 19960104 4808 1 19960109 4809 2 19960109 4811 1 19990512 4812 2 19960109 4814...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="网络" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="205" label="BGP" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="173" label="network" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2010/10/bgp_cn_asn.html">http://windtear.net/2010/10/bgp_cn_asn.html</a></p>
<pre>3460	1	20020801
3717	1	20020801
4134	1	20020801
4538	1	20020801
4659	1	19960206
4751	1	20031107
4789	1	19961028
4798	1	19960223
4799	1	19960104
4808	1	19960109
4809	2	19960109
4811	1	19990512
4812	2	19960109
4814	1	19960109
4815	2	19960109
4835	1	20010913
4837	1	20010917
4839	2	20010919
4843	1	20010924
4847	1	19960910
4859	1	19961219
7497	1	19970408
7547	2	19970502
7549	1	19970506
7576	1	19970529
7638	4	19971008
7692	1	19971202
9298	1	20020111
9305	4	19980417
9388	8	19980827
9401	7	19980915
9535	1	20100615
9721	1	20060907
9800	8	20000110
9808	1	20000110
9809	11	20000110
9929	1	20000405
9939	1	20000411
10122	2	20060907
10206	1	20000911
10212	1	20000921
10214	1	20071001
17428	5	20001019
17442	1	20001031
17457	1	20001109
17482	1	20071126
17490	1	20001130
17620	4	20010118
17629	1	20021118
17633	1	20021118
17638	1	20021118
17655	1	20010308
17672	1	20021118
17735	1	20050203
17739	1	20020429
17772	10	20010601
17785	1	20021118
17788	4	20010618
17798	1	20071107
17799	1	20021118
17816	1	20010711
17883	1	20021118
17896	2	20021118
17923	1	20021118
17962	8	20010925
17997	1	20021120
18011	1	20050621
18022	1	20021205
18118	1	20020312
18238	10	20020614
18344	1	20020708
23610	1	20030130
23650	1	20030214
23707	7	20030407
23724	1	20030422
23771	1	20030625
23839	15	20030627
23910	1	20031014
23911	2	20031016
24059	1	20051011
24133	11	20040823
24144	1	20040823
24145	8	20040823
24301	1	20041105
24310	1	20041208
24311	1	20041208
24348	25	20050303
24376	1	20050311
24400	1	20050419
24401	30	20050422
24444	2	20050511
24460	1	20050525
24489	2	20051124
24495	1	20051128
24547	1	20060124
24575	1	20060303
37936	35	20060308
37981	1	20060317
37988	1	20060322
38019	1	20060517
38027	1	20060522
38035	1	20060529
38208	1	20060828
38270	1	20061017
38283	1	20061114
38335	50	20070125
38564	1	20070514
38585	1	20070608
38587	1	20070612
38745	1	20070919
38824	1	20071127
38834	1	20071206
45056	60	20080201
45120	1	20080227
45256	1	20080710
45275	1	20080721
45490	2	20081023
45567	1	20081205
45576	1	20081212
45587	1	20081229
45746	1	20090417
45798	1	20090615
45861	1	20090727
45866	1	20090803
45888	1	20090824
55461	3	20100330
55466	1	20100331
55468	1	20100331
55515	1	20100615
55537	1	20100603
55641	1	20100728
55739	1	20100830
55743	1	20100831
55786	1	20100924
55826	1	20101020
131132	10	20080828
131224	1	20090907 
</pre>]]>
      
   </content>
</entry>
<entry>
   <title>Fedora 8 yum跨版本升级到 Fedora 10 11 13</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2010/06/fedora_8_yum_upgrade_fedora_10_11_13.html" />
   <id>tag:windtear.net,2010://3.1362</id>
   
   <published>2010-06-06T14:49:30Z</published>
   <updated>2010-06-06T15:06:04Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2010/06/fedora_8_yum_upgrade_fedora_10_11_13.html
<![CDATA[前情回顾： Fedora Core 6 yum跨版本升级到 Fedora 8 第一步：Fedora 8 -&gt; Fedora 10 Fedora 10 及之前版本需设置repo为归档目录 fedora-release-10-1.noarch.rpm fedora-release-notes-10.0.0-1.noarch.rpm baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/10/Fedora/i386/os/ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora yum clean all;yum -y upgrade fc9 开始引入 Upstart init yum 升级完毕后 grub.conf title Fedora (2.6.27.5-117.fc10.i686) root (hd0,x) kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686...]]></summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="操作系统" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="175" label="fedora" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="176" label="yum" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2010/06/fedora_8_yum_upgrade_fedora_10_11_13.html">http://windtear.net/2010/06/fedora_8_yum_upgrade_fedora_10_11_13.html</a></p>
<p>前情回顾：<br />
<a href="http://windtear.net/2008/03/fedora_core_6_yum_upgrade_fedora_8.html">Fedora Core 6 yum跨版本升级到 Fedora 8</a></p>

<p>第一步：Fedora 8 -&gt; Fedora 10<br />
Fedora 10 及之前版本需设置repo为归档目录<br />
fedora-release-10-1.noarch.rpm<br />
fedora-release-notes-10.0.0-1.noarch.rpm<br />
baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/10/Fedora/i386/os/<br />
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora<br />
yum clean all;yum -y upgrade</p>

<p>fc9 开始引入 Upstart init<br />
yum 升级完毕后 grub.conf<br />
title  Fedora (2.6.27.5-117.fc10.i686)<br />
root (hd0,x)<br />
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=/<br />
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img</p>

<p><br />
第二步：Fedora 10 -&gt; Fedora 11<br />
因rpmlib变化 需先更新10的 rpm 否则会提示cpio md5不匹配<br />
baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/10/i386/<br />
yum -y update rpm<br />
fedora-release-11-1.noarch.rpm<br />
fedora-release-notes-11.0.0-2.fc11.noarch.rpm<br />
Fedora 11 可以用国内 <a href="http://mirrors.sohu.com">sohu</a> <a href="http://mirrors.163.com">163</a> 的镜像源<br />
这里 fc10 的yum不认 metalink 可修改或忽略</p>

<p>title  Fedora (2.6.29.4-167.fc11.i586)<br />
root (hd0,x)<br />
kernel /boot/vmlinuz-2.6.29.4-167.fc11.i586 ro root=LABEL=/<br />
initrd /boot/initrd-2.6.29.4-167.fc11.i586.img</p>

<p><br />
第三步：Fedora 11 -&gt; Fedora 13<br />
因rpm压缩支持变化 需先更新11的 rpm<br />
yum -y update rpm<br />
fedora-release-13-1.noarch.rpm<br />
fedora-release-notes-13-3.fc13.noarch.rpm</p>

<p>title  Fedora (2.6.33.3-85.fc13.i686)<br />
root (hd0,x)<br />
kernel /boot/vmlinuz-2.6.33.3-85.fc13.i686 ro root=LABEL=/<br />
initrd /boot/initrd-2.6.33.3-85.fc13.i686.img</p>

<p>如果系统太混乱 可先 yum groupupdate Base 再分组更新<br />
<a href="http://fedoraproject.org/wiki/YumUpgradeFaq">http://fedoraproject.org/wiki/YumUpgradeFaq</a></p>

<p>顺便提一下 wpa_supplicant 的init顺序需调前</p>]]>
      
   </content>
</entry>
<entry>
   <title>3G攻略 中国联通 186 WCDMA 套餐查话费 HSDPA高速上网</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2009/12/chinaunicom_3g_186_wcdma.html" />
   <id>tag:windtear.net,2009://3.1361</id>
   
   <published>2009-12-19T14:58:08Z</published>
   <updated>2009-12-19T15:00:11Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2009/12/chinaunicom_3g_186_wcdma.html
运营商整合之后6家运营商变为3家 中国联通 含前中国网通固话和前中国联通的GSM网 客服号10010 3G号段为186 WCDMA 沃 中国移动 含前中国移动和前中国铁通固话 客服号10086 3G号段为188 TD-SCDMA G3 中国电信 含前中国电信固话和前中国联通的CDMA网 客服号10000 3G号段为189 CDMA2000 天翼 本文介绍windtear对中国联通3G的使用体会 186 沃 96元套餐含300M上网流量 240分钟通话 不分长话市话漫游 客服号10010 支持 wcdma 的手机较多 如目前比较火的 iphone Google G1/G3 nokia e72等 上网攻略： 接入点 *99# 用户名3gnet 密码3gnet...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="203" label="3g" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="101" label="联通" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2009/12/chinaunicom_3g_186_wcdma.html">http://windtear.net/2009/12/chinaunicom_3g_186_wcdma.html</a></p>
<p>运营商整合之后6家运营商变为3家<br />
中国联通 含前中国网通固话和前中国联通的GSM网 客服号10010 3G号段为186 WCDMA 沃<br />
中国移动 含前中国移动和前中国铁通固话 客服号10086 3G号段为188 TD-SCDMA G3<br />
中国电信 含前中国电信固话和前中国联通的CDMA网 客服号10000 3G号段为189 CDMA2000 天翼</p>

<p>本文介绍windtear对中国联通3G的使用体会<br />
186 沃 96元套餐含300M上网流量 240分钟通话 不分长话市话漫游 客服号10010<br />
支持 wcdma 的手机较多 如目前比较火的 iphone Google G1/G3 nokia e72等</p>

<p>上网攻略：<br />
接入点 *99#<br />
用户名3gnet 密码3gnet<br />
用户名uninet 密码uninet<br />
用户名3gwap 密码3gwap<br />
用户名uniwap 密码uniwap</p>

<p>3.5G HSDPA 上网 速度10.2Mbps 或者宣称的 7.2Mbps</p>

<p>套餐查话费攻略：<br />
查话费网站 http://www.10010.com/<br />
先获取服务密码 (选忘记密码 查看手机收到的短信中的4位数字 设置服务密码）<br />
登录网站可以查详单 话费 网络流量 如：<br />
帐单查询 - 手机上网流量  会列出已使用的收费流量<br />
详单查询 - 通话详单 可以每次查询7天的详单<br />
如果想知道剩余时长可以由详单去除被叫 去除拨打10010等免费电话 累加即为已使用的通话时长 240减去该数值得到剩余时长</p>

<p>获得通话剩余时长还可以通过短信的方式<br />
发送短信 TCYL 到 1065580123  (注意： 本方法据说按返回的短信收费 据说需要1元钱)<br />
由于要花钱 所以还是建议通过网站详单累加 或者通过手机自带的通话记录中-通话时间-已拨电话估算<br />
windtear 建议通过 excel 处理网站数据 windtear 还建议通过编写程序自动处理10010网站数据<br />
10010网站通话时长那一栏的数据格式为 xx秒 或 xx分xx秒 呼叫类型为主叫 被叫<br />
中国移动提供了诸如 CXBX CXGFX CXGTC CXIP1000 等短信代码接口 中国联通不提供<br />
</p>]]>
      
   </content>
</entry>
<entry>
   <title>京东商城严重欺诈消费者 京东商城缺乏最基本的商业道德 祝京东商城早日倒闭</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2009/12/jingdong_360buy_cheat_customer.html" />
   <id>tag:windtear.net,2009://3.1360</id>
   
   <published>2009-12-12T10:03:26Z</published>
   <updated>2009-12-12T11:45:30Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2009/12/jingdong_360buy_cheat_customer.html
本人亲身经历 实在气不过京东商城能如此无耻。 严重欺诈消费者的京东商城肯定会倒闭的！ 摘要： 从京东商城买了一部nokia手机 无法开机 申请换货 京东商城15天后把手机发回来 说手机没问题 不给换货 事实上手机仍无法开机 发回来之前京东商城客服联系说如果我同意就把原手机送回来 如果我不同意就放在那 什么时候同意了再联系他们 然后让我随便找315 (这些都是客服原话) 手机送回来后去nokia官方客服 nokia官方检测结论需要返厂修 京东商城欺诈消费者的地方： 1. 手机明明有问题 说没问题 拖15天发回来 (详细时间附后) 这里面有两个可能 1.1. 京东商城根本没做检测 放了15天发回来 1.2. 检测了 也说有问题 15天后发回来 nokia也不给出检测报告了 2. 我申请的换货 京东商城系统里给我改成了返修 打客服电话 客服开始说可能我选错了 我说没选错 我有截图...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="202" label="360buy" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="201" label="京东" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2009/12/jingdong_360buy_cheat_customer.html">http://windtear.net/2009/12/jingdong_360buy_cheat_customer.html</a></p>
<p>本人亲身经历 实在气不过京东商城能如此无耻。 严重欺诈消费者的京东商城肯定会倒闭的！</p>

<p>摘要：<br />
从京东商城买了一部nokia手机 无法开机 申请换货<br />
京东商城15天后把手机发回来 说手机没问题 不给换货 事实上手机仍无法开机<br />
发回来之前京东商城客服联系说如果我同意就把原手机送回来 如果我不同意就放在那 什么时候同意了再联系他们 然后让我随便找315 (这些都是客服原话)<br />
手机送回来后去nokia官方客服 nokia官方检测结论需要返厂修</p>

<p>京东商城欺诈消费者的地方：<br />
1. 手机明明有问题 说没问题 拖15天发回来 (详细时间附后)<br />
   这里面有两个可能<br />
   1.1. 京东商城根本没做检测 放了15天发回来<br />
   1.2. 检测了 也说有问题 15天后发回来 nokia也不给出检测报告了<br />
2. 我申请的换货 京东商城系统里给我改成了返修<br />
   打客服电话 客服开始说可能我选错了 我说没选错 我有截图 然后客服又说那可能是系统问题 没人能改这个东西<br />
3. 拖时间 申请换货期间打过几次客服电话 客服说12月3号就看到结果了 拖到12月10号过了15天才联系发给我</p>

<p>附详细时间：<br />
京东:<br />
订单跟踪<br />
2009-11-25 14:45	配送员已经从站点出发,请您准备收货<br />
返修跟踪<br />
2009-11-25 15:10 (发现不能开机 直接申请换货)	提交申请成功<br />
2009-11-26 18:51	>站点全单退货,原因：售后取货返回<br />
2009-11-28 15:15	商品已经收到且登记检测完毕,请等待处理<br />
2009-12-03 13:?? (客服说内部显示处理完毕 可开机)<br />
2009-12-10 11:21 (客服联系说前面提到没问题的话 发回来)	返修已结束，希望我们的服务能令您满意！<br />
2009-12-11 13:15 (拿到手)</p>

<p>nokia:<br />
2009-12-12 15:17 开始nokia官方维修 结论：需要返厂修</p>

<p>结论：<br />
京东商城严重欺诈消费者 京东商城缺乏最基本的商业道德 祝京东商城早日倒闭</p>

<p>感谢很多同事朋友在此期间给我的帮助和建议<br />
</p>]]>
      
   </content>
</entry>
<entry>
   <title>2009年最新版个人所得税计算器2 (7月后有效 基数11178 失业0.2%)</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html" />
   <id>tag:windtear.net,2009://3.1359</id>
   
   <published>2009-10-20T11:13:30Z</published>
   <updated>2009-10-20T11:23:59Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html
2009年最新版个人所得税计算器2 (7月后有效 基数11178 失业0.2%) 输入 税前工资 或 应付工资 其他自动算出来显示 税前工资： * 应付工资： * (等于税前工资减去三险一金) 公积金比例： 8% 10% 12% 所得税： 税后工资： (实际到手的净收入) 养老保险： (每年4月份调整：按8%算 ) 医疗保险： (每年3月份调整：按2%算 包括3元互助) 公积金： (每年7月份调整：按12%算 供参考 以前是10% 8%) 失业保险： (每年4月份调整：按0.2%算) 税率： 调节数： 转载请注明出处 http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html 过去几年的个人所得税计算器： 2009年最新版个人所得税计算器1...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="152" label="个人所得税" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="153" label="计算器" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html">http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html</a></p>
<pre>2009年最新版个人所得税计算器2 (7月后有效 基数11178 失业0.2%)

<p>输入 税前工资 或 应付工资 其他自动算出来显示</p>

<p>税前工资： <input id="beforeSalary" name="beforeSalary" type=text value="" onkeyup="return calcTax(2);" onchange="return calcTax(2);"> *<br />
应付工资： <input id="shouldSalary" name="shouldSalary" type=text value="" onkeyup="return calcTax(1);" onchange="return calcTax(1);"> * (等于税前工资减去三险一金)<br />
公积金比例： <input id="gjjratio1" name="gjjratio" type="radio" value="8" onclick="return calcTax(2);">8% <input id="gjjratio2" name="gjjratio" type="radio" value="10" onclick="return calcTax(2);">10% <input id="gjjratio3" name="gjjratio" type="radio" value="12" onclick="return calcTax(2);" checked>12%<br />
所得税：   <input id="tax" name="tax" type=text><br />
税后工资： <input id="resultSalary" name="resultSalary" type=text> (实际到手的净收入)</p>

<p>养老保险： <input id="yanglao" name="yanglao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按8%算 )<br />
医疗保险： <input id="yibao" name="yibao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年3月份调整</a>：按2%算 包括3元互助)<br />
公积金：   <input id="gongjijin" name="gongjijin" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年7月份调整</a>：按12%算 供参考 以前是10% 8%)<br />
失业保险： <input id="shiye" name="shiye" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按0.2%算)<br />
税率：     <input id="taxRatio" name="taxRatio" type=text><br />
调节数：   <input id="taxAdjust" name="taxAdjust" type=text><br />
<input type=submit value="计算" onclick="return calcTax();"></p>

<p>转载请注明出处 <a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html">http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html</a><br />
过去几年的个人所得税计算器：<br />
<a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html">2009年最新版个人所得税计算器1 (7月后有效 基数11178 失业0.2%)</a><br />
<a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html">2009年最新版个人所得税计算器1 (7月前有效 基数9966 失业0.2%)</a><br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html">2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后)</a><br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前)</a><br />
<a href="http://windtear.net/2008/02/personal_income_tax_calculator_2008v1.html">2008年最新版个人所得税计算器1 (3月后有效 起征点调整为2000元后)</a><br />
<a href="http://windtear.net/archives/2007/08/01/001262.html">2007最新版个人所得税计算器2 (7月后有效 社保公积金调整后)</a><br />
<a href="http://windtear.net/archives/2007/05/16/001233.html">2007最新版个人所得税计算器1 (7月前有效 社保调整后 公积金调整前)</a><br />
<a href="http://windtear.net/archives/2006/01/04/000876.html">2006最新版个人所得税计算器</a><br />
<a href="http://windtear.net/archives/2005/10/15/000798.html">2005个人所得税计算器</a></p>

<p><script type="text/javascript"><!--<br />
function calcTax(a) {<br />
switch (a) {<br />
	case 1:<br />
	var shouldSalary=parseFloat(document.getElementById("shouldSalary").value);<br />
	if (shouldSalary>0) {<br />
	document.getElementById("beforeSalary").value="";<br />
	document.getElementById("yanglao").value="";<br />
	document.getElementById("yibao").value="";<br />
	document.getElementById("gongjijin").value="";<br />
	document.getElementById("shiye").value="";<br />
	}<br />
	break;<br />
	case 2:<br />
	var beforeSalary=parseFloat(document.getElementById("beforeSalary").value);<br />
	if (beforeSalary>=11178) {<br />
		var yanglao=721.92;<br />
		var yibao=183.48;<br />
		var gongjijin=1341;<br />
		if(document.getElementById("gjjratio1").checked==true) { gongjijin = 894; }<br />
		else if(document.getElementById("gjjratio2").checked==true) { gongjijin = 1118; }<br />
		var windtear=1;<br />
		var shiye=18.05;<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	} else {<br />
		var yanglao=parseFloat(beforeSalary*0.08).toFixed(2);<br />
		if (yanglao>721.92) { yanglao=721.92; }<br />
		var yibao=parseFloat(beforeSalary*0.02+3).toFixed(2);<br />
		if (yibao>183.48) { yibao=183.48; }<br />
		var gongjijin=parseFloat(beforeSalary*0.12).toFixed(0);<br />
		if (document.getElementById("gjjratio1").checked==true) { gongjijin = parseFloat(beforeSalary*0.08).toFixed(0); }<br />
		else if (document.getElementById("gjjratio2").checked==true) { gongjijin = parseFloat(beforeSalary*0.1).toFixed(0); }<br />
		var windtear=1;<br />
		var shiye=parseFloat(beforeSalary*0.002).toFixed(2);<br />
		if (shiye>18.05) { shiye=18.05; }<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	}<br />
	if (shouldSalary>0) {<br />
	document.getElementById("shouldSalary").value=shouldSalary;<br />
	document.getElementById("yanglao").value=yanglao;<br />
	document.getElementById("yibao").value=yibao;<br />
	document.getElementById("gongjijin").value=gongjijin;<br />
	document.getElementById("shiye").value=shiye;<br />
	}<br />
	break;			<br />
}</p>

<p>if (shouldSalary>0) {<br />
var taxSalary=(shouldSalary-2000);<br />
var taxRatio=0;<br />
var taxAdjust=0;</p>

<p>if (taxSalary<=0) {taxRatio=0;taxAdjust=0;}<br />
else if (taxSalary>0&&taxSalary<=500) {taxRatio=0.05;taxAdjust=0;}<br />
else if (taxSalary>500&&taxSalary<=2000) {taxRatio=0.10;taxAdjust=25;}<br />
else if (taxSalary>2000&&taxSalary<=5000) {taxRatio=0.15;taxAdjust=125;}<br />
else if (taxSalary>5000&&taxSalary<=20000) {taxRatio=0.20;taxAdjust=375;}<br />
else if (taxSalary>20000&&taxSalary<=40000) {taxRatio=0.25;taxAdjust=1375;}<br />
else if (taxSalary>40000&&taxSalary<=60000) {taxRatio=0.30;taxAdjust=3375;}<br />
else if (taxSalary>60000&&taxSalary<=80000) {taxRatio=0.35;taxAdjust=6375;}<br />
else if (taxSalary>80000&&taxSalary<=100000) {taxRatio=0.40;taxAdjust=10375;}<br />
else if (taxSalary>100000) {taxRatio=0.45;taxAdjust=15375;}<br />
var tax=parseFloat(taxSalary*taxRatio-taxAdjust).toFixed(2);</p>

<p>var resultSalary=parseFloat(shouldSalary-tax).toFixed(2);</p>

<p>document.getElementById("taxRatio").value=taxRatio;<br />
document.getElementById("taxAdjust").value=taxAdjust;<br />
document.getElementById("tax").value=tax;<br />
document.getElementById("resultSalary").value=resultSalary;<br />
}<br />
}<br />
document.getElementById("beforeSalary").focus()<br />
// --></script><br />
</pre></p>]]>
      
   </content>
</entry>
<entry>
   <title>2009年最新版个人所得税计算器1 (7月前有效 基数9966 失业0.2%)</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html" />
   <id>tag:windtear.net,2009://3.1358</id>
   
   <published>2009-10-20T11:00:49Z</published>
   <updated>2009-10-20T11:22:55Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html
2009年最新版个人所得税计算器1 (7月前有效 基数9966 失业0.2%) 输入 税前工资 或 应付工资 其他自动算出来显示 税前工资： * 应付工资： * (等于税前工资减去三险一金) 公积金比例： 8% 10% 12% 所得税： 税后工资： (实际到手的净收入) 养老保险： (每年4月份调整：按8%算 ) 医疗保险： (每年3月份调整：按2%算 包括3元互助) 公积金： (每年7月份调整：按12%算 供参考 以前是10% 8%) 失业保险： (每年4月份调整：按0.2%算) 税率： 调节数： 转载请注明出处 http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html 过去几年的个人所得税计算器： 2009年最新版个人所得税计算器1...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="152" label="个人所得税" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="153" label="计算器" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html">http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html</a></p>
<pre>2009年最新版个人所得税计算器1 (7月前有效 基数9966 失业0.2%)

<p>输入 税前工资 或 应付工资 其他自动算出来显示</p>

<p>税前工资： <input id="beforeSalary" name="beforeSalary" type=text value="" onkeyup="return calcTax(2);" onchange="return calcTax(2);"> *<br />
应付工资： <input id="shouldSalary" name="shouldSalary" type=text value="" onkeyup="return calcTax(1);" onchange="return calcTax(1);"> * (等于税前工资减去三险一金)<br />
公积金比例： <input id="gjjratio1" name="gjjratio" type="radio" value="8" onclick="return calcTax(2);">8% <input id="gjjratio2" name="gjjratio" type="radio" value="10" onclick="return calcTax(2);">10% <input id="gjjratio3" name="gjjratio" type="radio" value="12" onclick="return calcTax(2);" checked>12%<br />
所得税：   <input id="tax" name="tax" type=text><br />
税后工资： <input id="resultSalary" name="resultSalary" type=text> (实际到手的净收入)</p>

<p>养老保险： <input id="yanglao" name="yanglao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按8%算 )<br />
医疗保险： <input id="yibao" name="yibao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年3月份调整</a>：按2%算 包括3元互助)<br />
公积金：   <input id="gongjijin" name="gongjijin" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年7月份调整</a>：按12%算 供参考 以前是10% 8%)<br />
失业保险： <input id="shiye" name="shiye" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按0.2%算)<br />
税率：     <input id="taxRatio" name="taxRatio" type=text><br />
调节数：   <input id="taxAdjust" name="taxAdjust" type=text><br />
<input type=submit value="计算" onclick="return calcTax();"></p>

<p>转载请注明出处 <a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html">http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html</a><br />
过去几年的个人所得税计算器：<br />
<a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v2.html">2009年最新版个人所得税计算器1 (7月后有效 基数11178 失业0.2%)</a><br />
<a href="http://windtear.net/2009/10/personal_income_tax_calculator_2009v1.html">2009年最新版个人所得税计算器1 (7月前有效 基数9966 失业0.2%)</a><br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html">2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后)</a><br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前)</a><br />
<a href="http://windtear.net/2008/02/personal_income_tax_calculator_2008v1.html">2008年最新版个人所得税计算器1 (3月后有效 起征点调整为2000元后)</a><br />
<a href="http://windtear.net/archives/2007/08/01/001262.html">2007最新版个人所得税计算器2 (7月后有效 社保公积金调整后)</a><br />
<a href="http://windtear.net/archives/2007/05/16/001233.html">2007最新版个人所得税计算器1 (7月前有效 社保调整后 公积金调整前)</a><br />
<a href="http://windtear.net/archives/2006/01/04/000876.html">2006最新版个人所得税计算器</a><br />
<a href="http://windtear.net/archives/2005/10/15/000798.html">2005个人所得税计算器</a></p>

<p><script type="text/javascript"><!--<br />
function calcTax(a) {<br />
switch (a) {<br />
	case 1:<br />
	var shouldSalary=parseFloat(document.getElementById("shouldSalary").value);<br />
	if (shouldSalary>0) {<br />
	document.getElementById("beforeSalary").value="";<br />
	document.getElementById("yanglao").value="";<br />
	document.getElementById("yibao").value="";<br />
	document.getElementById("gongjijin").value="";<br />
	document.getElementById("shiye").value="";<br />
	}<br />
	break;<br />
	case 2:<br />
	var beforeSalary=parseFloat(document.getElementById("beforeSalary").value);<br />
	if (beforeSalary>=9966) {<br />
		var yanglao=721.92;<br />
		var yibao=183.48;<br />
		var gongjijin=1196;<br />
		if(document.getElementById("gjjratio1").checked==true) { gongjijin = 797; }<br />
		else if(document.getElementById("gjjratio2").checked==true) { gongjijin = 997; }<br />
		var windtear=1;<br />
		var shiye=18.05;<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	} else {<br />
		var yanglao=parseFloat(beforeSalary*0.08).toFixed(2);<br />
		if (yanglao>721.92) { yanglao=721.92; }<br />
		var yibao=parseFloat(beforeSalary*0.02+3).toFixed(2);<br />
		if (yibao>183.48) { yibao=183.48; }<br />
		var gongjijin=parseFloat(beforeSalary*0.12).toFixed(0);<br />
		if (document.getElementById("gjjratio1").checked==true) { gongjijin = parseFloat(beforeSalary*0.08).toFixed(0); }<br />
		else if (document.getElementById("gjjratio2").checked==true) { gongjijin = parseFloat(beforeSalary*0.1).toFixed(0); }<br />
		var windtear=1;<br />
		var shiye=parseFloat(beforeSalary*0.002).toFixed(2);<br />
		if (shiye>18.05) { shiye=18.05; }<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	}<br />
	if (shouldSalary>0) {<br />
	document.getElementById("shouldSalary").value=shouldSalary;<br />
	document.getElementById("yanglao").value=yanglao;<br />
	document.getElementById("yibao").value=yibao;<br />
	document.getElementById("gongjijin").value=gongjijin;<br />
	document.getElementById("shiye").value=shiye;<br />
	}<br />
	break;			<br />
}</p>

<p>if (shouldSalary>0) {<br />
var taxSalary=(shouldSalary-2000);<br />
var taxRatio=0;<br />
var taxAdjust=0;</p>

<p>if (taxSalary<=0) {taxRatio=0;taxAdjust=0;}<br />
else if (taxSalary>0&&taxSalary<=500) {taxRatio=0.05;taxAdjust=0;}<br />
else if (taxSalary>500&&taxSalary<=2000) {taxRatio=0.10;taxAdjust=25;}<br />
else if (taxSalary>2000&&taxSalary<=5000) {taxRatio=0.15;taxAdjust=125;}<br />
else if (taxSalary>5000&&taxSalary<=20000) {taxRatio=0.20;taxAdjust=375;}<br />
else if (taxSalary>20000&&taxSalary<=40000) {taxRatio=0.25;taxAdjust=1375;}<br />
else if (taxSalary>40000&&taxSalary<=60000) {taxRatio=0.30;taxAdjust=3375;}<br />
else if (taxSalary>60000&&taxSalary<=80000) {taxRatio=0.35;taxAdjust=6375;}<br />
else if (taxSalary>80000&&taxSalary<=100000) {taxRatio=0.40;taxAdjust=10375;}<br />
else if (taxSalary>100000) {taxRatio=0.45;taxAdjust=15375;}<br />
var tax=parseFloat(taxSalary*taxRatio-taxAdjust).toFixed(2);</p>

<p>var resultSalary=parseFloat(shouldSalary-tax).toFixed(2);</p>

<p>document.getElementById("taxRatio").value=taxRatio;<br />
document.getElementById("taxAdjust").value=taxAdjust;<br />
document.getElementById("tax").value=tax;<br />
document.getElementById("resultSalary").value=resultSalary;<br />
}<br />
}<br />
document.getElementById("beforeSalary").focus()<br />
// --></script><br />
</pre></p>]]>
      
   </content>
</entry>
<entry>
   <title>用 iptables 解决某些时候抢先应答的 RST 造成的异常中断： 忽略RESET 保证数据畅通</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2009/10/iptables_drop_reset.html" />
   <id>tag:windtear.net,2009://3.1357</id>
   
   <published>2009-10-11T14:36:29Z</published>
   <updated>2009-10-11T16:15:19Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2009/10/iptables_drop_reset.html
一个真实的例子 由于可能触发了什么东西 A到B的数据交互会被一个抢先的RST回应干扰 简单解决是忽略这种类型的全部 RST 包 iptables -I INPUT -p tcp --tcp-flags SYN,FIN,RST,URG,PSH RST -j DROP pkts bytes target prot opt in out source destination 0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x2F/0x04 顺便复习备忘下 1 SYN 14+20+20+20(options)...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="安全" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="操作系统" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="互联网" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="软件" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="网络" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="200" label="iptables" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2009/10/iptables_drop_reset.html">http://windtear.net/2009/10/iptables_drop_reset.html</a></p>
<pre>一个真实的例子 由于可能触发了什么东西 A到B的数据交互会被一个抢先的RST回应干扰
简单解决是忽略这种类型的全部 RST 包
iptables -I INPUT -p tcp --tcp-flags SYN,FIN,RST,URG,PSH RST -j DROP

<p> pkts bytes target     prot opt in     out     source               destination         <br />
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x2F/0x04</p>

<p>顺便复习备忘下</p>

<p>1 SYN<br />
	14+20+20+20(options)<br />
eth	6+6+2 dstmac+srcmac+0800<br />
ip	45+ds+2ip.len(60)+2ip.id+flags(DF 0x04).2frag_offset+ttl+proto tcp 06+2checksum+src+dst<br />
tcp	2srcport+dstport+4seq+4+1hdr_len+1flags(0x02syn 04rst 10ack)+2window+2checksum+2+options<br />
options	4mss+2sack(04 02)+10timestamp+1nop+7window_scale<br />
seq=0 mss=1460	04c751df</p>

<p>2 SYN+ACK	<br />
tcp	<br />
seq=0 ack=1 len=0	0540780e 04c751e0<br />
1flags(0x12 syn+ack)</p>

<p>3 ACK<br />
tcp	20+12(1nop+1nop+10timestamp)<br />
1flags(0x10 ack)<br />
seq=1 ack=1	04c751e0 	0540780f</p>

<p>4 PSH+ACK<br />
ip	ip.len=169<br />
tcp	len=117<br />
seq=1(next118 169-20-32=117) 04c751e0 0540780f<br />
1flags(0x18 psh+ack)	tcp segment data=117</p>

<p>5 RST<br />
ip	2ip.len(52)	flags(DF 0x00)<br />
tcp<br />
seq=1	0540780f ack(04c75255)<br />
flags(0x04 RST ack not set)</p>

<p>6 ACK<br />
tcp<br />
seq=1 ack=118<br />
1flags(0x10 ack)</p>

<p>7 RST<br />
ip	2ip.len(40)	flags(DF 0x04)<br />
tcp	seq=118	04c75255 ack(00000000)<br />
flags(0x04 RST)</p>

<p><br />
1 2 3 syn syn+ack ack<br />
4 PSH+ACK (GET ...)<br />
6 ACK<br />
由于5 抢先 RESET 只好 7 RESET</p>

<p><br />
解决：<br />
忽略异常RESET包  (不包括端口未开放的RST+ACK)<br />
iptables -I INPUT -p tcp --tcp-flags SYN,FIN,RST,URG,PSH RST -j DROP<br />
 pkts bytes target     prot opt in     out     source               destination         <br />
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x2F/0x04<br />
</pre></p>]]>
      
   </content>
</entry>
<entry>
   <title>pac 代理脚本与 IE Firefox Chrome 浏览器</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/10/proxy_pac_ie_firefox_chrome.html" />
   <id>tag:windtear.net,2008://3.1356</id>
   
   <published>2008-10-18T11:10:17Z</published>
   <updated>2008-10-18T13:15:33Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/10/proxy_pac_ie_firefox_chrome.html
ipcn 提供 pac 代理服务 需要认证 然后发现来自&quot;WinHttp-Autoproxy-Service/5.1&quot; 请求 .pac 特别多 也不含压缩头 Google 了下发现 http://code.google.com/p/chromium/issues/detail?id=1684 http://msdn.microsoft.com/en-us/library/aa383153(VS.85).aspx 说是调用WinHttpGetProxyForUrl时把fAutoLogonIfChallenged设成false就没事了 WinHTTP AutoProxy 由于设的是 true 所以每次都去请求:( 然后又观察了 IE Firefox Chrome 等处理 pac 的情况 IE GET pac 不带压缩头 带原始的 User-Agent： User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Win32) User-Agent:...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="浏览器" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="199" label="pac" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="36" label="proxy" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/10/proxy_pac_ie_firefox_chrome.html">http://windtear.net/2008/10/proxy_pac_ie_firefox_chrome.html</a></p>
<p><a href="http://proxy.ipcn.org/">ipcn</a> 提供 pac 代理服务  需要认证<br />
然后发现来自"WinHttp-Autoproxy-Service/5.1" 请求 .pac 特别多 也不含压缩头</p>

<p>Google 了下发现<br />
<a href="http://code.google.com/p/chromium/issues/detail?id=1684">http://code.google.com/p/chromium/issues/detail?id=1684</a><br />
<a href="http://msdn.microsoft.com/en-us/library/aa383153(VS.85).aspx">http://msdn.microsoft.com/en-us/library/aa383153(VS.85).aspx</a><br />
说是调用WinHttpGetProxyForUrl时把fAutoLogonIfChallenged设成false就没事了<br />
WinHTTP AutoProxy 由于设的是 true 所以每次都去请求:(</p>

<p>然后又观察了 IE Firefox Chrome 等处理 pac 的情况<br />
IE GET pac 不带压缩头 带原始的 User-Agent：<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Win32)<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Win32)<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)<br />
还有 Accept: */*  和 Cookie 之前如果已cache的话 还会带上 If-Modified-Since</p>

<p>Firefox 带的头很全 包括压缩头 Accept-Encoding: gzip,deflate 和 no-cache</p>

<p>Google Chrome 比较懒 不带压缩头 连 User-Agent 头都没有</p>

<p>pac 代理脚本这块可以用一些小技巧 比如<br />
function FindProxyForURL(url, host)<br />
if - else if - else<br />
var lchost = host.toLowerCase();<br />
var lcurl = url.toLowerCase();<br />
(url.substring(0, 4) != "http")<br />
isPlainHostName(host)<br />
dnsDomainIs(host,".cn")<br />
!isResolvable(host)<br />
rip = dnsResolve(host);<br />
isInNet(rip,"192.168.0.0","255.255.0.0")<br />
(shExpMatch(host, "*sixxs.org"))<br />
return "PROXY test.proxy.ipcn.org:3128; DIRECT";<br />
详见 Netscape 的帮助 proxy-live.html<br />
关于 MIME type 推荐的是 application/x-ns-proxy-autoconfig 不过 text/plain 也都干活</p>

<p>遇到的问题有：<br />
如果pac下载不全 每次调用 isInNet(host, ...) 都会发起dns查询 改成rip就好了<br />
Vista Win2003 的 WinHTTP AutoProxy 服务会每个请求都去刷 pac<br />
Web Proxy Auto-Discovery (WPAD) protocol： (/wpad.dat)<br />
DHCP option 252<br />
option wpad code 252 = text;<br />
option wpad "http://192.168.1.1/proxy.pac";</p>

<p>Redirect /wpad.dat http://192.168.1.1/proxy.pac</p>

<p>代理过程：<br />
需认证的话 第一次返回 407(ERR_CACHE_ACCESS_DENIED)<br />
给出 Proxy-Authenticate: Basic realm="ipcn proxy server"<br />
认证通过后 如果不允许返回 403(ERR_ACCESS_DENIED)<br />
如果允许则以后带上 Proxy-Authorization: Basic ... 头正常使用代理<br />
</p>]]>
      
   </content>
</entry>
<entry>
   <title>2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后)</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html" />
   <id>tag:windtear.net,2008://3.1355</id>
   
   <published>2008-08-19T05:29:27Z</published>
   <updated>2008-08-19T05:37:39Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html
2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后) 输入 税前工资 或 应付工资 其他自动算出来显示 税前工资： * 应付工资： * (等于税前工资减去三险一金) 公积金比例： 8% 10% 12% 所得税： 税后工资： (实际到手的净收入) 养老保险： (每年4月份调整：按8%算 ) 医疗保险： (每年3月份调整：按2%算 包括3元互助) 公积金： (每年7月份调整：按12%算 供参考 以前是10% 8%) 失业保险： (每年4月份调整：按0.5%算) 税率： 调节数： 转载请注明出处 http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html 过去几年的个人所得税计算器：...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="152" label="个人所得税" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="153" label="计算器" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html">http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html</a></p>
<pre>2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后)

<p>输入 税前工资 或 应付工资 其他自动算出来显示</p>

<p>税前工资： <input id="beforeSalary" name="beforeSalary" type=text value="" onkeyup="return calcTax(2);" onchange="return calcTax(2);"> *<br />
应付工资： <input id="shouldSalary" name="shouldSalary" type=text value="" onkeyup="return calcTax(1);" onchange="return calcTax(1);"> * (等于税前工资减去三险一金)<br />
公积金比例： <input id="gjjratio1" name="gjjratio" type="radio" value="8" onclick="return calcTax(2);">8% <input id="gjjratio2" name="gjjratio" type="radio" value="10" onclick="return calcTax(2);">10% <input id="gjjratio3" name="gjjratio" type="radio" value="12" onclick="return calcTax(2);" checked>12%<br />
所得税：   <input id="tax" name="tax" type=text><br />
税后工资： <input id="resultSalary" name="resultSalary" type=text> (实际到手的净收入)</p>

<p>养老保险： <input id="yanglao" name="yanglao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按8%算 )<br />
医疗保险： <input id="yibao" name="yibao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年3月份调整</a>：按2%算 包括3元互助)<br />
公积金：   <input id="gongjijin" name="gongjijin" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年7月份调整</a>：按12%算 供参考 以前是10% 8%)<br />
失业保险： <input id="shiye" name="shiye" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按0.5%算)<br />
税率：     <input id="taxRatio" name="taxRatio" type=text><br />
调节数：   <input id="taxAdjust" name="taxAdjust" type=text><br />
<input type=submit value="计算" onclick="return calcTax();"></p>

<p>转载请注明出处 <a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html</a><br />
过去几年的个人所得税计算器：<br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html">2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后)</a><br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前)</a><br />
<a href="http://windtear.net/2008/02/personal_income_tax_calculator_2008v1.html">2008年最新版个人所得税计算器1 (3月后有效 起征点调整为2000元后)</a><br />
<a href="http://windtear.net/archives/2007/08/01/001262.html">2007最新版个人所得税计算器2 (7月后有效 社保公积金调整后)</a><br />
<a href="http://windtear.net/archives/2007/05/16/001233.html">2007最新版个人所得税计算器1 (7月前有效 社保调整后 公积金调整前)</a><br />
<a href="http://windtear.net/archives/2006/01/04/000876.html">2006最新版个人所得税计算器</a><br />
<a href="http://windtear.net/archives/2005/10/15/000798.html">2005个人所得税计算器</a></p>

<p><script type="text/javascript"><!--<br />
function calcTax(a) {<br />
switch (a) {<br />
	case 1:<br />
	var shouldSalary=parseFloat(document.getElementById("shouldSalary").value);<br />
	if (shouldSalary>0) {<br />
	document.getElementById("beforeSalary").value="";<br />
	document.getElementById("yanglao").value="";<br />
	document.getElementById("yibao").value="";<br />
	document.getElementById("gongjijin").value="";<br />
	document.getElementById("shiye").value="";<br />
	}<br />
	break;<br />
	case 2:<br />
	var beforeSalary=parseFloat(document.getElementById("beforeSalary").value);<br />
	if (beforeSalary>=9966) {<br />
		var yanglao=797.28;<br />
		var yibao=202.32;<br />
		var gongjijin=1196;<br />
		if(document.getElementById("gjjratio1").checked==true) { gongjijin = 797; }<br />
		else if(document.getElementById("gjjratio2").checked==true) { gongjijin = 997; }<br />
		var windtear=1;<br />
		var shiye=49.83;<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	} else {<br />
		var yanglao=parseFloat(beforeSalary*0.08).toFixed(2);<br />
		var yibao=parseFloat(beforeSalary*0.02+3).toFixed(2);<br />
		var gongjijin=parseFloat(beforeSalary*0.12).toFixed(0);<br />
		if (document.getElementById("gjjratio1").checked==true) { gongjijin = parseFloat(beforeSalary*0.08).toFixed(0); }<br />
		else if (document.getElementById("gjjratio2").checked==true) { gongjijin = parseFloat(beforeSalary*0.1).toFixed(0); }<br />
		var windtear=1;<br />
		var shiye=parseFloat(beforeSalary*0.005).toFixed(2);<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	}<br />
	if (shouldSalary>0) {<br />
	document.getElementById("shouldSalary").value=shouldSalary;<br />
	document.getElementById("yanglao").value=yanglao;<br />
	document.getElementById("yibao").value=yibao;<br />
	document.getElementById("gongjijin").value=gongjijin;<br />
	document.getElementById("shiye").value=shiye;<br />
	}<br />
	break;			<br />
}</p>

<p>if (shouldSalary>0) {<br />
var taxSalary=(shouldSalary-2000);<br />
var taxRatio=0;<br />
var taxAdjust=0;</p>

<p>if (taxSalary<=0) {taxRatio=0;taxAdjust=0;}<br />
else if (taxSalary>0&&taxSalary<=500) {taxRatio=0.05;taxAdjust=0;}<br />
else if (taxSalary>500&&taxSalary<=2000) {taxRatio=0.10;taxAdjust=25;}<br />
else if (taxSalary>2000&&taxSalary<=5000) {taxRatio=0.15;taxAdjust=125;}<br />
else if (taxSalary>5000&&taxSalary<=20000) {taxRatio=0.20;taxAdjust=375;}<br />
else if (taxSalary>20000&&taxSalary<=40000) {taxRatio=0.25;taxAdjust=1375;}<br />
else if (taxSalary>40000&&taxSalary<=60000) {taxRatio=0.30;taxAdjust=3375;}<br />
else if (taxSalary>60000&&taxSalary<=80000) {taxRatio=0.35;taxAdjust=6375;}<br />
else if (taxSalary>80000&&taxSalary<=100000) {taxRatio=0.40;taxAdjust=10375;}<br />
else if (taxSalary>100000) {taxRatio=0.45;taxAdjust=15375;}<br />
var tax=parseFloat(taxSalary*taxRatio-taxAdjust).toFixed(2);</p>

<p>var resultSalary=parseFloat(shouldSalary-tax).toFixed(2);</p>

<p>document.getElementById("taxRatio").value=taxRatio;<br />
document.getElementById("taxAdjust").value=taxAdjust;<br />
document.getElementById("tax").value=tax;<br />
document.getElementById("resultSalary").value=resultSalary;<br />
}<br />
}<br />
document.getElementById("beforeSalary").focus()<br />
// --></script><br />
</pre></p>]]>
      
   </content>
</entry>
<entry>
   <title>2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前)</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html" />
   <id>tag:windtear.net,2008://3.1354</id>
   
   <published>2008-08-19T04:15:30Z</published>
   <updated>2008-08-19T05:38:09Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html
2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前) 输入 税前工资 或 应付工资 其他自动算出来显示 税前工资： * 应付工资： * (等于税前工资减去三险一金) 公积金比例： 8% 10% 12% 所得税： 税后工资： (实际到手的净收入) 养老保险： (每年4月份调整：按8%算 ) 医疗保险： (每年3月份调整：按2%算 包括3元互助) 公积金： (每年7月份调整：按12%算 供参考 以前是10% 8%) 失业保险： (每年4月份调整：按0.5%算) 税率： 调节数： 转载请注明出处 http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html 过去几年的个人所得税计算器：...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="杂项" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="152" label="个人所得税" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="153" label="计算器" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html</a></p>
<pre>2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前)

<p>输入 税前工资 或 应付工资 其他自动算出来显示</p>

<p>税前工资： <input id="beforeSalary" name="beforeSalary" type=text value="" onkeyup="return calcTax(2);" onchange="return calcTax(2);"> *<br />
应付工资： <input id="shouldSalary" name="shouldSalary" type=text value="" onkeyup="return calcTax(1);" onchange="return calcTax(1);"> * (等于税前工资减去三险一金)<br />
公积金比例： <input id="gjjratio1" name="gjjratio" type="radio" value="8" onclick="return calcTax(2);">8% <input id="gjjratio2" name="gjjratio" type="radio" value="10" onclick="return calcTax(2);">10% <input id="gjjratio3" name="gjjratio" type="radio" value="12" onclick="return calcTax(2);" checked>12%<br />
所得税：   <input id="tax" name="tax" type=text><br />
税后工资： <input id="resultSalary" name="resultSalary" type=text> (实际到手的净收入)</p>

<p>养老保险： <input id="yanglao" name="yanglao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按8%算 )<br />
医疗保险： <input id="yibao" name="yibao" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年3月份调整</a>：按2%算 包括3元互助)<br />
公积金：   <input id="gongjijin" name="gongjijin" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年7月份调整</a>：按12%算 供参考 以前是10% 8%)<br />
失业保险： <input id="shiye" name="shiye" type=text> (<a href="http://windtear.net/archives/2006/06/02/000996.html">每年4月份调整</a>：按0.5%算)<br />
税率：     <input id="taxRatio" name="taxRatio" type=text><br />
调节数：   <input id="taxAdjust" name="taxAdjust" type=text><br />
<input type=submit value="计算" onclick="return calcTax();"></p>

<p>转载请注明出处 <a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html</a><br />
过去几年的个人所得税计算器：<br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v3.html">2008年最新版个人所得税计算器3 (7月后有效 基数9966 公积金比例为12% 养老医保调整后)</a><br />
<a href="http://windtear.net/2008/08/personal_income_tax_calculator_2008v2.html">2008年最新版个人所得税计算器2 (7月后有效 基数9966 公积金比例为12% 养老医保调整前)</a><br />
<a href="http://windtear.net/2008/02/personal_income_tax_calculator_2008v1.html">2008年最新版个人所得税计算器1 (3月后有效 起征点调整为2000元后)</a><br />
<a href="http://windtear.net/archives/2007/08/01/001262.html">2007最新版个人所得税计算器2 (7月后有效 社保公积金调整后)</a><br />
<a href="http://windtear.net/archives/2007/05/16/001233.html">2007最新版个人所得税计算器1 (7月前有效 社保调整后 公积金调整前)</a><br />
<a href="http://windtear.net/archives/2006/01/04/000876.html">2006最新版个人所得税计算器</a><br />
<a href="http://windtear.net/archives/2005/10/15/000798.html">2005个人所得税计算器</a></p>

<p><script type="text/javascript"><!--<br />
function calcTax(a) {<br />
switch (a) {<br />
	case 1:<br />
	var shouldSalary=parseFloat(document.getElementById("shouldSalary").value);<br />
	if (shouldSalary>0) {<br />
	document.getElementById("beforeSalary").value="";<br />
	document.getElementById("yanglao").value="";<br />
	document.getElementById("yibao").value="";<br />
	document.getElementById("gongjijin").value="";<br />
	document.getElementById("shiye").value="";<br />
	}<br />
	break;<br />
	case 2:<br />
	var beforeSalary=parseFloat(document.getElementById("beforeSalary").value);<br />
	if (beforeSalary>=9966) {<br />
		var yanglao=721.92;<br />
		var yibao=183.48;<br />
		var gongjijin=1196;<br />
		if(document.getElementById("gjjratio1").checked==true) { gongjijin = 797; }<br />
		else if(document.getElementById("gjjratio2").checked==true) { gongjijin = 997; }<br />
		var windtear=1;<br />
		var shiye=45.12;<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	} else {<br />
		var yanglao=parseFloat(beforeSalary*0.08).toFixed(2);<br />
		if (yanglao>721.92) { yanglao=721.92; }<br />
		var yibao=parseFloat(beforeSalary*0.02+3).toFixed(2);<br />
		if (yibao>183.48) { yibao=183.48; }<br />
		var gongjijin=parseFloat(beforeSalary*0.12).toFixed(0);<br />
		if (document.getElementById("gjjratio1").checked==true) { gongjijin = parseFloat(beforeSalary*0.08).toFixed(0); }<br />
		else if (document.getElementById("gjjratio2").checked==true) { gongjijin = parseFloat(beforeSalary*0.1).toFixed(0); }<br />
		var windtear=1;<br />
		var shiye=parseFloat(beforeSalary*0.005).toFixed(2);<br />
		if (shiye>45.12) { shiye=45.12; }<br />
		var shouldSalary=parseFloat(beforeSalary-yanglao-yibao-gongjijin-shiye).toFixed(2);<br />
	}<br />
	if (shouldSalary>0) {<br />
	document.getElementById("shouldSalary").value=shouldSalary;<br />
	document.getElementById("yanglao").value=yanglao;<br />
	document.getElementById("yibao").value=yibao;<br />
	document.getElementById("gongjijin").value=gongjijin;<br />
	document.getElementById("shiye").value=shiye;<br />
	}<br />
	break;			<br />
}</p>

<p>if (shouldSalary>0) {<br />
var taxSalary=(shouldSalary-2000);<br />
var taxRatio=0;<br />
var taxAdjust=0;</p>

<p>if (taxSalary<=0) {taxRatio=0;taxAdjust=0;}<br />
else if (taxSalary>0&&taxSalary<=500) {taxRatio=0.05;taxAdjust=0;}<br />
else if (taxSalary>500&&taxSalary<=2000) {taxRatio=0.10;taxAdjust=25;}<br />
else if (taxSalary>2000&&taxSalary<=5000) {taxRatio=0.15;taxAdjust=125;}<br />
else if (taxSalary>5000&&taxSalary<=20000) {taxRatio=0.20;taxAdjust=375;}<br />
else if (taxSalary>20000&&taxSalary<=40000) {taxRatio=0.25;taxAdjust=1375;}<br />
else if (taxSalary>40000&&taxSalary<=60000) {taxRatio=0.30;taxAdjust=3375;}<br />
else if (taxSalary>60000&&taxSalary<=80000) {taxRatio=0.35;taxAdjust=6375;}<br />
else if (taxSalary>80000&&taxSalary<=100000) {taxRatio=0.40;taxAdjust=10375;}<br />
else if (taxSalary>100000) {taxRatio=0.45;taxAdjust=15375;}<br />
var tax=parseFloat(taxSalary*taxRatio-taxAdjust).toFixed(2);</p>

<p>var resultSalary=parseFloat(shouldSalary-tax).toFixed(2);</p>

<p>document.getElementById("taxRatio").value=taxRatio;<br />
document.getElementById("taxAdjust").value=taxAdjust;<br />
document.getElementById("tax").value=tax;<br />
document.getElementById("resultSalary").value=resultSalary;<br />
}<br />
}<br />
document.getElementById("beforeSalary").focus()<br />
// --></script><br />
</pre></p>]]>
      
   </content>
</entry>
<entry>
   <title>squid封禁不带User-Agent的请求</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/08/squid_deny_empty_user-agent.html" />
   <id>tag:windtear.net,2008://3.1353</id>
   
   <published>2008-08-04T15:13:32Z</published>
   <updated>2008-08-04T15:23:43Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/08/squid_deny_empty_user-agent.html
<![CDATA[看awstats分析报表 很多请求不带User-Agent头 Unknown robot (identified by empty user agent string) 于是就封禁了 加两行squid配置 acl has_ua browser .+ http_access notfound !has_ua 其中notfound 可以用deny 这里是改过的 status = HTTP_NOT_FOUND page_id = ERR_INVALID_URL ERR_INVALID_URL 也是改过的 &lt;TITLE&gt;404 Not Found&lt;/TITLE&gt;...]]></summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="squid" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="6" label="squid" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/08/squid_deny_empty_user-agent.html">http://windtear.net/2008/08/squid_deny_empty_user-agent.html</a></p>
<p>看<a href="http://windtear.net/tech/awstats.html">awstats</a>分析报表 很多请求不带User-Agent头<br />
Unknown robot (identified by empty user agent string)<br />
于是就封禁了 加两行<a href="http://windtear.net/tech/squid.html">squid</a>配置<br />
acl has_ua browser .+<br />
http_access notfound !has_ua</p>

<p>其中notfound 可以用deny 这里是改过的 status = HTTP_NOT_FOUND<br />
page_id = ERR_INVALID_URL ERR_INVALID_URL 也是改过的<br />
&lt;TITLE&gt;404 Not Found&lt;/TITLE&gt;<br />
</p>]]>
      
   </content>
</entry>
<entry>
   <title>手工搞迅雷 Thunder</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/08/thunder.html" />
   <id>tag:windtear.net,2008://3.1352</id>
   
   <published>2008-08-04T15:02:51Z</published>
   <updated>2008-08-04T15:09:28Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/08/thunder.html
昨天第一次在自己电脑上搞迅雷 (不是安装迅雷) 下载 Thunder5.8.3.556.exe 解压 按照install_script.iss改了{app}\下几个目录名 (Components下一个不改 Program\Ad 改成只读文件) 然后运行 Thunder.exe 很干净 还能干活 第一次在自己电脑上搞迅雷 首战告捷:)...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="软件" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="196" label="迅雷" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/08/thunder.html">http://windtear.net/2008/08/thunder.html</a></p>
<p>昨天第一次在自己电脑上搞迅雷 (不是安装迅雷)<br />
下载 Thunder5.8.3.556.exe 解压<br />
按照install_script.iss改了{app}\下几个目录名<br />
(Components下一个不改 Program\Ad 改成只读文件)<br />
然后运行 Thunder.exe 很干净 还能干活</p>

<p>第一次在自己电脑上搞迅雷 首战告捷:)<br />
</p>]]>
      
   </content>
</entry>
<entry>
   <title>apache 哪个版本开始 gzip压缩版的 ETag 最后加个 -gzip</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/07/apache_etag_-gzip.html" />
   <id>tag:windtear.net,2008://3.1351</id>
   
   <published>2008-07-13T15:42:51Z</published>
   <updated>2008-07-13T15:57:37Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/07/apache_etag_-gzip.html
今天看apache主页 发现gzip压缩版的 ETag 最后加个 -gzip &quot;329c25-21a3-44f8c636dd240&quot;-gzip 不知道从哪个版本开始的 看 ChangeLog 没看出来 1. 不带 Accept-Encoding: gzip, deflate 头 HTTP/1.1 200 OK Date: Sun, 13 Jul 2008 11:43:19 GMT Server: Apache/2.2.9 (Unix) Last-Modified: Fri, 13 Jun 2008 13:38:09 GMT ETag: &quot;329c25-21a3-44f8c636dd240&quot; Accept-Ranges: bytes...</summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="软件" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="38" label="apache" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="6" label="squid" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/07/apache_etag_-gzip.html">http://windtear.net/2008/07/apache_etag_-gzip.html</a></p>
<p>今天看<a href="http://httpd.apache.org/">apache主页</a><br />
发现gzip压缩版的 ETag 最后加个 -gzip "329c25-21a3-44f8c636dd240"-gzip<br />
不知道从哪个版本开始的 看 <a href="http://www.apache.org/dist/httpd/CHANGES_2.2">ChangeLog</a> 没看出来</p>

<p>1. 不带 Accept-Encoding: gzip, deflate 头<br />
HTTP/1.1 200 OK<br />
Date: Sun, 13 Jul 2008 11:43:19 GMT<br />
Server: Apache/2.2.9 (Unix)<br />
Last-Modified: Fri, 13 Jun 2008 13:38:09 GMT<br />
ETag: "329c25-21a3-44f8c636dd240"<br />
Accept-Ranges: bytes<br />
Content-Length: 8611<br />
Vary: Accept-Encoding<br />
Content-Type: text/html<br />
X-Pad: avoid browser bug</p>

<p>2. 带 Accept-Encoding: gzip, deflate 头<br />
HTTP/1.1 200 OK<br />
Date: Sun, 13 Jul 2008 11:46:45 GMT<br />
Server: Apache/2.2.9 (Unix)<br />
Last-Modified: Fri, 13 Jun 2008 13:38:09 GMT<br />
ETag: "329c25-21a3-44f8c636dd240"-gzip<br />
Accept-Ranges: bytes<br />
Vary: Accept-Encoding<br />
Content-Encoding: gzip<br />
Content-Length: 2303<br />
Content-Type: text/html</p>

<p>以前 apache 不管压缩不压缩返回的 ETag 都一样<br />
squid 2.6 针对此还特意做了个选项<br />
acl apache rep_header Server ^Apache<br />
broken_vary_encoding allow apache</p>]]>
      
   </content>
</entry>
<entry>
   <title>[squid patch] 解决 Accept-Encoding 不一致造成的多份缓存问题</title>
   <link rel="alternate" type="text/html" href="http://windtear.net/2008/07/squid_patch_accept-encoding_multi_cache.html" />
   <id>tag:windtear.net,2008://3.1350</id>
   
   <published>2008-07-10T13:25:12Z</published>
   <updated>2008-07-10T17:08:46Z</updated>
   
   <summary>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/07/squid_patch_accept-encoding_multi_cache.html
<![CDATA[解决的是 IE Firefox 搜索引擎spider 的 Accept-Encoding 不一致造成的多份缓存问题 MSIE 的 Accept-Encoding 是 gzip, deflate Firefox Googlebot 的是 gzip,deflate (之间没有空格) 多份缓存说明穿透的风险 还是有些危险的 --- squid-2.6.STABLE21.orig/src/http.c 2008-04-02 09:03:47.000000000 +0800 +++ squid-2.6.STABLE21/src/http.c 2008-07-10 21:17:26.000000000 +0800 @@ -387,14 +387,20 @@ } strListAdd(&vstr, name, ','); hdr =...]]></summary>
   <author>
      <name>windtear</name>
      
   </author>
         <category term="squid" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="浏览器" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="192" label="squid，patch" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://windtear.net/">
<![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/">版权声明</a>：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。<br />
<a href="http://windtear.net/2008/07/squid_patch_accept-encoding_multi_cache.html">http://windtear.net/2008/07/squid_patch_accept-encoding_multi_cache.html</a></p>
<pre>解决的是 IE Firefox 搜索引擎spider 的 Accept-Encoding 不一致造成的多份缓存问题
MSIE 的 Accept-Encoding 是 gzip, deflate
Firefox Googlebot 的是 gzip,deflate (之间没有空格)
多份缓存说明穿透的风险 还是有些危险的

<p>--- squid-2.6.STABLE21.orig/src/http.c	2008-04-02 09:03:47.000000000 +0800<br />
+++ squid-2.6.STABLE21/src/http.c	2008-07-10 21:17:26.000000000 +0800<br />
@@ -387,14 +387,20 @@<br />
 	}<br />
 	strListAdd(&vstr, name, ',');<br />
 	hdr = httpHeaderGetByName(&request->header, name);<br />
-	safe_free(name);<br />
 	value = strBuf(hdr);<br />
 	if (value) {<br />
+	    if (strcmp(name, "accept-encoding") != 0) {<br />
 	    value = rfc1738_escape_part(value);<br />
 	    stringAppend(&vstr, "=\"", 2);<br />
 	    stringAppend(&vstr, value, strlen(value));<br />
 	    stringAppend(&vstr, "\"", 1);<br />
+	    } else {<br />
+		if(strstr(value,"gzip") != NULL || strstr(value,"deflate") != NULL) {<br />
+	    		stringAppend(&vstr, "=\"gzip,\%20deflate\"", 18);<br />
+		}<br />
+	    }<br />
 	}<br />
+	safe_free(name);<br />
 	stringClean(&hdr);<br />
     }<br />
     safe_free(request->vary_hdr); </p>

<p>这里不考虑 gzip deflate 的大写问题<br />
</pre></p>]]>
      
   </content>
</entry>

</feed>
