-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b499ef0
Showing
33 changed files
with
8,454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[attr]adb linguist-language=AdBlock linguist-detectable | ||
|
||
/mod/rules/adblock-rules.txt adb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'blank_issues_enabled': false | ||
'contact_links': | ||
- 'about': > | ||
Please Read Issue Area Rules before submitting an issue. | ||
For Chinese User: 没看完Issue区版规前少特么瞎几把乱提Issue | ||
'name': 'Issue Area Rules' | ||
'url': 'https://github.com/Cats-Team/AdRules/wiki/Issue-Area-Rules' | ||
- 'about': > | ||
Only For Chinese User: 建议提Issue前先看完这个 | ||
'name': '提问的智慧' | ||
'url': 'https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Content Rules Allowlist Request | ||
description: Report incorrectly blocked website content. | ||
labels: ["content allow"] | ||
assignees: | ||
- zutzo | ||
body: | ||
- type: dropdown | ||
id: adblocker | ||
attributes: | ||
label: Which tool do you use? | ||
description: | | ||
Only the following tools are supported. | ||
multiple: true | ||
options: | ||
- AdGuard | ||
- uBlock Origin | ||
validations: | ||
required: true | ||
|
||
- type: dropdown | ||
id: blocklists | ||
attributes: | ||
label: Which List do you use? | ||
multiple: true | ||
options: | ||
- AdRules AdBlock List Lite | ||
- AdRules AdBlock List Normal | ||
- AdRules AdBlock List Plus | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: content | ||
attributes: | ||
label: Which content should be unblocked? | ||
description: | | ||
Please provide the content to be unblocked. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reason | ||
attributes: | ||
label: Why should the content be unblocked? Please Upload blocked log and screenshots! | ||
description: | | ||
If necessary, please describe the steps to reproduce. You better add screenshots. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: DNS Rules Allowlist Request | ||
description: Report incorrectly blocked Domains or App | ||
labels: ["dns allow"] | ||
assignees: | ||
- zutzo | ||
- hacamer | ||
body: | ||
- type: dropdown | ||
id: adblocker | ||
attributes: | ||
label: Which tool do you use? | ||
description: | | ||
If the tool is not listed, please select "Other" and enter its name in the comment field below. | ||
multiple: true | ||
options: | ||
- AdGuard | ||
- AdGuard Home | ||
- AdGuard DNS | ||
- Clash Meta | ||
- Quantumult X | ||
- SmartDNS | ||
- Mosdns | ||
- Loon | ||
- Surge | ||
- Other | ||
validations: | ||
required: true | ||
- type: input | ||
id: other | ||
attributes: | ||
label: Other | ||
validations: | ||
required: false | ||
|
||
- type: dropdown | ||
id: blocklists | ||
attributes: | ||
label: Which AdRules DNS List Syntax do you use? | ||
multiple: true | ||
options: | ||
- ABP | ||
- mosdns | ||
- Quantumult X | ||
- SmartDNS | ||
- Clash Domainset | ||
- Loon/Surge Ruleset | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: domains | ||
attributes: | ||
label: Which domain(s) should be unblocked? | ||
description: | | ||
Please provide the domains to be unblocked. And add logs screenshots. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reason | ||
attributes: | ||
label: Why should the domain(s) be unblocked? | ||
description: | | ||
Please describe the steps to reproduce. You must add screenshots. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Clear commits | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 15 */3 * * | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
actions: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: script | ||
- name: commit | ||
run: | | ||
git init | ||
git config --local user.name "actions" | ||
git config --local user.email "action@github.com" | ||
git checkout --orphan clearhistory | ||
git branch -D script | ||
git checkout --orphan script | ||
git add . | ||
git commit -m "🚀 CI Updated" | ||
git remote set-url --add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" | ||
git push -f -u origin script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Update Rules | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
push: | ||
paths: | ||
- 'script/*' | ||
- 'mod/*' | ||
|
||
workflow_dispatch: | ||
|
||
repository_dispatch: | ||
type: | ||
- [Manual-Update] | ||
|
||
jobs: | ||
update-rules: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- uses: actions/setup-node@v2 | ||
with: | ||
#node-version: '14' | ||
check-latest: true | ||
|
||
# Install hostlist-compiler | ||
- name: Install hostlist-compiler | ||
run: npm i -g @adguard/hostlist-compiler | ||
|
||
- name: Update Upstream | ||
continue-on-error: false | ||
run: | | ||
pip install requests | ||
bash ./script/update-upstream.sh | ||
tar -czvf archive.tar.gz ./tmp/* | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: archive.tar.gz | ||
path: archive.tar.gz | ||
|
||
- name: Build Rules | ||
continue-on-error: false | ||
run: | | ||
bash ./script/update-content-rules.sh | ||
bash ./script/update-dns-rules.sh | ||
rm -f archive.tar.gz | ||
- name: Update other rules | ||
run: | | ||
cd rules | ||
rm *.txt | ||
wget https://raw.githubusercontent.com/damengzhu/banad/main/jiekouAD.txt | ||
cd ../ | ||
- name: Git push assets to Github | ||
run: | | ||
git init | ||
git config --local user.name "actions" | ||
git config --local user.email "action@github.com" | ||
git checkout --orphan main | ||
git rm -rf .github | ||
git rm -rf script | ||
git rm -rf *.md | ||
git add *.{conf,txt,list,html,json,srs,mrs} rules/* mod/* | ||
git commit -m "Update at $(TZ=UTC-8 date +"%Y-%m-%d %H:%M")" | ||
git push -f -u origin main | ||
- name: Git push assets to other repos | ||
continue-on-error: true | ||
run: | | ||
rm -rf .git/ | ||
git init | ||
git config --local user.name "hacamer" | ||
git config --local user.email "hcamer145@gmail.com" | ||
git remote add origin "https://cats-team:${{ secrets.GITLAB_TOKEN }}@gitlab.com/cats-team/adrules.git" | ||
git remote set-url --add origin "https://hacamer:${{ secrets.GITEA_TOKEN }}@gitea.com/Cats-Team/AdRules.git" | ||
git remote set-url --add origin "https://hacamer:${{ secrets.BITBUCKET_TOKEN }}@bitbucket.org/hacamer/adrules.git" | ||
git checkout --orphan clearhistory | ||
git add *.{conf,html,txt,json,srs,mrs,list} rules/* mod/* | ||
git commit -am "Update at $(TZ=UTC-8 date +"%Y-%m-%d %H:%M")" | ||
git branch -m main | ||
git push --force --set-upstream origin main | ||
- name: Auto Built | ||
continue-on-error: true | ||
run: | | ||
curl -X POST "${{ secrets.CF_TOKEN }}" | ||
- name: Delete workflow runs | ||
uses: Mattraks/delete-workflow-runs@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} | ||
retain_days: 0 | ||
keep_minimum_runs: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Close inactive issues | ||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
workflow_dispatch: | ||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
days-before-issue-stale: 3 | ||
days-before-issue-close: 7 | ||
stale-issue-label: "stale" | ||
stale-issue-message: "This issue is stale because it has been open for 3 days with no activity." | ||
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale." | ||
days-before-pr-stale: -1 | ||
days-before-pr-close: -1 | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: desize | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
clean: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
run: git clone --mirror https://cats-team:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} repo_gh | ||
|
||
- name: Clean up | ||
run: | | ||
curl -fsSL -o bfg.jar https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar && \ | ||
java -jar bfg.jar --strip-blobs-bigger-than 10K -fs 100M repo_gh && \ | ||
cd repo_gh && \ | ||
git reflog expire --expire=now --all && \ | ||
git gc --prune=now --aggressive | ||
- name: Push | ||
run: | | ||
cd repo_gh | ||
git show-ref | cut -d' ' -f2 | grep 'pull' | xargs -r -L1 git update-ref -d | ||
git push origin --force | ||
cd ../ | ||
rm -rf repo_gh | ||
#Gitlab | ||
- name: Clone repo | ||
run: git clone --mirror https://cats-team:${{ secrets.GITLAB_TOKEN }}@gitlab.com/cats-team/adrules.git repo_gh | ||
|
||
- name: Clean up | ||
run: | | ||
curl -fsSL -o bfg.jar https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar && \ | ||
java -jar bfg.jar --strip-blobs-bigger-than 10K -fs 100M repo_gh && \ | ||
cd repo_gh && \ | ||
git reflog expire --expire=now --all && \ | ||
git gc --prune=now --aggressive | ||
- name: Push | ||
run: | | ||
cd repo_gh | ||
git show-ref | cut -d' ' -f2 | grep 'pull' | xargs -r -L1 git update-ref -d | ||
git push origin --force | ||
cd ../ | ||
rm -rf repo_gh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
push.sh | ||
.git/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gp.adrules.top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
Oops, something went wrong.