Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

repo: move blocklists into own directory #41

Merged
merged 1 commit into from
Mar 11, 2023
Merged
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
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,13 @@ donutdns via systemd.
Description=Block ads, trackers, and malicioius sites using DonutDNS.

[Service]
Type=simple
User=nobody
ExecStart=/opt/bin/donutdns
Environment=DONUT_DNS_PORT=53
Environment=DONUT_DNS_SUFFIX_DIR=/etc/blocklists.d
MemoryMax=128M
CPUWeight=90

[Install]
WantedBy=multi-user.target
Expand Down Expand Up @@ -233,7 +238,7 @@ sudo setcap CAP_NET_BIND_service+eip /opt/bin/donutdns

This will run the `donutdns` Docker container as the `nobody` user, mapping traffic from port 53.
```
docker run --rm -p 53:5301 -u nobody shoenig/donutdns:v0.2.0
docker run --rm -p 53:5301 -u nobody shoenig/donutdns:v0.3.2
```

#### as a Nomad job
Expand Down Expand Up @@ -270,7 +275,7 @@ job "donutdns" {
}

config {
image = "shoenig/donutdns:v0.1.2"
image = "shoenig/donutdns:v0.3.2"
}

template {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions sources/sets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func Test_customDir(t *testing.T) {

t.Run("myblocks", func(t *testing.T) {
s := set.New[string](10)
customDir("../hack/myblocks", s)
customDir("../blocklists.d", s)
must.NotEmpty(t, s)
must.Contains[string](t, "fb.com", s)
must.Contains[string](t, "cnn.com",s)
must.Contains[string](t, "cnn.com", s)
})
}