add used projects as submodules

This commit is contained in:
Pavel 2023-11-16 11:45:15 +03:00
parent e307a33a13
commit 215e4d554d
7 changed files with 47 additions and 27 deletions

View File

@ -25,7 +25,7 @@ steps:
api_key: api_key:
from_secret: gitea_api_key from_secret: gitea_api_key
base_url: https://gitea.neur0tx.site base_url: https://gitea.neur0tx.site
files: .temp/result/* files: .build/*
checksum: checksum:
- sha256 - sha256
when: when:

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
.temp .build
.tool-versions .tool-versions

9
.gitmodules vendored Normal file
View File

@ -0,0 +1,9 @@
[submodule "antizapret-pac-generator-light"]
path = antizapret-pac-generator-light
url = https://bitbucket.org/anticensority/antizapret-pac-generator-light.git
[submodule "geoip"]
path = geoip
url = https://github.com/v2fly/geoip.git
[submodule "domain-list-community"]
path = domain-list-community
url = https://github.com/v2fly/domain-list-community.git

@ -0,0 +1 @@
Subproject commit f14aa53cc0b67fd5d7eac8b7dc6d7f3d75e8c0c9

1
domain-list-community Submodule

@ -0,0 +1 @@
Subproject commit ea255cb1730b4f29f5a226f234243493fa143cd4

View File

@ -1,28 +1,36 @@
#!/bin/bash #!/bin/bash
set -euxo pipefail set -euxo pipefail
mkdir -p .temp/result mkdir -p .temp/result
[ ! -d .temp/az ] && \ git submodule update --init --recursive
git clone --depth=1 https://bitbucket.org/anticensority/antizapret-pac-generator-light.git .temp/az && \
cd .temp/az && \ workdir=$(dirname "$0")
patch < ../../data/az-cyrillic-idn-fix.patch && \ build_dir="$workdir/.build"
bash update.sh && \ path_az=$(realpath antizapret-pac-generator-light)
bash parse.sh && \ path_geoip=$(realpath geoip)
cd ../.. path_geosite=$(realpath domain-list-community)
[ ! -d .temp/geoip ] && \ path_data=$(realpath data)
git clone --depth=1 https://github.com/v2fly/geoip.git .temp/geoip && \
cat data/geoip-generator-config.json > .temp/geoip/config.json && \ # Initialize build dir
cd .temp/geoip && \ mkdir -p "$build_dir"
([ ! -f geoip-src.dat ] && curl -fsSL https://github.com/v2fly/geoip/releases/latest/download/geoip.dat -o geoip-src.dat) && \
mkdir -p data && \ # Initialize antizapret data
cp ../az/result/iplist_all.txt data/ru-blocked-ips-all && \ cd "$path_az"
cp ../az/result/iplist_blockedbyip.txt data/ru-blocked-ips-directblock && \ patch < "$path_data/az-cyrillic-idn-fix.patch"
cp ../az/result/iplist_blockedbyip_noid2971.txt data/ru-blocked-ips-noid2971 && \ bash update.sh
go run ./ && \ bash parse.sh
mv output/dat/geoip.dat ../result/ && \ cd "$workdir"
cd ../..
[ ! -d .temp/geosite ] && \ # Generate geoip.dat
git clone --depth=1 https://github.com/v2fly/domain-list-community.git .temp/geosite && \ cat "$path_data/geoip-generator-config.json" "$path_geoip/config.json"
cd .temp/geosite && \ mkdir -p "$path_geoip/data"
cp ../az/result/hostlist_zones.txt data/category-ru-blocked-zones && \ cp "$path_az/result/iplist_all.txt" "$path_geoip/data/ru-blocked-ips-all"
cp ../az/result/hostlist_original.txt data/category-ru-blocked-domains && \ cp "$path_az/result/iplist_blockedbyip.txt" "$path_geoip/data/ru-blocked-ips-directblock"
go run ./ --outputdir=../result --outputname=geosite.dat cp "$path_az/result/iplist_blockedbyip_noid2971.txt" "$path_geoip/data/ru-blocked-ips-noid2971"
([ ! -f "$path_geoip/geoip-src.dat" ] && curl -fsSL https://github.com/v2fly/geoip/releases/latest/download/geoip.dat -o "$path_geoip/geoip-src.dat")
cd "$path_geoip" && go run ./ && cd "$workdir"
mv "$path_geoip/output/dat/geoip.dat" "$build_dir/geoip.dat"
# Generate geosite.dat
cp "$path_az/result/hostlist_zones.txt" "$path_geosite/data/category-ru-blocked-zones"
cp "$path_az/result/hostlist_original.txt" "$path_geosite/data/category-ru-blocked-domains"
cd "$path_geosite" && go run ./ --outputdir="$build_dir" --outputname=geosite.dat && cd "$workdir"

1
geoip Submodule

@ -0,0 +1 @@
Subproject commit 3182dda7b38c900f28505b91a44b09ec486e6f36