-
-
Notifications
You must be signed in to change notification settings - Fork 26
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 8756127
Showing
474 changed files
with
11,098,864 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,15 @@ | ||
# ------------ Main ------------ | ||
# development or production | ||
NODE_ENV=development | ||
|
||
# ------------ Server ------------ | ||
DOMAIN=http://127.0.0.1 | ||
PORT=8080 | ||
WS_FULL=ws://127.0.0.1:8095 | ||
WS_PORT=8095 | ||
|
||
# ----------- MongoDB ----------- | ||
MONGODB_URL=mongodb://127.0.0.1:27017/blocklist-beta | ||
|
||
# ----------- URLS ----------- | ||
SEFINEK_API=https://api.sefinek.net/api/v2 |
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,5 @@ | ||
github: sefinek | ||
ko_fi: sefinek | ||
buy_me_a_coffee: sefinek | ||
patreon: sefinek | ||
custom: ['https://www.paypal.me/sefinek24'] |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,32 @@ | ||
name: Broken Links | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "00 18 * * *" | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: main | ||
|
||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/lychee-action@v2 | ||
with: | ||
fail: false | ||
|
||
- name: Create Issue From File | ||
if: steps.lychee.outputs.exit_code != 0 | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: Link Checker Report | ||
content-filepath: ./lychee/out.md | ||
labels: report, automated issue |
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,91 @@ | ||
name: Download and generate blocklists | ||
|
||
on: | ||
schedule: # https://crontab.guru | ||
- cron: '0 */3 * * *' # At minute 0 past every 3rd hour. | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
download: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: main | ||
|
||
- name: Download blocklists | ||
run: bash bash/download.sh | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Prepare templates | ||
run: node scripts/prepare-templates.js | ||
|
||
- name: Remove duplicates from templates | ||
run: node scripts/remove-duplicates.js | ||
|
||
- name: Remove domains that are on the whitelist | ||
run: node scripts/whitelist.js | ||
|
||
- name: Set valid encoding | ||
run: node scripts/set-valid-encoding.js | ||
|
||
- name: Count domains | ||
run: node scripts/update-number-of-domains.js | ||
|
||
- name: Generate No IP list | ||
run: node scripts/generate/noip.js | ||
|
||
- name: Generate 0.0.0.0 list | ||
run: node scripts/generate/0.0.0.0.js | ||
|
||
- name: Generate 127.0.0.1 list | ||
run: node scripts/generate/127.0.0.1.js | ||
|
||
- name: Generate AdGuard list | ||
run: node scripts/generate/adguard.js | ||
|
||
- name: Generate Dnsmasq list | ||
run: node scripts/generate/dnsmasq.js | ||
|
||
- name: Generate RPZ list | ||
run: node scripts/generate/rpz.js | ||
|
||
- name: Generate list for Unbound | ||
run: node scripts/generate/unbound.js | ||
|
||
- name: Lint | ||
run: node scripts/lint.js | ||
|
||
- name: Run git pull | ||
run: git pull origin main | ||
|
||
- name: Add files to staging | ||
run: git add . | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config user.name "Sefinek Actions" | ||
git config user.email "[email protected]" | ||
if [ -n "$(git status -s)" ]; then | ||
MODIFIED_FILES=$(git diff --name-only HEAD | grep -v '^cache/') | ||
FILE_COUNT=$(echo "$MODIFIED_FILES" | wc -l) | ||
if [ "$FILE_COUNT" -gt 0 ]; then | ||
git commit -am "Main blocklist update every 3h [$FILE_COUNT files] - $(date -u '+%Y-%m-%d %H:%M:%S UTC')" -m "$MODIFIED_FILES" | ||
git push origin main | ||
else | ||
echo "Canceled. No files to commit after excluding cache/ files." | ||
fi | ||
else | ||
echo "Canceled. No changes to commit." | ||
fi |
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,18 @@ | ||
name: Issue assignment | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
auto-assign: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Auto-assign issue | ||
uses: pozil/auto-assign-issue@v2 | ||
with: | ||
assignees: sefinek | ||
numOfAssignee: 1 | ||
allowSelfAssign: false |
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,28 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'blocklists/**' | ||
|
||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- 'blocklists/**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
|
||
- run: node scripts/lint.js |
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,73 @@ | ||
name: Update Sefinek's lists | ||
|
||
on: | ||
schedule: # https://crontab.guru | ||
- cron: '0 10 * * *' # At 10:00. | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
sefin-lists: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: main | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Download lists | ||
run: node scripts/generate/file-processor/download.js --expose-gc | ||
|
||
- name: Generate lists | ||
run: node scripts/generate/file-processor/generate.js | ||
|
||
- name: Regex check | ||
run: node scripts/generate/file-processor/regex.js | ||
|
||
- name: Generate header | ||
run: node scripts/generate/file-processor/header.js | ||
|
||
- name: Prepare templates | ||
run: node scripts/prepare-templates.js | ||
|
||
- name: Remove duplicates from templates | ||
run: node scripts/remove-duplicates.js | ||
|
||
- name: Remove domains that are on the whitelist | ||
run: node scripts/whitelist.js | ||
|
||
- name: Count domains | ||
run: node scripts/update-number-of-domains.js | ||
|
||
- name: Run git pull | ||
run: git pull origin main | ||
|
||
- name: Add files to staging | ||
run: git add . | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config user.name "Sefinek Actions" | ||
git config user.email "[email protected]" | ||
if [ -n "$(git status -s)" ]; then | ||
MODIFIED_FILES=$(git diff --name-only HEAD | grep -v '^cache/') | ||
FILE_COUNT=$(echo "$MODIFIED_FILES" | wc -l) | ||
if [ "$FILE_COUNT" -gt 0 ]; then | ||
git commit -am "Update of Sefinek's lists [$FILE_COUNT files]" -m "$MODIFIED_FILES" | ||
git push origin main | ||
else | ||
echo "Canceled. No files to commit after excluding cache/ files." | ||
fi | ||
else | ||
echo "Canceled. No changes to commit." | ||
fi |
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,88 @@ | ||
name: Update manually approved blocklists | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.txt' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: main | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Prepare templates | ||
run: node scripts/prepare-templates.js | ||
|
||
- name: Remove duplicates from templates | ||
run: node scripts/remove-duplicates.js | ||
|
||
- name: Remove domains that are on the whitelist | ||
run: node scripts/whitelist.js | ||
|
||
- name: Set valid encoding | ||
run: node scripts/set-valid-encoding.js | ||
|
||
- name: Count domains | ||
run: node scripts/update-number-of-domains.js | ||
|
||
- name: Generate No IP list | ||
run: node scripts/generate/noip.js | ||
|
||
- name: Generate 0.0.0.0 list | ||
run: node scripts/generate/0.0.0.0.js | ||
|
||
- name: Generate 127.0.0.1 list | ||
run: node scripts/generate/127.0.0.1.js | ||
|
||
- name: Generate AdGuard list | ||
run: node scripts/generate/adguard.js | ||
|
||
- name: Generate Dnsmasq list | ||
run: node scripts/generate/dnsmasq.js | ||
|
||
- name: Generate RPZ list | ||
run: node scripts/generate/rpz.js | ||
|
||
- name: Generate list for Unbound | ||
run: node scripts/generate/unbound.js | ||
|
||
- name: Run git pull | ||
run: git pull origin main | ||
|
||
- name: Add files to staging | ||
run: git add . | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config user.name "Sefinek Actions" | ||
git config user.email "[email protected]" | ||
if [ -n "$(git status -s)" ]; then | ||
MODIFIED_FILES=$(git diff --name-only HEAD | grep -v '^cache/') | ||
FILE_COUNT=$(echo "$MODIFIED_FILES" | wc -l) | ||
if [ "$FILE_COUNT" -gt 0 ]; then | ||
git commit -am "Update previously committed blocklists in $GITHUB_SHA [$FILE_COUNT files]" -m "$MODIFIED_FILES" | ||
git push origin main | ||
else | ||
echo "Canceled. No files to commit after excluding cache/ files." | ||
fi | ||
else | ||
echo "Canceled. No changes to commit." | ||
fi |
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 @@ | ||
node_modules | ||
.env | ||
tmp |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.