Compare commits

...

7 Commits

Author SHA1 Message Date
Loyalsoldier
64dbf736cb fixed google and apple rules 2019-12-15 19:13:40 +08:00
Loyalsoldier
7ed56de602 Update README.md 2019-12-15 18:39:10 +08:00
Loyalsoldier
2f065c5b37 fixed include commands 2019-12-15 18:25:24 +08:00
Loyalsoldier
58b06a5887 fixed color output 2019-12-15 18:18:45 +08:00
Loyalsoldier
9ad5f9fd0d Remove repeat domains 2019-12-15 18:14:44 +08:00
Loyalsoldier
8888445e2e Add @wongsyrone domain-block-list description 2019-12-15 16:25:51 +08:00
Loyalsoldier
4943b40560 Add blocked domains
Add blocked domains from @wongsyrone domain-block-list
2019-12-15 16:11:57 +08:00
2 changed files with 57 additions and 25 deletions

View File

@@ -4,7 +4,7 @@ on:
- cron: "0 19 * * *"
push:
branches:
- master
- master
jobs:
build:
@@ -25,8 +25,11 @@ jobs:
echo "::set-env name=NC::\033[0m"
echo "::set-env name=GEOIP_REPO::github.com/v2ray/geoip"
echo "::set-env name=GEOSITE_REPO::github.com/v2ray/domain-list-community"
echo "::set-env name=GOOGLE_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf"
echo "::set-env name=APPLE_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf"
echo "::set-env name=GFWLIST_URL::https://cokebar.github.io/gfwlist2dnsmasq/gfwlist_domain.txt"
echo "::set-env name=Profiles_URL::https://raw.githubusercontent.com/ConnersHua/Profiles/master/Shadow/Pro.conf"
echo "::set-env name=Blocked_DOMAINS_URL::https://raw.githubusercontent.com/wongsyrone/domain-block-list/master/domains.txt"
echo "::set-env name=CHINA_DOMAINS_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf"
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
shell: bash
@@ -49,29 +52,40 @@ jobs:
run: |
go get -u -v -insecure $GEOSITE_REPO
- name: Get and add gfwlist into geolocation-!cn
- name: Get and add gfwlist into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
curl -sSL $GFWLIST_URL > gfwlist
echo "include:gfwlist" >> geolocation-\!cn
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $GFWLIST_URL > temp-proxy.txt
- name: Get and add google domains into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $GOOGLE_URL | awk -F '/' '{print $2}' >> temp-proxy.txt
- name: Get and add proxy domains from @ConnersHua/Profiles into geolocation-!cn
- name: Get and add apple domains into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
curl -sSL $Profiles_URL | awk '/^DOMAIN.+PROXY/' | cut -d ',' -f 2 > profileproxy
echo "include:profileproxy" >> geolocation-\!cn
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $APPLE_URL | awk -F '/' '{print $2}' >> temp-proxy.txt
- name: Get and add direct domains from @ConnersHua/Profiles into cn
- name: Get and add proxy domains from @ConnersHua/Profiles into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
curl -sSL $Profiles_URL | awk '/^DOMAIN.+DIRECT/' | cut -d ',' -f 2 > profiledirect
echo "include:profiledirect" >> cn
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $Profiles_URL | awk '/^DOMAIN.+PROXY/' | cut -d ',' -f 2 >> temp-proxy.txt
- name: Get and add blocked domains from @wongsyrone/domain-block-list into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $Blocked_DOMAINS_URL >> temp-proxy.txt
- name: Get and add chinalist into cn
- name: Get and add direct domains from @ConnersHua/Profiles into temp-direct.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
curl -sSL $CHINA_DOMAINS_URL | awk -F '/' '{print $2}' > chinalist
echo "include:chinalist" >> cn
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $Profiles_URL | awk '/^DOMAIN.+DIRECT/' | cut -d ',' -f 2 > temp-direct.txt
- name: Get and add chinalist into temp-direct.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $CHINA_DOMAINS_URL | awk -F '/' '{print $2}' >> temp-direct.txt
- name: Get and add reject domains from @ConnersHua/Profiles into category-ads-all
run: |
@@ -79,6 +93,18 @@ jobs:
curl -sSL $Profiles_URL | awk '/^DOMAIN.+REJECT/' | cut -d ',' -f 2 > profilereject
echo "include:profilereject" >> category-ads-all
- name: Remove repeated domains and write domains to new lists
run: |
cd $GOPATH/src/$GEOSITE_REPO
cat temp-proxy.txt | sort --ignore-case -u > ./data/proxylist
cat temp-direct.txt | sort --ignore-case -u > ./data/directlist
- name: Add lists into appropriate category
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
echo "include:proxylist" >> geolocation-\!cn
echo "include:directlist" >> cn
- name: Build geosite.dat file
run: |
domain-list-community
@@ -86,32 +112,37 @@ jobs:
- name: List above process results
run: |
echo ">>>>>>>>>>>>>>>>>>>>>>>>"
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list files in geosite folder"
ls -lah $GOPATH/src/$GEOSITE_REPO
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list files in data folder"
ls -lah $GOPATH/src/$GEOSITE_REPO/data
echo ">>>>>>>>>>>>>>>>>>>>>>>>"
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list last 10 lines of cn file"
tail -n 10 $GOPATH/src/$GEOSITE_REPO/data/cn
echo ">>>>>>>>>>>>>>>>>>>>>>>>"
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list last 10 lines of geolocation-!cn file"
tail -n 10 $GOPATH/src/$GEOSITE_REPO/data/geolocation-\!cn
echo ">>>>>>>>>>>>>>>>>>>>>>>>"
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list last 10 lines of category-ads-all file"
tail -n 10 $GOPATH/src/$GEOSITE_REPO/data/category-ads-all
echo ">>>>>>>>>>>>>>>>>>>>>>>>"
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list files in publish folder"
ls -lah ./publish
echo ">>>>>>>>>>>>>>>>>>>>>>>>"
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo -e "${GREEN}完成啦!🌈${NC}"

View File

@@ -14,8 +14,9 @@
- 通过仓库 [@v2ray/domain-list-community](https://github.com/v2ray/domain-list-community) 生成
- **优点**:由于项目每天自动构建,所以更新速度比官方 `geosite.dat` 要快得多
- **加入大量中国大陆域名**:通过仓库 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list) 生成 `chinalist` 类别域名并加入到 `geosite:cn` 类别中
- **加入最新 GFWList**:通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成 `gfwlist` 类别域名并加入到 `geosite:geolocation-!cn` 类别中
- **加入大量中国大陆域名**:通过仓库 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list) 生成并加入到 `geosite:cn` 类别中
- **加入最新 GFWList**:通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成并加入到 `geosite:geolocation-!cn` 类别中
- **加入 Greatfire.org 检测到的屏蔽域名**:通过仓库 [@wongsyrone/domain-block-list](https://github.com/wongsyrone/domain-block-list) 获取 greatfire.org 检测到的屏蔽域名,并加入到 `geosite:geolocation-!cn` 类别中
- **加入更多直连、代理、广告域名**:通过仓库 [@ConnersHua/Profiles](https://github.com/ConnersHua/Profiles/tree/master) 获取更多直连、代理、广告域名,并分别加入到 `geosite:cn``geosite:geolocation-!cn``geosite:category-ads-all` 类别中
## 使用方式