mirror of
https://github.com/KaringX/karing-ruleset.git
synced 2025-06-08 20:24:13 +08:00
checkout runetfreedom
This commit is contained in:
parent
9bb63514a4
commit
a60a081fd4
7
.github/workflows/run.yml
vendored
7
.github/workflows/run.yml
vendored
@ -72,6 +72,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
bash workflow/resouces/cn_adblockfilters.sh ./sing-rule
|
bash workflow/resouces/cn_adblockfilters.sh ./sing-rule
|
||||||
|
|
||||||
|
- name: Checkout runetfreedom
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: runetfreedom/russia-v2ray-rules-dat
|
||||||
|
path: runetfreedom
|
||||||
|
ref: release
|
||||||
|
|
||||||
- name: RU antizapret
|
- name: RU antizapret
|
||||||
env:
|
env:
|
||||||
NO_SKIP: true
|
NO_SKIP: true
|
||||||
|
@ -22,18 +22,56 @@ sing_exe="${work_dir}/sing-box"
|
|||||||
|
|
||||||
# ———————————————————————————————————————————————————————————————————————————————————————————————
|
# ———————————————————————————————————————————————————————————————————————————————————————————————
|
||||||
|
|
||||||
|
AD_KEYWORDS="# 广告关键词
|
||||||
|
DOMAIN-KEYWORD,admarvel
|
||||||
|
DOMAIN-KEYWORD,admaster
|
||||||
|
DOMAIN-KEYWORD,adsage
|
||||||
|
DOMAIN-KEYWORD,adsensor
|
||||||
|
DOMAIN-KEYWORD,adsmogo
|
||||||
|
DOMAIN-KEYWORD,adsrvmedia
|
||||||
|
DOMAIN-KEYWORD,adsserving
|
||||||
|
DOMAIN-KEYWORD,adsystem
|
||||||
|
DOMAIN-KEYWORD,adwords
|
||||||
|
DOMAIN-KEYWORD,applovin
|
||||||
|
DOMAIN-KEYWORD,appsflyer
|
||||||
|
DOMAIN-KEYWORD,domob
|
||||||
|
DOMAIN-KEYWORD,duomeng
|
||||||
|
DOMAIN-KEYWORD,dwtrack
|
||||||
|
DOMAIN-KEYWORD,guanggao
|
||||||
|
DOMAIN-KEYWORD,omgmta
|
||||||
|
DOMAIN-KEYWORD,omniture
|
||||||
|
DOMAIN-KEYWORD,openx
|
||||||
|
DOMAIN-KEYWORD,partnerad
|
||||||
|
DOMAIN-KEYWORD,pingfore
|
||||||
|
DOMAIN-KEYWORD,socdm
|
||||||
|
DOMAIN-KEYWORD,supersonicads
|
||||||
|
DOMAIN-KEYWORD,wlmonitor
|
||||||
|
DOMAIN-KEYWORD,zjtoolbar
|
||||||
|
"
|
||||||
|
|
||||||
|
# ———————————————————————————————————————————————————————————————————————————————————————————————
|
||||||
|
|
||||||
|
|
||||||
function download_adblockfilters() {
|
function download_adblockfilters() {
|
||||||
mkdir -p $target_dir/adblockfilters
|
mkdir -p $target_dir/adblockfilters
|
||||||
cd $target_dir/adblockfilters/
|
cd $target_dir/adblockfilters/
|
||||||
|
|
||||||
file_array=("AdGuard_Base_filter.txt" "AdGuard_Chinese_filter.txt" "AdGuard_DNS_filter.txt" "AdGuard_Mobile_Ads_filter.txt" "adblockclashlite.list" "adblockclash.list")
|
file_array=("AdGuard_Base_filter.txt" "AdGuard_Chinese_filter.txt" "AdGuard_DNS_filter.txt" "AdGuard_Mobile_Ads_filter.txt" "adblockclashlite.list" "adblockclash.list")
|
||||||
for file in "${file_array[@]}"; do
|
for file in "${file_array[@]}"; do
|
||||||
wget --no-check-certificate -q --show-progress -T10 -t3 -O $file "https://github.com/217heidai/adblockfilters/raw/refs/heads/main/rules/${file}"
|
# --show-progress
|
||||||
|
wget --no-check-certificate -q -T10 -t3 -O $file "https://github.com/217heidai/adblockfilters/raw/refs/heads/main/rules/${file}"
|
||||||
|
|
||||||
if [[ "$file" == *.list ]]; then
|
if [[ "$file" == *.list ]]; then
|
||||||
|
|
||||||
basename=${file%.list}
|
basename=${file%.list}
|
||||||
echo "source << ${basename}"
|
echo "source << ${basename}"
|
||||||
|
|
||||||
|
# ad keys
|
||||||
|
if [[ "$file" == "adblockclashlite.list" ]]; then
|
||||||
|
echo "$AD_KEYWORDS" > temp_file && cat "$file" >> temp_file
|
||||||
|
mv temp_file "$file"
|
||||||
|
# echo "$AD_KEYWORDS" >> $file
|
||||||
|
fi
|
||||||
|
|
||||||
#convert to json
|
#convert to json
|
||||||
python $CURRENT_DIR/convert_json.py --single $target_dir/adblockfilters/$file $basename.json
|
python $CURRENT_DIR/convert_json.py --single $target_dir/adblockfilters/$file $basename.json
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ OPT_RULESET_GROUPS['default'] = {
|
|||||||
'default': 'off',
|
'default': 'off',
|
||||||
'outbound': 'block_out',
|
'outbound': 'block_out',
|
||||||
'rules': [
|
'rules': [
|
||||||
'acl:BanAD',
|
# 'acl:BanAD',
|
||||||
'geosite:category-ads',
|
'geosite:category-ads',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -120,7 +120,7 @@ OPT_RULESET_GROUPS['cn'] = {
|
|||||||
'default': 'off',
|
'default': 'off',
|
||||||
'outbound': 'block_out',
|
'outbound': 'block_out',
|
||||||
'rules': [
|
'rules': [
|
||||||
'acl:BanAD', # 3.7K
|
'acl:BanAD', # 135K = adblockclashlite
|
||||||
'geosite:category-ads', # 6.0K
|
'geosite:category-ads', # 6.0K
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -236,7 +236,7 @@ OPT_RULESET_GROUPS['cn'] = {
|
|||||||
|
|
||||||
##start ru
|
##start ru
|
||||||
OPT_RULESET_GROUPS['ru'] = OPT_RULESET_GROUPS['default'].copy()
|
OPT_RULESET_GROUPS['ru'] = OPT_RULESET_GROUPS['default'].copy()
|
||||||
OPT_RULESET_GROUPS['ru']['🇷🇺 blocked'] = {
|
OPT_RULESET_GROUPS['ru']['🇷🇺 antizapret'] = {
|
||||||
'default': 'on',
|
'default': 'on',
|
||||||
'outbound': 'selector_out',
|
'outbound': 'selector_out',
|
||||||
'rules': [
|
'rules': [
|
||||||
|
@ -23,8 +23,13 @@ target_dir="${work_dir}/russia"
|
|||||||
|
|
||||||
## runetfreedom/russia-v2ray-rules-dat
|
## runetfreedom/russia-v2ray-rules-dat
|
||||||
function clone_runetfreedom(){
|
function clone_runetfreedom(){
|
||||||
git clone -b release --single-branch --depth=1 git@github.com:runetfreedom/russia-v2ray-rules-dat.git runetfreedom
|
#git clone -b release --single-branch --depth=1 git@github.com:runetfreedom/russia-v2ray-rules-dat.git runetfreedom
|
||||||
rm -rf runetfreedom/.git
|
gitclone_dir=$(dirname $work_dir)/runetfreedom
|
||||||
|
if [[ ! -d "$gitclone_dir" ]]; then
|
||||||
|
echo "${gitclone_dir} unkown directory"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
cp -r $gitclone_dir . && rm -rf runetfreedom/.git
|
||||||
cd runetfreedom/sing-box/
|
cd runetfreedom/sing-box/
|
||||||
cp rule-set-geoip/geoip-ru-blocked.srs $work_dir/geo/geoip/blocked@ru.srs
|
cp rule-set-geoip/geoip-ru-blocked.srs $work_dir/geo/geoip/blocked@ru.srs
|
||||||
cp rule-set-geoip/geoip-ru-blocked-community.srs $work_dir/geo/geoip/blocked-community@ru.srs
|
cp rule-set-geoip/geoip-ru-blocked-community.srs $work_dir/geo/geoip/blocked-community@ru.srs
|
||||||
@ -41,7 +46,7 @@ function download_antizapret(){
|
|||||||
file_array=("antizapret.srs" "antizapret.srs.sha256sum")
|
file_array=("antizapret.srs" "antizapret.srs.sha256sum")
|
||||||
for file in "${file_array[@]}"; do
|
for file in "${file_array[@]}"; do
|
||||||
echo $file
|
echo $file
|
||||||
wget --no-check-certificate -q --show-progress -T10 -t3 "https://github.com/savely-krasovsky/antizapret-sing-box/releases/latest/download/${file}"
|
wget --no-check-certificate -q -T10 -t3 -O $file "https://github.com/savely-krasovsky/antizapret-sing-box/releases/latest/download/${file}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user