55 | 查看文件树更了解kpr
56 | .
57 | ├── 20190328233849.jpg 项目首页用图片
58 | ├── 20190328233937.jpg 项目首页用图片
59 | ├── 20190407215443.jpg 项目首页用图片
60 | ├── backup.sh 软件中心调用的备份sh用于生成 history
61 | ├── build.sh 编译kpr版本---需要配合软件中心。当然也可以剔除那部分配合.
62 | ├── Changelog.txt 更新日志
63 | ├── config.json.js 暂时无用
64 | ├── history 历史版本
65 | ├── koolproxyR 主程序文件夹
66 | │ ├── variable/haveged.ipk 用于解决kpr与v2ray ss 冲突导致开机变慢的问题
67 | │ ├── init.d
68 | │ │ └── S93koolproxyR.sh 自启脚本
69 | │ ├── install.sh 离线安装执行脚本
70 | │ ├── koolproxyR /koolshare 下的文件夹 也是软件名字
71 | │ │ ├── data
72 | │ │ │ ├── gen_ca.sh 生成证书的脚本
73 | │ │ │ ├── koolproxyR_ipset.conf 黑名单控制文件
74 | │ │ │ ├── openssl.cnf 生成证书用的openssl配置文件
75 | │ │ │ ├── rules 规则
76 | │ │ │ │ ├── easylistchina.txt 主规则
77 | │ │ │ │ ├── easylistchina.txt.md5
78 | │ │ │ │ ├── fanboy-annoyance.txt fanboy普通规则
79 | │ │ │ │ ├── fanboy-annoyance.txt.md5
80 | │ │ │ │ ├── kp.dat 视频加密规则
81 | │ │ │ │ ├── kp.dat.md5
82 | │ │ │ │ ├── kpr_video_list.txt 备用视频规则(主规则加载,视频规则没有加载的情况下使用)
83 | │ │ │ │ ├── kpr_video_list.txt.md5
84 | │ │ │ │ ├── user.txt 自定义规则文件
85 | │ │ │ │ ├── user.txt.md5
86 | │ │ │ │ ├── yhosts.txt 补充规则文件
87 | │ │ │ │ └── yhosts.txt.md5
88 | │ │ │ └── source.list 规则控制文件,此文件控制koolproxy加载那些规则。
89 | │ │ ├── koolproxy kp二进制文件
90 | │ │ └── kpr_config.sh kpr保存的时候执行的配置文件。【核心】
91 | │ ├── variable/libhavege.ipk 用于解决kpr与v2ray ss 冲突导致开机变慢的问题
92 | │ ├── scripts 脚本目录 安装后位于/koolshare/scripts
93 | │ │ ├── KoolProxyR_cert.sh 证书相关脚本备份.恢复.生成 .0 根证书
94 | │ │ ├── KoolProxyR_check_chain.sh 检查SS WG V2RAY 和是否被kiil的脚本
95 | │ │ ├── KoolProxyR_config.sh 控制重启Kpr的文件----
96 | │ │ ├── KoolProxyR_debug.sh 附加设置-调试模式的脚本
97 | │ │ ├── KoolProxyR_getarp.sh 获取arp 脚本
98 | │ │ ├── KoolProxyR_rules_status.sh 规则的状态脚本
99 | │ │ ├── KoolProxyR_rule_update.sh 规则的更新脚本
100 | │ │ ├── KoolProxyR_status.sh kpr状态监测脚本
101 | │ │ └── KoolProxyR_update_now.sh kpr在线更新脚本
102 | │ ├── uninstall.sh 卸载脚本
103 | │ └── webs
104 | │ ├── Module_koolproxyR.asp Kpr界面文件
105 | │ └── res
106 | │ ├── icon-koolproxyR-bg.png 软件中心背景图标
107 | │ ├── icon-koolproxyR.png 软件中心主图标
108 | │ └── icon_koolproxyR-v.png kpr界面文件左上角调用的图标
109 | ├── KoolProxyR_install.sh 在线安装/更新KPR的脚本
110 | ├── KoolProxyR_my_rule_diy.sh 自定义SHELL文件,放入/koolshare/scripts下即可
111 | ├── koolproxyR.tar.gz 最新版本的kpr离线安装包
112 | ├── kpr_tar_install.sh kpr在线更新调用的离线安装脚本
113 | ├── KPR内图标.psd 图标开源
114 | ├── KPR图标背景图片.psd 图片开源
115 | ├── ks_tar_install.sh 软件中心离线安装脚本(修复了离线安装验证不通过的问题)
116 | ├── README.md 你现在所看到的页面
117 | └── version 版本号,负责控制kpr的更新和md5核对。
118 |
119 |
120 |
121 |
122 | ## 开源及授权
123 | 如果同时满足如下要求,无需取得授权。
124 | 1.不得用于非开源项目.
125 | 2.不得用于商业用途.
126 | 3.给予本项目优先反馈,和知情权。
--------------------------------------------------------------------------------
/backup.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # you can do something here
4 | # this shell scripts will run at the end of build.py scripts
5 |
6 | tar_name="koolproxyR.tar.gz"
7 |
8 | mkdir -p history
9 | if [ ! -f ./history/version ]; then
10 | touch ./history/version
11 | fi
12 |
13 | version_old=`cat history/version | sed -n '$p' | cut -d \ -f1`
14 | version_new=`cat version |sed -n 1p`
15 | md5_new=` md5sum $tar_name | cut -d \ -f1`
16 | # 保证md5连续性
17 | wget -O ./history/version https://shaoxia1991.coding.net/p/koolproxyr/d/koolproxyr/git/raw/master/history/version
18 | if [ -f ./$tar_name ]; then
19 | if [ "$version_old" != "$version_new" ]; then
20 | mkdir ./history/$version_new/
21 | cp ./$tar_name ./history/$version_new/
22 | echo $version_new $md5_new >> ./history/version
23 | fi
24 | fi
25 |
26 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | MODULE=koolproxyR
4 | VERSION="2.8.8"
5 | TITLE=koolproxyR
6 | DESCRIPTION="至 善 至 美"
7 | HOME_URL="Module_koolproxyR.asp"
8 | CHANGELOG="维护阶段的kpr"
9 | # 查看内核日志
10 | # dmesg | less 或者 dmesg
11 | # 转化DOS格式到unix 需要 apt-get install dos2unix
12 | find . -type f -exec dos2unix {} \;
13 | #get latest rules
14 | rm -rf ./koolproxyR/koolproxyR/data/rules/*.txt
15 | rm -rf ./koolproxyR/koolproxyR/data/rules/*.md5
16 | rm -rf ./koolproxyR/koolproxyR/data/rules/*.dat
17 | rm -rf ./koolproxyR/koolproxyR/data/source.list
18 | # rm -rf ./koolproxyR/koolproxyR/koolproxy
19 | cd koolproxyR/koolproxyR/data/rules
20 | # mkdir oridata
21 | # cd oridata
22 | # 下载三方规则
23 | # 从 https://filterlists.com/ 找规则
24 | # https://tgc.cloud/downloads/hosts.txt 36万DNS规则,kpr 生产出来是72万
25 | wget https://easylist-downloads.adblockplus.org/easylistchina.txt
26 |
27 | wget https://shaoxia1991.coding.net/p/cjxlist/d/cjxlist/git/raw/master/cjx-annoyance.txt
28 |
29 | wget https://secure.fanboy.co.nz/fanboy-annoyance.txt
30 | # ADGUARD-DNS过滤规则
31 | # wget -O yhosts.txt https://filters.adtidy.org/extension/chromium/filters/15.txt
32 | # yhosts过滤规则
33 |
34 | wget -O yhosts.txt https://shaoxia1991.coding.net/p/yhosts/d/yhosts/git/raw/master/hosts
35 | wget -O tvbox.txt https://shaoxia1991.coding.net/p/yhosts/d/yhosts/git/raw/master/data/tvbox.txt
36 | cat tvbox.txt >> yhosts.txt
37 |
38 | # ad.txt:合并EasylistChina、EasylistLite、CJX'sAnnoyance,以及补充的一些规则;
39 | # ad2.txt:仅合并EasylistChina、EasylistLite、CJX'sAnnoyance;
40 | # ad3.txt:合并EasylistChina、EasylistLite、CJX'sAnnoyance、EasyPrivacy;
41 | # wget https://gitee.com/halflife/list/raw/master/ad.txt
42 |
43 | # 分割三方规则
44 |
45 | # # split -l 1 easylistchina.txt ./../easylistchina_
46 | # split -l 1 yhosts.txt ./../chengfeng_
47 | # # split -l 999 fanboy-annoyance.txt ./../fanboy_
48 | # cd ..
49 |
50 | # 同步kp官方规则
51 |
52 | # wget https://kprules.b0.upaiyun.com/koolproxy.txt
53 | # wget https://kprules.b0.upaiyun.com/daily.txt
54 | # 暂时先用临时的替代
55 | # wget https://kprules.b0.upaiyun.com/kp.dat
56 | # wget https://kprules.b0.upaiyun.com/user.txt
57 | # 同步Kpr视频规则及md5
58 | # 电脑的wget 不支持houzi- 的- 域名 所以倒腾了下
59 | wget https://shaoxia1991.coding.net/p/kp_dat/d/kp_dat/git/raw/master/kp.dat
60 | wget https://shaoxia1991.coding.net/p/kp_dat/d/kp_dat/git/raw/master/kp.dat.md5
61 | # read -s -n1 -p "请手动拷贝kp.dat 和kp.dat.md5,按任意键继续...."
62 |
63 | video_rules_local=`cat kp.dat.md5 | sed -n '2p'`
64 | if [[ "$video_rules_local" == "" ]]; then
65 | # 当本地md5 没有时间戳的时候就更新更新时间戳
66 | video_rules_online=`curl https://shaoxia1991.coding.net/api/user/shaoxia1991/project/kp_dat/depot/kp_dat/git/blob/master%2Fkp.dat | jq '.data.file.lastCommitDate'`
67 | date -d @`echo ${video_rules_online:0:10}` +%Y年%m月%d日\ %X >> kp.dat.md5
68 | fi
69 |
70 |
71 | wget https://shaoxia1991.coding.net/p/koolproxyr/d/koolproxyr/git/raw/master/koolproxyR/koolproxyR/data/rules/user.txt
72 |
73 | ## ---------------------------------------------------fanboy处理开始------------------------------------------------------
74 | ## 删除导致KP崩溃的规则
75 | sed -i '/^\$/d' fanboy-annoyance.txt
76 | sed -i '/\*\$/d' fanboy-annoyance.txt
77 |
78 | # 给三大视频网站放行 由kp.dat负责
79 | sed -i '/youku.com/d' fanboy-annoyance.txt
80 | sed -i '/g.alicdn.com/d' fanboy-annoyance.txt
81 | sed -i '/tudou.com/d' fanboy-annoyance.txt
82 | sed -i '/iqiyi.com/d' fanboy-annoyance.txt
83 | sed -i '/qq.com/d' fanboy-annoyance.txt
84 | sed -i '/gtimg.cn/d' fanboy-annoyance.txt
85 | # 给知乎放行
86 | sed -i '/zhihu.com/d' fanboy-annoyance.txt
87 |
88 |
89 | # 将规则转化成kp能识别的https
90 | cat fanboy-annoyance.txt | grep "^||" | sed 's#^||#||https://#g' >> fanboy-annoyance_https.txt
91 | # 移出https不支持规则domain=
92 | sed -i 's/\(,domain=\).*//g' fanboy-annoyance_https.txt
93 | sed -i 's/\(\$domain=\).*//g' fanboy-annoyance_https.txt
94 | sed -i 's/\(domain=\).*//g' fanboy-annoyance_https.txt
95 | sed -i '/\^$/d' fanboy-annoyance_https.txt
96 | sed -i '/\^\*\.gif/d' fanboy-annoyance_https.txt
97 | sed -i '/\^\*\.jpg/d' fanboy-annoyance_https.txt
98 |
99 |
100 | cat fanboy-annoyance.txt | grep "^||" | sed 's#^||#||http://#g' >> fanboy-annoyance_https.txt
101 | cat fanboy-annoyance.txt | grep -i '^[0-9a-z]'| grep -v '^http'| sed 's#^#https://#g' >> fanboy-annoyance_https.txt
102 | cat fanboy-annoyance.txt | grep -i '^[0-9a-z]'| grep -v '^http'| sed 's#^#http://#g' >> fanboy-annoyance_https.txt
103 | cat fanboy-annoyance.txt | grep -i '^[0-9a-z]'| grep -i '^http' >> fanboy-annoyance_https.txt
104 |
105 |
106 | # 给github的https放行
107 | sed -i '/github/d' fanboy-annoyance_https.txt
108 | # 给apple的https放行
109 | sed -i '/apple.com/d' fanboy-annoyance_https.txt
110 | sed -i '/mzstatic.com/d' fanboy-annoyance_https.txt
111 | # 给api.twitter.com的https放行
112 | sed -i '/twitter.com/d' fanboy-annoyance_https.txt
113 | # 给facebook.com的https放行
114 | sed -i '/facebook.com/d' fanboy-annoyance_https.txt
115 | sed -i '/fbcdn.net/d' fanboy-annoyance_https.txt
116 | # 给 instagram.com 放行
117 | sed -i '/instagram.com/d' fanboy-annoyance_https.txt
118 | # 删除可能导致Kpr变慢的Https规则
119 | sed -i '/\.\*\//d' fanboy-annoyance_https.txt
120 |
121 | # 给国内三大电商平台放行
122 | sed -i '/jd.com/d' fanboy-annoyance_https.txt
123 | sed -i '/taobao.com/d' fanboy-annoyance_https.txt
124 | sed -i '/tmall.com/d' fanboy-annoyance_https.txt
125 |
126 | # 删除不必要信息重新打包 15 表示从第15行开始 $表示结束
127 | sed -i '15,$d' fanboy-annoyance.txt
128 | # 合二归一
129 | cat fanboy-annoyance_https.txt >> fanboy-annoyance.txt
130 | # 删除可能导致kpr卡死的神奇规则
131 | sed -i '/https:\/\/\*/d' fanboy-annoyance.txt
132 | # 给 netflix.com 放行
133 | sed -i '/netflix.com/d' fanboy-annoyance.txt
134 | # 给 tvbs.com 放行
135 | sed -i '/tvbs.com/d' fanboy-annoyance.txt
136 | sed -i '/googletagmanager.com/d' fanboy-annoyance.txt
137 | # 给 microsoft.com 放行
138 | sed -i '/microsoft.com/d' fanboy-annoyance.txt
139 |
140 | # 终极 https 卡顿优化 grep -n 显示行号 awk -F 分割数据 sed -i "${del_rule}d" 需要""" 和{}引用变量
141 | # 当 koolproxyR_del_rule 是1的时候就一直循环,除非 del_rule 变量为空了。
142 | koolproxyR_del_rule=1
143 | while [ $koolproxyR_del_rule = 1 ];do
144 | del_rule=`cat fanboy-annoyance.txt | grep -n 'https://' | grep '\*' | grep -v '/\*'| grep -v '\^\*' | grep -v '\*\=' | grep -v '\$s\@' | grep -v '\$r\@'| awk -F":" '{print $1}' | sed -n '1p'`
145 | if [[ "$del_rule" != "" ]]; then
146 | sed -i "${del_rule}d" fanboy-annoyance.txt
147 | else
148 | koolproxyR_del_rule=0
149 | fi
150 | done
151 |
152 |
153 | ## -------------------------------------------------------fanboy处理结束------------------------------------------------------
154 |
155 |
156 | ## ---------------------------------------------------------KPR 中国简易规则处理开始 -------------------------------------------------------
157 | cat cjx-annoyance.txt >> easylistchina.txt
158 | sed -i '/^\$/d' easylistchina.txt
159 | sed -i '/\*\$/d' easylistchina.txt
160 | # 给btbtt.替换过滤规则。
161 | sed -i 's#btbtt.\*#\*btbtt.\*#g' easylistchina.txt
162 | # 给手机百度图片放行
163 | sed -i '/baidu.com\/it\/u/d' easylistchina.txt
164 | # # 给手机百度放行
165 | # sed -i '/mbd.baidu.com/d' easylistchina.txt
166 | # 给知乎放行
167 | sed -i '/zhihu.com/d' easylistchina.txt
168 |
169 |
170 |
171 | # 将规则转化成kp能识别的https
172 | cat easylistchina.txt | grep "^||" | sed 's#^||#||https://#g' >> easylistchina_https.txt
173 | # 移出https不支持规则domain=
174 | sed -i 's/\(,domain=\).*//g' easylistchina_https.txt
175 | sed -i 's/\(\$domain=\).*//g' easylistchina_https.txt
176 | sed -i 's/\(domain=\).*//g' easylistchina_https.txt
177 | sed -i '/\^$/d' easylistchina_https.txt
178 | sed -i '/\^\*\.gif/d' easylistchina_https.txt
179 | sed -i '/\^\*\.jpg/d' easylistchina_https.txt
180 |
181 | cat easylistchina.txt | grep "^||" | sed 's#^||#||http://#g' >> easylistchina_https.txt
182 | cat easylistchina.txt | grep -i '^[0-9a-z]'| grep -v '^http'| sed 's#^#https://#g' >> easylistchina_https.txt
183 | # 源文件替换成http
184 | cat easylistchina.txt | grep -i '^[0-9a-z]'| grep -v '^http'| sed 's#^#http://#g' >> easylistchina_https.txt
185 | cat easylistchina.txt | grep -i '^[0-9a-z]'| grep -i '^http' >> easylistchina_https.txt
186 | cat easylistchina.txt | grep -i '^[0-9a-z]'| grep -i '^|http' >> easylistchina_https.txt
187 |
188 | # 给facebook.com的https放行
189 | sed -i '/facebook.com/d' easylistchina_https.txt
190 | sed -i '/fbcdn.net/d' easylistchina_https.txt
191 | # 删除可能导致Kpr变慢的Https规则
192 | sed -i '/\.\*\//d' easylistchina_https.txt
193 |
194 |
195 |
196 | # 腾讯视频真的没办法了。找大佬帮我把
197 | # 删除不必要信息重新打包 15 表示从第15行开始 $表示结束
198 | sed -i '6,$d' easylistchina.txt
199 | # 合二归一
200 |
201 | wget https://shaoxia1991.coding.net/p/koolproxyR_rule_list/d/koolproxyR_rule_list/git/raw/master/kpr_our_rule.txt
202 | # https://shaoxia1991.coding.net/p/koolproxyR_rule_list/d/koolproxyR_rule_list/git/raw/master/kpr_our_rule.txt
203 | cat easylistchina_https.txt >> easylistchina.txt
204 |
205 | # 给三大视频网站放行 由kp.dat负责
206 | sed -i '/youku.com/d' easylistchina.txt
207 | sed -i '/iqiyi.com/d' easylistchina.txt
208 | sed -i '/g.alicdn.com/d' easylistchina.txt
209 | sed -i '/tudou.com/d' easylistchina.txt
210 | sed -i '/gtimg.cn/d' easylistchina.txt
211 | # 给https://qq.com的html规则放行
212 | sed -i '/qq.com/d' easylistchina.txt
213 | # 删除可能导致kpr卡死的神奇规则
214 | sed -i '/https:\/\/\*/d' easylistchina.txt
215 | # 给国内三大电商平台放行
216 | sed -i '/jd.com/d' easylistchina.txt
217 | sed -i '/taobao.com/d' easylistchina.txt
218 | sed -i '/tmall.com/d' easylistchina.txt
219 | # 给 tvbs.com 放行
220 | sed -i '/tvbs.com/d' easylistchina.txt
221 | sed -i '/googletagmanager.com/d' easylistchina.txt
222 | # 给 netflix.com 放行
223 | sed -i '/netflix.com/d' easylistchina.txt
224 | # 给 microsoft.com 放行
225 | sed -i '/microsoft.com/d' easylistchina.txt
226 | # 给apple的https放行
227 | sed -i '/apple.com/d' easylistchina.txt
228 | sed -i '/mzstatic.com/d' easylistchina.txt
229 |
230 | # 终极 https 卡顿优化 grep -n 显示行号 awk -F 分割数据 sed -i "${del_rule}d" 需要""" 和{}引用变量
231 | # 当 koolproxyR_del_rule 是1的时候就一直循环,除非 del_rule 变量为空了。
232 | koolproxyR_del_rule=1
233 | while [ $koolproxyR_del_rule = 1 ];do
234 | del_rule=`cat easylistchina.txt | grep -n 'https://' | grep '\*' | grep -v '/\*'| grep -v '\^\*' | grep -v '\*\=' | grep -v '\$s\@' | grep -v '\$r\@'| awk -F":" '{print $1}' | sed -n '1p'`
235 | if [[ "$del_rule" != "" ]]; then
236 | sed -i "${del_rule}d" easylistchina.txt
237 | else
238 | koolproxyR_del_rule=0
239 | fi
240 | done
241 | cat kpr_our_rule.txt >> easylistchina.txt
242 |
243 |
244 |
245 |
246 |
247 | # -----------------------------------------KPR 中国简易规则处理结束------------------------------------------------
248 |
249 |
250 | # -------------------------------------- 补充规则处理开始----------------------------------------------------------
251 | # 删除不必要信息重新打包 0-11行 表示从第15行开始 $表示结束
252 | # sed -i '1,11d' yhosts.txt
253 | # 开始Kpr规则化处理
254 | cat yhosts.txt > yhosts_https.txt
255 | sed -i 's/^127.0.0.1\ /||https:\/\//g' yhosts_https.txt
256 | cat yhosts.txt >> yhosts_https.txt
257 | sed -i 's/^127.0.0.1\ /||http:\/\//g' yhosts_https.txt
258 | # 处理tvbox.txt本身规则。
259 | sed -i 's/^127.0.0.1\ /||/g' tvbox.txt
260 | # 给国内三大电商平台放行
261 | sed -i '/jd.com/d' yhosts_https.txt
262 | sed -i '/taobao.com/d' yhosts_https.txt
263 | sed -i '/tmall.com/d' yhosts_https.txt
264 |
265 | # 合二归一
266 | cat yhosts_https.txt > yhosts.txt
267 | cat tvbox.txt >> yhosts.txt
268 | # 此处对yhosts进行单独处理
269 | sed -i 's/^@/!/g' yhosts.txt
270 | sed -i 's/^#/!/g' yhosts.txt
271 | sed -i '/localhost/d' yhosts.txt
272 | sed -i '/broadcasthost/d' yhosts.txt
273 | sed -i '/broadcasthost/d' yhosts.txt
274 | sed -i '/cn.bing.com/d' yhosts.txt
275 |
276 |
277 | # 给三大视频网站放行 由kp.dat负责
278 | sed -i '/youku.com/d' yhosts.txt
279 | sed -i '/iqiyi.com/d' yhosts.txt
280 | sed -i '/g.alicdn.com/d' yhosts.txt
281 | sed -i '/tudou.com/d' yhosts.txt
282 | sed -i '/gtimg.cn/d' yhosts.txt
283 |
284 |
285 | # 给知乎放行
286 | sed -i '/zhihu.com/d' yhosts.txt
287 |
288 | # 给qq.com放行
289 | sed -i '/qq.com/d' yhosts.txt
290 |
291 | # 给github的https放行
292 | sed -i '/github/d' yhosts.txt
293 | # 给apple的https放行
294 | sed -i '/apple.com/d' yhosts.txt
295 | sed -i '/mzstatic.com/d' yhosts.txt
296 | # 给api.twitter.com的https放行
297 | sed -i '/twitter.com/d' yhosts.txt
298 | # 给facebook.com的https放行
299 | sed -i '/facebook.com/d' yhosts.txt
300 | sed -i '/fbcdn.net/d' yhosts.txt
301 | # 给 instagram.com 放行
302 | sed -i '/instagram.com/d' yhosts.txt
303 | # 删除可能导致kpr卡死的神奇规则
304 | sed -i '/https:\/\/\*/d' yhosts.txt
305 | # 给 tvbs.com 放行
306 | sed -i '/tvbs.com/d' yhosts.txt
307 | sed -i '/googletagmanager.com/d' yhosts.txt
308 | # 给 netflix.com 放行
309 | sed -i '/netflix.com/d' yhosts.txt
310 | # 给 microsoft.com 放行
311 | sed -i '/microsoft.com/d' yhosts.txt
312 |
313 | # 终极 https 卡顿优化 grep -n 显示行号 awk -F 分割数据 sed -i "${del_rule}d" 需要""" 和{}引用变量
314 | # 当 koolproxyR_del_rule 是1的时候就一直循环,除非 del_rule 变量为空了。
315 | koolproxyR_del_rule=1
316 | while [ $koolproxyR_del_rule = 1 ];do
317 | del_rule=`cat yhosts.txt | grep -n 'https://' | grep '\*' | grep -v '/\*'| grep -v '\^\*' | grep -v '\*\=' | grep -v '\$s\@' | grep -v '\$r\@'| awk -F":" '{print $1}' | sed -n '1p'`
318 | if [[ "$del_rule" != "" ]]; then
319 | sed -i "${del_rule}d" yhosts.txt
320 | else
321 | koolproxyR_del_rule=0
322 | fi
323 | done
324 |
325 |
326 |
327 | # ---------------------------------------------补充规则处理结束----------------------------------------------
328 |
329 | ## 删除临时文件
330 | rm *_https.txt
331 | rm kpr_our_rule.txt
332 | rm cjx-annoyance.txt
333 | rm tvbox.txt
334 |
335 | # 测试专用
336 | # split -l 1 yhosts.txt chengfeng_
337 | # ls|grep chengfeng_|xargs -n1 -i{} mv {} {}.txt
338 |
339 |
340 | cd ..
341 |
342 | cp -rf ../../../koolproxy/* ./rules
343 | find -name *.txt |sed 's#.*/##' > source.list
344 |
345 | # find -name chengfeng* |sed 's#.*/##' >> source.list
346 | # find -name fanboy_* |sed 's#.*/##' >> source.list
347 | sed -i 's/^/0|/' source.list
348 | sed -i 's/$/|0|0/' source.list
349 | sed -i '/user.txt/d' source.list
350 | echo "1|user.txt|0|0" >> source.list
351 | echo "0|kp.dat|0|0" >> source.list
352 | # source.list的格式命名
353 | # 开关 0表示关闭 1表示开启
354 | # 开关|规则名字|规则网址|规则备注名字
355 | # 不支持规则
356 |
357 | # 1 小于2个字符的 例如 ab
358 | # ~开头的
359 | # $webrtc,domain=avgle.com
360 | # @@*$stylesheet
361 |
362 | cd ..
363 | # 现在在\koolproxyR\koolproxyR\koolproxyR
364 | # wget https://raw.githubusercontent.com/koolshare/ledesoft/master/koolproxy/koolproxy/koolproxy/koolproxy
365 | cd ../..
366 | # 现在在 Y:\koolproxyR 也就是主目录
367 | # # Check and include base
368 | # DIR="$( cd "$( dirname "$BASH_SOURCE[0]" )" && pwd )"
369 |
370 | # # now include build_base.sh
371 | # . $DIR/../softcenter/build_base.sh
372 |
373 | # # change to module directory
374 | # cd $DIR
375 |
376 | # # do something here
377 |
378 | #
379 |
380 |
381 | do_build_result() {
382 | rm -f koolproxyR.tar.gz
383 | tar -zcvf koolproxyR.tar.gz koolproxyR
384 | md5value=`md5sum koolproxyR.tar.gz | cut -d \ -f1`
385 | echo "$VERSION" > version
386 | echo "$md5value" >> version
387 | }
388 | do_build_result
389 |
390 |
391 | sh backup.sh koolproxyR
392 | cd koolproxyR/koolproxyR/data/rules
393 | # ls | grep .txt | sed 's/^/md5sum /g' | >> rules_md5.sh
394 | md5sum easylistchina.txt|awk '{print $1}' > easylistchina.txt.md5
395 | # md5sum kp.dat|awk '{print $1}' > kp.dat.md5
396 | md5sum user.txt|awk '{print $1}' > user.txt.md5
397 | md5sum fanboy-annoyance.txt|awk '{print $1}' > fanboy-annoyance.txt.md5
398 | md5sum yhosts.txt|awk '{print $1}' > yhosts.txt.md5
399 |
400 |
--------------------------------------------------------------------------------
/history/2.2.0/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.0/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.1/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.1/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.2/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.2/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.3/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.3/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.4/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.4/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.5/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.5/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.6/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.6/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.2.7/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.2.7/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/2.8.8/koolproxyR.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/user1121114685/koolproxyR/0113a62cebac3b5f056beba0713aa950acb372ae/history/2.8.8/koolproxyR.tar.gz
--------------------------------------------------------------------------------
/history/version:
--------------------------------------------------------------------------------
1 | 2.2.0 f6609f5cf29c1bd3a24e12c20f505720
2 | 2.2.0 feaf9c60ba6f1ebe3ab760b2cc4ba77b
3 | 2.2.1 b8b8afb4d8919335e1481092a3426e5b
4 | 2.2.2 f0c2b9ec082f0c7573d587a0913c939a
5 | 2.2.3 de55230acdf715f0987ff0be2eedeef4
6 | 2.2.4 9b3166054f21f3209d0e0f1fd4dd45d4
7 | 2.2.5 ff1bcb30d64b3d4c9468fb6f40c72ff4
8 | 2.2.6 99afb1930bb662b27a684aa4fbb5b496
9 | 2.2.7 046bf28b6494be12db0789fc88292b56
10 | 2.8.8 be08cf6dbe9ae92ae4972db6cf2e4df9
11 |
--------------------------------------------------------------------------------
/koolproxy/daily.txt:
--------------------------------------------------------------------------------
1 | !x -----------------------------------------------------------------------------------------------------------------
2 | !x -----[KoolProxy 3.8.4]
3 | !x -----Thanks: From lvba Group
4 | !x -----Thanks for help: