Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Blocky configration #124

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ if command -v netdata-claim.sh > /dev/null; then
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/netdata/health.d/ to $NETDATA_ETC"
sudo cp -rf "${XDG_CONFIG_HOME:-$HOME/.config}/netdata/health.d/" "$NETDATA_ETC"

logg info "Adding Blocky metrics collection to $NETDATA_ETC/go.d/prometheus.conf"
sudo sed -i "/jobs:/a\ - name: blocky_local \n url: 'http://127.0.0.1:4000/metrics'" "$NETDATA_ETC/go.d/prometheus.conf"

# Backup current health alarm configuration and apply new one
if [ -d /usr/local/lib/netdata ]; then
NETDATA_LIB='/usr/local/lib/netdata'
Expand Down
12 changes: 12 additions & 0 deletions home/dot_local/etc/blocky/blocky.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Blocky service
After=network-online.target

[Service]
User=blocky
ExecStart=/usr/local/bin/blocky --config /usr/local/etc/blocky/config.yaml
Restart=on-failure
AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=network-online.target
52 changes: 52 additions & 0 deletions home/dot_local/etc/blocky/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ports:
dns: 53
tls: 853
https: 443
http: 4000

log:
level: info
format: text
timestamp: true
privacy: false

upstreams:
groups:
default:
- 159.69.114.157
- 116.203.32.217
- tcp-tls:fdns1.dismail.de:853
- https://dns.digitale-gesellschaft.ch/dns-query

bootstrapDns:
- tcp+udp:1.1.1.1
- https://1.1.1.1/dns-query

blocking:
blackLists:
ads:
- https://easylist.to/easylist/easyprivacy.txt
- https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts
- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
- https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
- https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
- https://sysctl.org/cameleon/hosts
clientGroupsBlock:
default:
- ads
blockType: zeroIp

caching:
minTime: 5m
maxTime: 0
prefetching: true

prometheus:
enable: true
path: /metrics

queryLog:
type: none

specialUseDomains:
rfc6762-appendixG: true
6 changes: 5 additions & 1 deletion software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ softwarePackages:
_bin: blocky
_github: https://github.com/0xERR0R/blocky
_name: Blocky
_post:linux: |
cp -f "$HOME/.local/etc/blocky/config.yaml" /usr/local/etc/blocky/config.yaml
cp -f "$HOME/.local/etc/blocky/blocky.service" /usr/lib/systemd/system/blocky.service
_post:brew: cp -f "$HOME/.local/etc/blocky/config.yaml" "$(brew --prefix)/etc/blocky/config.yaml"
_service: blocky
_serviceEnabled: true
brew: blocky
Expand Down Expand Up @@ -8405,7 +8409,7 @@ softwarePackages:
_github: https://github.com/drakkan/sftpgo
_home: null
_name: sftpgo
_post: cp -f "$HOME/.local/etc/sftpgo.json" /usr/local/etc/sftpgo/sftpgo.json && sudo sftpgo initprovider
_post: cp -f "$HOME/.local/etc/sftpgo/sftpgo.json" /usr/local/etc/sftpgo/sftpgo.json && sudo sftpgo initprovider
_service: sftpgo
_serviceEnabled: true
brew: sftpgo
Expand Down
Loading