Skip to content

Commit

Permalink
Update script
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdargon committed Nov 30, 2022
1 parent 2a2c5ae commit 5447067
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
9 changes: 9 additions & 0 deletions extensions/makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ cat tmp/title-filter-adult-VN.tmp tmp/adult-filter-VN.tmp > adult/filter-VN.txt
cat tmp/title-filter-gambling-VN.tmp tmp/gambling-filter-VN.tmp > gambling/filter-VN.txt
cat tmp/title-filter-threat-VN.tmp tmp/threat-filter-VN.tmp > threat/filter-VN.txt

echo "Creating rule file..."
# create rule
cat source/adult.tmp source/adult-VN.tmp | awk '{print "HOST-SUFFIX,"$1",REJECT"}' > adult/quantumult-rule.conf
cat source/gambling.tmp source/gambling-VN.tmp | awk '{print "HOST-SUFFIX,"$1",REJECT"}' > gambling/quantumult-rule.conf
cat source/threat.tmp source/threat-VN.tmp | awk '{print "HOST-SUFFIX,"$1",REJECT"}' > threat/quantumult-rule.conf
cat source/adult.tmp source/adult-VN.tmp | awk '{print "DOMAIN-SUFFIX,"$1}' > adult/surge-rule.conf
cat source/gambling.tmp source/gambling-VN.tmp | awk '{print "DOMAIN-SUFFIX,"$1}' > gambling/surge-rule.conf
cat source/threat.tmp source/threat-VN.tmp | awk '{print "DOMAIN-SUFFIX,"$1}' > threat/surge-rule.conf

# check duplicate
echo "Checking duplicate..."
cat tmp/adult-hosts.tmp | uniq -d
Expand Down
9 changes: 7 additions & 2 deletions tmp/title-config-loon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ Proxy = select, 🇻🇳hostsVN
FINAL,DIRECT

[Remote Rule]
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-exceptions-rule.conf, policy=DIRECT, tag=hostsVN, enabled=true
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-rule.conf, policy=REJECT, tag=hostsVN, enabled=true
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-exceptions-rule.conf, policy=DIRECT, tag=🇻🇳hostsVN, enabled=true
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-rule.conf, policy=REJECT, tag=🇻🇳hostsVN, enabled=true
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-OTA.conf, policy=REJECT, tag=🇻🇳hostsVN-OTA, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-FB.conf, policy=REJECT, tag=🇻🇳hostsVN-FB, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/adult/surge-rule.conf, policy=REJECT, tag=🇻🇳hostsVN-Adult, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/gambling/surge-rule.conf, policy=REJECT, tag=🇻🇳hostsVN-Gambling, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/threat/surge-rule.conf, policy=REJECT, tag=🇻🇳hostsVN-Threat, enabled=true

[Host]

Expand Down
4 changes: 4 additions & 0 deletions tmp/title-config-quantumultX.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-quantu
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-quantumult-rule.conf, tag=🇻🇳hostsVN, force-policy=reject, enabled=true
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-quantumult-OTA.conf, tag=🇻🇳hostsVN-OTA, force-policy=reject, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-quantumult-FB.conf, tag=🇻🇳hostsVN-FB, force-policy=reject, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/adult/quantumult-rule.conf, tag=🇻🇳hostsVN-Adult, force-policy=reject, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/gambling/quantumult-rule.conf, tag=🇻🇳hostsVN-Gambling, force-policy=reject, enabled=false
https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/threat/quantumult-rule.conf, tag=🇻🇳hostsVN-Threat, force-policy=reject, enabled=true


[rewrite_remote]
https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-quantumultX-rewrite.conf, tag=🇻🇳hostsVN, enabled=true
Expand Down
3 changes: 3 additions & 0 deletions tmp/title-config-shadowrocket.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-OTA.conf,REJECT
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-FB.conf,REJECT
RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-rewrite.conf,REJECT
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/adult/surge-rule.conf,REJECT
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/gambling/surge-rule.conf,REJECT
RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/threat/surge-rule.conf,REJECT
FINAL,DIRECT

[Host]
Expand Down
3 changes: 3 additions & 0 deletions tmp/title-config-surge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-OTA.conf,REJECT-TINYGIF,update-interval=21600
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-FB.conf,REJECT-TINYGIF,update-interval=21600
RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hostsVN-surge-rewrite.conf,REJECT-TINYGIF,update-interval=21600
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/adult/surge-rule.conf,REJECT-TINYGIF,update-interval=21600
#RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/gambling/surge-rule.conf,REJECT-TINYGIF,update-interval=21600
RULE-SET,https://raw.githubusercontent.com/bigdargon/hostsVN/master/extensions/threat/surge-rule.conf,REJECT-TINYGIF,update-interval=21600
IP-CIDR,0.0.0.0/32,REJECT,no-resolve
FINAL,DIRECT

Expand Down

0 comments on commit 5447067

Please sign in to comment.