4
0
mirror of https://github.com/darkclip/netlist.git synced 2026-11-11 15:54:09 +08:00
This commit is contained in:
darkclip 2023-12-29 14:33:13 +08:00
parent 556a23bb06
commit ef0b0e400f
3 changed files with 30 additions and 43 deletions

View File

@ -33,8 +33,8 @@ jobs:
- name: Checkout reference branch 2
uses: actions/checkout@v3
with:
repository: 17mon/china_ip_list
ref: master
repository: loyalsoldier/v2ray-rules-dat
ref: release
path: ref2
- name: Checkout target branch
uses: actions/checkout@v3
@ -46,8 +46,9 @@ jobs:
run: rm target/*
- name: Rebuild target branch
run: |
./netgen.py ref2/china_ip_list.txt -o target/china4.txt
./netgen.py ref1/china6.txt -o target/china6.txt
./raydata.py ref2/geoip.dat -c CN -o target/chinaip.txt geoip
./netgen.py target/chinaip.txt -4 -o target/china4.txt
./netgen.py target/chinaip.txt -6 -o target/china6.txt
./netgen.py ref1/chinanet.txt -o target/telecom4.txt
./netgen.py ref1/chinanet6.txt -o target/telecom6.txt
@ -55,17 +56,17 @@ jobs:
./netgen.py ref1/unicom.txt -o target/unicom4.txt
./netgen.py ref1/unicom6.txt -o target/unicom6.txt
./netgen.py ref1/cmcc.txt -o target/cmcc4.txt
./netgen.py ref1/cmcc6.txt -o target/cmcc6.txt
./netgen.py ref1/cmcc.txt -o target/mobile4.txt
./netgen.py ref1/cmcc6.txt -o target/mobile6.txt
./netgen.py ref2/china_ip_list.txt -e ref1/chinanet.txt ref1/unicom.txt -o target/chinae2v4.txt
./netgen.py ref1/china6.txt -e ref1/chinanet6.txt ref1/unicom6.txt -o target/chinae2v6.txt
./netgen.py target/china4.txt -e ref1/chinanet.txt ref1/unicom.txt -o target/chinae2v4.txt
./netgen.py target/china6.txt -e ref1/chinanet6.txt ref1/unicom6.txt -o target/chinae2v6.txt
./netgen.py ref2/china_ip_list.txt -e ref1/chinanet.txt ref1/unicom.txt ref1/cmcc.txt -o target/chinae3v4.txt
./netgen.py ref1/china6.txt -e ref1/chinanet6.txt ref1/unicom6.txt ref1/cmcc6.txt -o target/chinae3v6.txt
./netgen.py target/china4.txt -e ref1/chinanet.txt ref1/unicom.txt ref1/cmcc.txt -o target/chinae3v4.txt
./netgen.py target/china6.txt -e ref1/chinanet6.txt ref1/unicom6.txt ref1/cmcc6.txt -o target/chinae3v6.txt
./netgen.py 0.0.0.0/0 -e private4.txt ref2/china_ip_list.txt -o target/foreign4.txt
./netgen.py ::/0 -e private6.txt ref1/china6.txt -o target/foreign6.txt
./netgen.py 0.0.0.0/0 -e private4.txt target/china4.txt -o target/foreign4.txt
./netgen.py ::/0 -e private6.txt target/china6.txt -o target/foreign6.txt
./netgen.py private4.txt -o target/private4.txt
./netgen.py private6.txt -o target/private6.txt

View File

@ -7,7 +7,7 @@ on:
paths:
- '.github/workflows/build-ros-list.yml'
schedule:
- cron: '0 16 * * *'
- cron: '10 16 * * *'
jobs:
build-ros-list:
@ -27,15 +27,8 @@ jobs:
- name: Checkout reference branch 1
uses: actions/checkout@v3
with:
repository: gaoyifan/china-operator-ip
ref: ip-lists
ref: net
path: ref1
- name: Checkout reference branch 2
uses: actions/checkout@v3
with:
repository: 17mon/china_ip_list
ref: master
path: ref2
- name: Checkout target branch
uses: actions/checkout@v3
with:
@ -48,37 +41,37 @@ jobs:
run: |
echo $'/ip firewall address-list/n' > target/china4.txt
echo $'/ipv6 firewall address-list/n' > target/china6.txt
./netgen.py ref2/china_ip_list.txt -o target/china4.txt -p 'add address=' -s $'comment="" disabled=no list=China\n'
./netgen.py ref1/china4.txt -o target/china4.txt -p 'add address=' -s $'comment="" disabled=no list=China\n'
./netgen.py ref1/china6.txt -o target/china6.txt -p 'add address=' -s $'comment="" disabled=no list=China\n'
echo $'/ip firewall address-list/n' > target/telecom4.txt
echo $'/ipv6 firewall address-list/n' > target/telecom6.txt
./netgen.py ref1/chinanet.txt -o target/telecom4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaTelecom\n'
./netgen.py ref1/chinanet6.txt -o target/telecom6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaTelecom\n'
./netgen.py ref1/telecom4.txt -o target/telecom4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaTelecom\n'
./netgen.py ref1/telecom6.txt -o target/telecom6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaTelecom\n'
echo $'/ip firewall address-list/n' > target/unicom4.txt
echo $'/ipv6 firewall address-list/n' > target/unicom6.txt
./netgen.py ref1/unicom.txt -o target/unicom4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaUnicom\n'
./netgen.py ref1/unicom4.txt -o target/unicom4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaUnicom\n'
./netgen.py ref1/unicom6.txt -o target/unicom6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaUnicom\n'
echo $'/ip firewall address-list/n' > target/cmcc4.txt
echo $'/ipv6 firewall address-list/n' > target/cmcc6.txt
./netgen.py ref1/cmcc.txt -o target/cmcc4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaMobile\n'
./netgen.py ref1/cmcc6.txt -o target/cmcc6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaMobile\n'
echo $'/ip firewall address-list/n' > target/mobile4.txt
echo $'/ipv6 firewall address-list/n' > target/mobile6.txt
./netgen.py ref1/mobile4.txt -o target/mobile4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaMobile\n'
./netgen.py ref1/mobile6.txt -o target/mobile6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaMobile\n'
echo $'/ip firewall address-list/n' > target/chinae2v4.txt
echo $'/ipv6 firewall address-list/n' > target/chinae2v6.txt
./netgen.py ref2/china_ip_list.txt -e ref1/chinanet.txt ref1/unicom.txt -o target/chinae2v4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaE2\n'
./netgen.py ref1/china4.txt -e ref1/chinanet.txt ref1/unicom.txt -o target/chinae2v4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaE2\n'
./netgen.py ref1/china6.txt -e ref1/chinanet6.txt ref1/unicom6.txt -o target/chinae2v6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaE2\n'
echo $'/ip firewall address-list/n' > target/chinae3v4.txt
echo $'/ipv6 firewall address-list/n' > target/chinae3v6.txt
./netgen.py ref2/china_ip_list.txt -e ref1/chinanet.txt ref1/unicom.txt ref1/cmcc.txt -o target/chinae3v4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaE3\n'
./netgen.py ref1/china4.txt -e ref1/chinanet.txt ref1/unicom.txt ref1/cmcc.txt -o target/chinae3v4.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaE3\n'
./netgen.py ref1/china6.txt -e ref1/chinanet6.txt ref1/unicom6.txt ref1/cmcc6.txt -o target/chinae3v6.txt -p 'add address=' -s $'comment="" disabled=no list=ChinaE3\n'
echo $'/ip firewall address-list/n' > target/foreign4.txt
echo $'/ipv6 firewall address-list/n' > target/foreign6.txt
./netgen.py 0.0.0.0/0 -e private4.txt ref2/china_ip_list.txt -o target/foreign4.txt -p 'add address=' -s $'comment="" disabled=no list=Foreign\n'
./netgen.py 0.0.0.0/0 -e private4.txt ref1/china4.txt -o target/foreign4.txt -p 'add address=' -s $'comment="" disabled=no list=Foreign\n'
./netgen.py ::/0 -e private6.txt ref1/china6.txt -o target/foreign6.txt -p 'add address=' -s $'comment="" disabled=no list=Foreign\n'
echo $'/ip firewall address-list/n' > target/private4.txt

View File

@ -7,7 +7,7 @@ on:
paths:
- '.github/workflows/build-sha.yml'
schedule:
- cron: '0 16 * * *'
- cron: '10 16 * * *'
jobs:
build-sha:
@ -27,15 +27,8 @@ jobs:
- name: Checkout reference branch 1
uses: actions/checkout@v3
with:
repository: gaoyifan/china-operator-ip
ref: ip-lists
ref: net
path: ref1
- name: Checkout reference branch 2
uses: actions/checkout@v3
with:
repository: 17mon/china_ip_list
ref: master
path: ref2
- name: Checkout target branch
uses: actions/checkout@v3
with:
@ -57,7 +50,7 @@ jobs:
echo 'ip route add 128.0.0.0/1 dev wgcf || true' >> target/wgcf-up.sh
echo 'ip route add ::/1 dev wgcf || true' >> target/wgcf-up.sh
echo 'ip route add 8000::/1 dev wgcf || true' >> target/wgcf-up.sh
./netgen.py ref2/china_ip_list.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref1/china4.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref1/china6.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
./netgen.py private4.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py private6.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
@ -72,7 +65,7 @@ jobs:
echo 'ip route del 128.0.0.0/1 dev wgcf || true' >> target/wgcf-down.sh
echo 'ip route del ::/1 dev wgcf || true' >> target/wgcf-down.sh
echo 'ip route del 8000::/1 dev wgcf || true' >> target/wgcf-down.sh
./netgen.py ref2/china_ip_list.txt -o target/wgcf-down.sh -p 'ip route del ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref1/china4.txt -o target/wgcf-down.sh -p 'ip route del ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref1/china6.txt -o target/wgcf-down.sh -p 'ip route del ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
./netgen.py private4.txt -o target/wgcf-up.sh -p 'ip route del ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py private6.txt -o target/wgcf-up.sh -p 'ip route del ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'