Blocky: Difference between revisions
Added upstream groups as it was added to the original project. See their doc https://0xerr0r.github.io/blocky/v0.23/configuration/#upstream-groups |
m Category:DNS added |
||
(8 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
[https://github.com/0xERR0R/blocky Blocky] is a DNS proxy and ad-blocker for the local network written in Go. | [https://github.com/0xERR0R/blocky Blocky] is a DNS proxy and ad-blocker for the local network written in [[Go]]. | ||
It provides network wide adblocking similar to Pi-hole while offering additional features (and it's in nixpkgs). | It provides network wide adblocking similar to Pi-hole while offering additional features (and it's in nixpkgs). | ||
== Configuration Examples == | == Configuration Examples == | ||
< | <syntaxHighlight lang=nix> | ||
services.blocky = { | services.blocky = { | ||
enable = true; | enable = true; | ||
settings = { | settings = { | ||
ports.dns = 53; # Port for incoming DNS Queries. | |||
upstreams.groups.default = [ | upstreams.groups.default = [ | ||
"https://one.one.one.one/dns-query" # Using Cloudflare's DNS over HTTPS server for resolving queries. | "https://one.one.one.one/dns-query" # Using Cloudflare's DNS over HTTPS server for resolving queries. | ||
]; | ]; | ||
Line 17: | Line 17: | ||
ips = [ "1.1.1.1" "1.0.0.1" ]; | ips = [ "1.1.1.1" "1.0.0.1" ]; | ||
}; | }; | ||
#Enable Blocking of | #Enable Blocking of certain domains. | ||
blocking = { | blocking = { | ||
denylists = { | |||
#Adblocking | #Adblocking | ||
ads = ["https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"]; | ads = ["https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"]; | ||
Line 25: | Line 25: | ||
adult = ["https://blocklistproject.github.io/Lists/porn.txt"]; | adult = ["https://blocklistproject.github.io/Lists/porn.txt"]; | ||
#You can add additional categories | #You can add additional categories | ||
}; | |||
#Configure what block categories are used | |||
clientGroupsBlock = { | |||
default = [ "ads" ]; | |||
kids-ipad = ["ads" "adult"]; | |||
}; | |||
}; | }; | ||
}; | }; | ||
}; | }; | ||
</ | </syntaxHighlight> | ||
== Adding Additional Functionality == | == Adding Additional Functionality == | ||
Line 42: | Line 42: | ||
caching = { | caching = { | ||
minTime = "5m"; | minTime = "5m"; | ||
maxTime = "30m" | maxTime = "30m"; | ||
prefetching = true; | prefetching = true; | ||
}; | }; | ||
</syntaxHighlight> | </syntaxHighlight> | ||
[[Category:Server]] | |||
[[Category:Networking]] | |||
[[Category:DNS]] |