add used projects as submodules
This commit is contained in:
parent
e307a33a13
commit
215e4d554d
@ -25,7 +25,7 @@ steps:
|
||||
api_key:
|
||||
from_secret: gitea_api_key
|
||||
base_url: https://gitea.neur0tx.site
|
||||
files: .temp/result/*
|
||||
files: .build/*
|
||||
checksum:
|
||||
- sha256
|
||||
when:
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
.temp
|
||||
.build
|
||||
.tool-versions
|
||||
|
9
.gitmodules
vendored
Normal file
9
.gitmodules
vendored
Normal 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
|
1
antizapret-pac-generator-light
Submodule
1
antizapret-pac-generator-light
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit f14aa53cc0b67fd5d7eac8b7dc6d7f3d75e8c0c9
|
1
domain-list-community
Submodule
1
domain-list-community
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit ea255cb1730b4f29f5a226f234243493fa143cd4
|
58
generate.sh
58
generate.sh
@ -1,28 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
mkdir -p .temp/result
|
||||
[ ! -d .temp/az ] && \
|
||||
git clone --depth=1 https://bitbucket.org/anticensority/antizapret-pac-generator-light.git .temp/az && \
|
||||
cd .temp/az && \
|
||||
patch < ../../data/az-cyrillic-idn-fix.patch && \
|
||||
bash update.sh && \
|
||||
bash parse.sh && \
|
||||
cd ../..
|
||||
[ ! -d .temp/geoip ] && \
|
||||
git clone --depth=1 https://github.com/v2fly/geoip.git .temp/geoip && \
|
||||
cat data/geoip-generator-config.json > .temp/geoip/config.json && \
|
||||
cd .temp/geoip && \
|
||||
([ ! -f geoip-src.dat ] && curl -fsSL https://github.com/v2fly/geoip/releases/latest/download/geoip.dat -o geoip-src.dat) && \
|
||||
mkdir -p data && \
|
||||
cp ../az/result/iplist_all.txt data/ru-blocked-ips-all && \
|
||||
cp ../az/result/iplist_blockedbyip.txt data/ru-blocked-ips-directblock && \
|
||||
cp ../az/result/iplist_blockedbyip_noid2971.txt data/ru-blocked-ips-noid2971 && \
|
||||
go run ./ && \
|
||||
mv output/dat/geoip.dat ../result/ && \
|
||||
cd ../..
|
||||
[ ! -d .temp/geosite ] && \
|
||||
git clone --depth=1 https://github.com/v2fly/domain-list-community.git .temp/geosite && \
|
||||
cd .temp/geosite && \
|
||||
cp ../az/result/hostlist_zones.txt data/category-ru-blocked-zones && \
|
||||
cp ../az/result/hostlist_original.txt data/category-ru-blocked-domains && \
|
||||
go run ./ --outputdir=../result --outputname=geosite.dat
|
||||
git submodule update --init --recursive
|
||||
|
||||
workdir=$(dirname "$0")
|
||||
build_dir="$workdir/.build"
|
||||
path_az=$(realpath antizapret-pac-generator-light)
|
||||
path_geoip=$(realpath geoip)
|
||||
path_geosite=$(realpath domain-list-community)
|
||||
path_data=$(realpath data)
|
||||
|
||||
# Initialize build dir
|
||||
mkdir -p "$build_dir"
|
||||
|
||||
# Initialize antizapret data
|
||||
cd "$path_az"
|
||||
patch < "$path_data/az-cyrillic-idn-fix.patch"
|
||||
bash update.sh
|
||||
bash parse.sh
|
||||
cd "$workdir"
|
||||
|
||||
# Generate geoip.dat
|
||||
cat "$path_data/geoip-generator-config.json" "$path_geoip/config.json"
|
||||
mkdir -p "$path_geoip/data"
|
||||
cp "$path_az/result/iplist_all.txt" "$path_geoip/data/ru-blocked-ips-all"
|
||||
cp "$path_az/result/iplist_blockedbyip.txt" "$path_geoip/data/ru-blocked-ips-directblock"
|
||||
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
1
geoip
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3182dda7b38c900f28505b91a44b09ec486e6f36
|
Loading…
Reference in New Issue
Block a user