mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
vanadium/connectivity: dns block ai sites
This commit is contained in:
parent
ab5e9e8abf
commit
6c6d4ec13a
1 changed files with 25 additions and 0 deletions
|
|
@ -165,6 +165,31 @@
|
||||||
lb_strategy = "p2";
|
lb_strategy = "p2";
|
||||||
lb_estimator = true;
|
lb_estimator = true;
|
||||||
|
|
||||||
|
# Prevent building up reliance on chatbots
|
||||||
|
# Gotta preserve that thinking ability of my smoof bwain
|
||||||
|
blocked_names = {
|
||||||
|
blocked_names_file = let
|
||||||
|
ai-blocklist =
|
||||||
|
pkgs.fetchFromGitHub {
|
||||||
|
owner = "laylavish";
|
||||||
|
repo = "uBlockOrigin-HUGE-AI-Blocklist";
|
||||||
|
rev = "f63645250fbd982b8a6ebc9b384e7dbbc37d174c";
|
||||||
|
hash = "sha256-nuZnU+CJYdN8dR7yC8Zq13C8MgBYwZZdyQEFeSMUQkA=";
|
||||||
|
}
|
||||||
|
+ "/noai_hosts.txt";
|
||||||
|
|
||||||
|
# Blocklists are made of one pattern per line.
|
||||||
|
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/fa59f990431a49b6485f63f96601bc7e64017bf8/dnscrypt-proxy/example-dnscrypt-proxy.toml#L583C4-L583C75
|
||||||
|
blocked_names = lib.pipe (builtins.readFile ai-blocklist) [
|
||||||
|
(lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case
|
||||||
|
(lib.splitString "\n")
|
||||||
|
(builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x)))
|
||||||
|
(builtins.map (x: builtins.elemAt (lib.splitString " " x) 1)) # remove 0.0.0.0
|
||||||
|
];
|
||||||
|
in
|
||||||
|
pkgs.writeText "no-ai-blocklist" (builtins.concatStringsSep "\n" blocked_names);
|
||||||
|
};
|
||||||
|
|
||||||
# Add this to test if dnscrypt-proxy is actually used to resolve DNS requests
|
# Add this to test if dnscrypt-proxy is actually used to resolve DNS requests
|
||||||
# query_log.file = "/var/log/dnscrypt-proxy/query.log";
|
# query_log.file = "/var/log/dnscrypt-proxy/query.log";
|
||||||
sources.public-resolvers = {
|
sources.public-resolvers = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue