Skip to content

Commit

Permalink
ouééé
Browse files Browse the repository at this point in the history
  • Loading branch information
NotaInutilis committed Nov 27, 2023
1 parent 5040c45 commit 92b7748
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 51 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/checklinks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check broken URLs
on:
schedule:
- cron: "24 18 * * 2"
workflow_dispatch:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check broken URLs
id: lychee
uses: lycheeverse/[email protected]
with:
args: --verbose --no-progress --insecure './sources/**/*.txt'
format: compact
output: ./test.txt
2 changes: 0 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Update blocklists

on:
push:
branches:
- master
paths:
- 'sources/**.txt'
- 'filters/**.txt'
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Fascists prey on the vulnerable so stay vigilant and consider also using a socia

Distributed under the [anti-fascist licence](https://github.com/rimu/no-qanon/blob/master/LICENSE.txt).

## Hosts format
## DNS blockers

### Hosts format

[Blocklist in Hosts format](https://raw.githubusercontent.com/rimu/no-qanon/master/hosts.txt) to use in a [hosts](https://en.wikipedia.org/wiki/Hosts_(file)) file or PiHole.

Expand All @@ -22,7 +24,7 @@ Distributed under the [anti-fascist licence](https://github.com/rimu/no-qanon/bl

Known issue: Firefox's DNS over HTTPS option bypasses the computer's hosts file ruleset. https://bugzilla.mozilla.org/show_bug.cgi?id=1453207

## Dnsmasq format
### Dnsmasq format

[Blocklist in Dnsmasq format](https://raw.githubusercontent.com/rimu/no-qanon/master/dnsmasq.txt) to use with the [Dnsmasq](https://thekelleys.org.uk/dnsmasq/doc.html) DNS server software.

Expand All @@ -44,23 +46,23 @@ Known issue: Firefox's DNS over HTTPS option bypasses the computer's hosts file

[Click here to subscribe.](https://iorate.github.io/ublacklist/subscribe?name=No-QAnon&url=https://raw.githubusercontent.com/rimu/no-qanon/master/ublacklist.txt) (This automatic subscription link is only compatible with Chrome, you have to add it by yourself on other browsers!)

### Domains list
## Fediverse formats

[Domains list format](https://raw.githubusercontent.com/rimu/no-qanon/master/domains.txt) to use with [Search Engine Spam Blocker](https://github.com/no-cmyk/Search-Engine-Spam-Blocker). It removes blocked sites from search engine results.
### Mastodon

## How to contribute
### Fediblockhole

Clone this repository and add new domains in the appropriate `.txt` files in the `sources` folder. If you do not want to categorize, just put it in the `sources/default.txt` file and it will be blocked.
## How to contribute

> For the `https://www.example.com` website, add `example.com` to the `sources/default.txt` file.
Clone this repository and add one domain per line in `.txt` files stored in the `sources` folder. Blocked sites are organized using subfolders and `.txt` files within the `sources` folder. Use markdown (`.md`) files and comments (`#`) to add more information and references.

Then, when you push your changes to the `sources` folder, GitHub actions should kick in and automatically generate new versions of the blocklists. Should you want to generate them yourself, you can run the `scripts/update.sh` script (prerequisites : bash, python).
> For the `https://www.example.com` website, add `example.com` on a new line of the `sources/default.txt` file.
Finally, make a pull request: we'll review and approve it within a few days.
You can paste the full URL: the update script will clean it and make it a domain. You can also add TLDs (e.g. `com`, without the dot), they will be blocked by Dnsmasq, adblockers and uBlacklist. Putting a domain in a `.txt` file with `fediverse` (e.g. `Bad Fediverse is bad.txt`) in its name will output it in the Fediverse blocklists.

### Categorization
Then, when you push your changes to the `sources` folder, GitHub actions automatically generate new versions of the blocklists. Should you want to generate them yourself, you can run the `scripts/update.sh` script (prerequisites : bash, python).

Blocked sites are organized using subfolders and `.txt` files in the `sources` folder. Use markdown (`.md`) files and comments (`#`) to add more information and references.
Finally, make a pull request: we'll review and approve it within a few days.

### How to contribute (easy mode)

Expand All @@ -79,8 +81,6 @@ This blocklist borrows from the following projects:

## Other useful lists

[Jmdugan Blocklists](https://github.com/jmdugan/blocklists/tree/master/corporations): consider blocking Twitter, YouTube and Facebook since they publish so many fake news.

[Antifa-n Blocklist](https://github.com/antifa-n/pihole/blob/master/blocklist.txt) is also a great blocklist focused on fascist sites.
[Jmdugan Blocklists](https://github.com/jmdugan/blocklists/tree/master/corporations): consider blocking platforms such as Twitter, YouTube and Facebook as they are riddled with fake news and fascist content.

[Bypass Methods Blocklist](https://github.com/nextdns/dns-bypass-methods) can be used to block bypass methods (VPNs, proxies, DNS, etc.).
2 changes: 0 additions & 2 deletions filters/TLDs.txt

This file was deleted.

13 changes: 3 additions & 10 deletions scripts/domains_to_adblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
# Usage:
# python domains_to_adblock.py > adblock.txt

with open("domains.txt", "r") as domains:
linesdomains = domains.readlines()

# Additional filters
## TLDs
with open("filters/TLDs.txt", "r") as tlds:
linestlds = tlds.readlines()

# Complete list generation
lines = linesdomains + linestlds
text_file = open("domains.txt", "r")
lines = text_file.readlines()
text_file.close()

for line in lines:
print('||' + line.strip() + '^')
13 changes: 3 additions & 10 deletions scripts/domains_to_dnsmasq.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
# Usage:
# python domains_to_dnsmasq.py > dnsmasq.txt

with open("domains.txt", "r") as domains:
linesdomains = domains.readlines()

# Additional filters
## TLDs
with open("filters/TLDs.txt", "r") as tlds:
linestlds = tlds.readlines()

# Complete list generation
lines = linesdomains + linestlds
text_file = open("domains.txt", "r")
lines = text_file.readlines()
text_file.close()

for line in lines:
print('address=/' + line.strip() + '/')
4 changes: 2 additions & 2 deletions scripts/domains_to_netsane.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This script converts domains.txt into a format used in /etc/hosts.
# This script converts domains.txt into a format used by netsane.
# Usage:
# python domains_to_etc_hosts.py > etc_hosts.txt
# python domains_to_netsane.py > netsane.txt

text_file = open("domains.txt", "r")
lines = text_file.readlines()
Expand Down
13 changes: 3 additions & 10 deletions scripts/domains_to_ublacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
# Usage:
# python domains_to_ublacklist.py > ublacklist.txt

with open("domains.txt", "r") as domains:
linesdomains = domains.readlines()

# Additional filters
## TLDs
with open("filters/TLDs.txt", "r") as tlds:
linestlds = tlds.readlines()

# Complete list generation
lines = linesdomains + linestlds
text_file = open("domains.txt", "r")
lines = text_file.readlines()
text_file.close()

for line in lines:
print('*://*.' + line.strip() + '/*')
1 change: 0 additions & 1 deletion scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ cat adblock_temp.txt >> adblock.txt
rm adblock_temp.txt
### uBlacklist
python scripts/domains_to_ublacklist.py > ublacklist_temp.txt
cp ./headers/adblock.txt ublacklist.txt # Currently using the same adblock header until uBlacklist implements its own header. https://github.com/iorate/ublacklist/issues/351
cat ublacklist_temp.txt >> ublacklist.txt
rm ublacklist_temp.txt

Expand Down
2 changes: 2 additions & 0 deletions sources/Far right/USA/Republican party TLDs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
republican
gop

0 comments on commit 92b7748

Please sign in to comment.