移除混合规则

This commit is contained in:
xishang0128 2024-03-18 23:53:37 +08:00
parent 3cdd8f31a1
commit b55020a18b
No known key found for this signature in database
GPG Key ID: 44A1E10B5ADF68CB
2 changed files with 21 additions and 21 deletions

View File

@ -265,17 +265,17 @@ jobs:
chmod 755 mosdns convert-clash.sh && ./convert-clash.sh chmod 755 mosdns convert-clash.sh && ./convert-clash.sh
rm mosdns* convert-clash.sh geoip.dat geosite.dat LICENSE README.md config.yaml rm mosdns* convert-clash.sh geoip.dat geosite.dat LICENSE README.md config.yaml
- name: Convert bm7-rule-set to sing-rule-set # - name: Convert bm7-rule-set to sing-rule-set
env: # env:
NO_SKIP: true # NO_SKIP: true
run: | # run: |
mkdir -p ./sing-rule/bm7 # mkdir -p ./sing-rule/bm7
cp ./resouces/bm7.sh ./sing-rule/bm7/ # cp ./resouces/bm7.sh ./sing-rule/bm7/
cd ./sing-rule/bm7 # cd ./sing-rule/bm7
wget https://github.com/SagerNet/sing-box/releases/download/v1.8.0-alpha.1/sing-box-1.8.0-alpha.1-linux-amd64.tar.gz -O sing-box.tar.gz && tar zxvf sing-box.tar.gz && mv sing-box-1.8.0-alpha.1-linux-amd64/sing-box ./ && rm -r sing-box-1.8.0-alpha.1-linux-amd64 # wget https://github.com/SagerNet/sing-box/releases/download/v1.8.0-alpha.1/sing-box-1.8.0-alpha.1-linux-amd64.tar.gz -O sing-box.tar.gz && tar zxvf sing-box.tar.gz && mv sing-box-1.8.0-alpha.1-linux-amd64/sing-box ./ && rm -r sing-box-1.8.0-alpha.1-linux-amd64
ls # ls
chmod 755 bm7.sh && ./bm7.sh # chmod 755 bm7.sh && ./bm7.sh
rm -r bm7.sh sing-box* rule # rm -r bm7.sh sing-box* rule
- name: Move and zip files - name: Move and zip files
run: | run: |

View File

@ -19,13 +19,13 @@ for ((i = 0; i < ${#list[@]}; i++)); do
./sing-box rule-set compile ./geosite/${list[i]}.json -o ./geosite/${list[i]}.srs ./sing-box rule-set compile ./geosite/${list[i]}.json -o ./geosite/${list[i]}.srs
done done
mkdir -p mixed # mkdir -p mixed
for file in $(find geoip -type f | grep -v srs | awk -F "/" '{print $NF}'); do # for file in $(find geoip -type f | grep -v srs | awk -F "/" '{print $NF}'); do
if [ -n "$(find geosite -type f -iname "$file")" ]; then # if [ -n "$(find geosite -type f -iname "$file")" ]; then
file=$(find ./geosite -type f -iname "$file" | awk -F"/" '{print $NF}' | sed 's/\.json//g') # file=$(find ./geosite -type f -iname "$file" | awk -F"/" '{print $NF}' | sed 's/\.json//g')
head -n -3 ./geoip/${file}.json >./mixed/${file}.json # head -n -3 ./geoip/${file}.json >./mixed/${file}.json
sed -i 's/]/],/g' ./mixed/${file}.json # sed -i 's/]/],/g' ./mixed/${file}.json
tail -n +5 ./geosite/${file}.json >>./mixed/${file}.json # tail -n +5 ./geosite/${file}.json >>./mixed/${file}.json
./sing-box rule-set compile ./mixed/${file}.json -o ./mixed/${file}.srs # ./sing-box rule-set compile ./mixed/${file}.json -o ./mixed/${file}.srs
fi # fi
done # done