-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcalil.sh
executable file
·36 lines (33 loc) · 1.1 KB
/
calil.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
cd `dirname $0`
git reset --hard
git pull
git submodule update --init --recursive
#for i in gfwlist genpac domainlist
#do
# (cd $i;git pull origin master)
#done
rm -rf whitelist.txt
cp domainlist/whitelist.txt whitelist.txt
rm -rf env
virtualenv env
source env/bin/activate
(cd genpac;python setup.py install)
env/bin/genpac \
--pac-proxy "SOCKS5 127.0.0.1:1080" \
--gfwlist-url - \
--gfwlist-local gfwlist/gfwlist.txt \
-o PACList.pac
sed -e '5d' -e '3d' -i PACList.pac
deactivate
cd v2ray-rules-dat
rm -rf geo*
wget https://cdn.jsdelivr.net/gh/cdlaimin/v2ray-rules-dat@release/geoip.dat
wget https://cdn.jsdelivr.net/gh/cdlaimin/v2ray-rules-dat@release/geosite.dat
echo -e "最后一次更新时间 $(LANG=C date +"%Y-%m-%d %H:%M:%S")\n 两个文件用于V2ray的翻墙规则" > /root/FileList/v2ray-rules-dat/README.md
cd ..
echo -e "最后一次更新时间 $(LANG=C date +"%Y-%m-%d %H:%M:%S")\nhttps://raw.githubusercontent.com/cdlaimin/FileList/master/PACList.pac
" > /root/FileList/README.md
git add .
git commit -m "[$(LANG=C date +"%Y-%m-%d %H:%M:%S")]auto update"
git push --set-upstream origin master