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

cleanup: modernize repo #7

Merged
merged 1 commit into from
Oct 3, 2022
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN go version && \
CGO_ENABLED=0 GOOS=linux go build

FROM alpine:3
MAINTAINER gophers.dev
MAINTAINER sethops1.net

WORKDIR /opt
COPY --from=builder /build/donutdns /opt
Expand Down
1 change: 0 additions & 1 deletion OSSMETADATA

This file was deleted.

12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

Block online ads by intercepting DNS queries

[![Go Report Card](https://goreportcard.com/badge/gophers.dev/cmds/donutdns)](https://goreportcard.com/report/gophers.dev/cmds/donutdns)
[![Build Status](https://app.travis-ci.com/shoenig/donutdns.svg)](https://app.travis-ci.com/github/shoenig/donutdns)
[![GoDoc](https://godoc.org/gophers.dev/cmds/donutdns?status.svg)](https://godoc.org/gophers.dev/cmds/donutdns)
![NetflixOSS Lifecycle](https://img.shields.io/osslifecycle/shoenig/donutdns.svg)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

## Project Overview

The `gophers.dev/cmds/donutdns` module provides a [CoreDNS](https://coredns.io) plugin
The `github.com/shoenig/donutdns` module provides a [CoreDNS](https://coredns.io) plugin
as well as a standalone executable DNS server that can be used to block DNS queries to
domains used by online advertisers, trackers, scammers, and crypto miners. The project
is meant to be a simpler alternative to the venerable [Pi-Hole](https://pi-hole.net). In
Expand Down Expand Up @@ -251,14 +247,14 @@ The `donutdns` standalone DNS Server is written in Go. It can be compiled and
installed using the normal Go toolchain in one step.

```
go install gophers.dev/cmds/donutdns@latest
go install github.com/shoenig/donutdns@latest
```

## Contributing

The `gophers.dev/cmds/donutdns` module is always improving with new features
The `github.com/shoenig/donutdns` module is always improving with new features
and bug fixes. For contributing such bug fixes and new features please file an issue.

## License

The `gophers.dev/cmds/donutdns` module is open source under the [BSD-3-Clause](LICENSE) license.
The `github.com/shoenig/donutdns` module is open source under the [BSD-3-Clause](LICENSE) license.
2 changes: 1 addition & 1 deletion agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"text/template"

"github.com/coredns/coredns/plugin/pkg/log"
"gophers.dev/pkgs/extractors/env"
"github.com/shoenig/extractors/env"
)

//go:embed config.tmpl
Expand Down
2 changes: 1 addition & 1 deletion agent/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strings"
"testing"

"github.com/shoenig/extractors/env"
"github.com/shoenig/test/must"
"gophers.dev/pkgs/extractors/env"
)

func TestCoreConfig_Generate(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module gophers.dev/cmds/donutdns
module github.com/shoenig/donutdns

go 1.18

Expand All @@ -7,9 +7,9 @@ require (
github.com/coredns/coredns v1.8.5
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/miekg/dns v1.1.43
github.com/shoenig/test v0.2.4
gophers.dev/pkgs/extractors v0.2.3
gophers.dev/pkgs/ignore v0.3.0
github.com/shoenig/extractors v0.3.0
github.com/shoenig/ignore v0.4.0
github.com/shoenig/test v0.4.0
)

require (
Expand All @@ -20,7 +20,7 @@ require (
github.com/dnstap/golang-dnstap v0.4.0 // indirect
github.com/farsightsec/golang-framestream v0.3.0 // indirect
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
github.com/gojuno/minimock/v3 v3.0.4 // indirect
github.com/gojuno/minimock/v3 v3.0.10 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
Expand Down
20 changes: 12 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/gojuno/minimock/v3 v3.0.4 h1:T2vPxdvk/aXtZ16veQIt6K85swVdOrm1DBc0lF7orE0=
github.com/gojuno/minimock/v3 v3.0.4/go.mod h1:HqeqnwV8mAABn3pO5hqF+RE7gjA0jsN8cbbSogoGrzI=
github.com/gojuno/minimock/v3 v3.0.10 h1:0UbfgdLHaNRPHWF/RFYPkwxV2KI+SE4tR0dDSFMD7+A=
github.com/gojuno/minimock/v3 v3.0.10/go.mod h1:CFXcUJYnBe+1QuNzm+WmdPYtvi/+7zQcPcyQGsbcIXg=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -243,7 +244,6 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c
github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
Expand All @@ -256,6 +256,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hexdigest/gowrap v1.1.7/go.mod h1:Z+nBFUDLa01iaNM+/jzoOA1JJ7sm51rnYFauKFUB5fs=
github.com/hexdigest/gowrap v1.1.8/go.mod h1:H/JiFmQMp//tedlV8qt2xBdGzmne6bpbaSuiHmygnMw=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
Expand All @@ -279,6 +280,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
Expand Down Expand Up @@ -355,8 +357,12 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/shoenig/test v0.2.4 h1:TM/otFRxMLAU/QWe0Xrhj/mb/oLdR+9tYwxoiPdedmk=
github.com/shoenig/test v0.2.4/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0=
github.com/shoenig/extractors v0.3.0 h1:B3nfz509DA74fGH/2w3Lgi1/sjuzJcadPhiiQp8+GJk=
github.com/shoenig/extractors v0.3.0/go.mod h1:pZoq4jZOFDIHBqD/SufEKTqZNni1urCN2JcgRgzW5ZU=
github.com/shoenig/ignore v0.4.0 h1:qPOWs0slbPMtenC0H3cKvu5Kn3hQFTE3yK6YJvyNDlA=
github.com/shoenig/ignore v0.4.0/go.mod h1:VF91FoiYAwXq4KinOq6zP5xfFw/Ib6MfftaGKYTpmwo=
github.com/shoenig/test v0.4.0 h1:3X4xG/Chx7mzi0h71Sm6Vo38q0EYaQIBZpYFRcA1HVM=
github.com/shoenig/test v0.4.0/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
Expand All @@ -378,6 +384,7 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/twitchtv/twirp v5.8.0+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -786,16 +793,13 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gophers.dev/pkgs/extractors v0.2.3 h1:sxp3S6cGbK/akCTSV153H7Nb5OP2Jjkbv/cQ1/rmeEA=
gophers.dev/pkgs/extractors v0.2.3/go.mod h1:Qx8iERgSiUqFeJDrLDJSwbGWFDI5cdFZB1wyW8UbkBU=
gophers.dev/pkgs/ignore v0.3.0 h1:zSZqTKD3ovb4eltYSGmE1QhCDWNeazdvTSnFnkmEo9U=
gophers.dev/pkgs/ignore v0.3.0/go.mod h1:HwTn4Fc9oicp2TxFV/8P0CswwfsVQczZvG6ZTy2TRXA=
gopkg.in/DataDog/dd-trace-go.v1 v1.33.0/go.mod h1:MFdmxQL1OfAGjPrYPU02P82Z5lJ/19f4JVAvXwK1brY=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
_ "github.com/coredns/coredns/plugin/forward"
_ "github.com/coredns/coredns/plugin/log"
"github.com/coredns/coredns/plugin/pkg/log"
"gophers.dev/cmds/donutdns/agent"
"gophers.dev/cmds/donutdns/plugins/donutdns"
"gophers.dev/pkgs/extractors/env"
"github.com/shoenig/donutdns/agent"
"github.com/shoenig/donutdns/plugins/donutdns"
"github.com/shoenig/extractors/env"
)

// directives contains the ordered set of plugins to enable in CoreDNS.
Expand Down
2 changes: 1 addition & 1 deletion plugins/donutdns/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
"gophers.dev/cmds/donutdns/sources/set"
"github.com/shoenig/donutdns/sources/set"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions plugins/donutdns/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/log"
"gophers.dev/cmds/donutdns/sources"
"gophers.dev/cmds/donutdns/sources/extract"
"gophers.dev/cmds/donutdns/sources/fetch"
"gophers.dev/cmds/donutdns/sources/set"
"gophers.dev/pkgs/ignore"
"github.com/shoenig/donutdns/sources"
"github.com/shoenig/donutdns/sources/extract"
"github.com/shoenig/donutdns/sources/fetch"
"github.com/shoenig/donutdns/sources/set"
"github.com/shoenig/ignore"
)

var pLog = log.NewWithPlugin(PluginName)
Expand Down
2 changes: 1 addition & 1 deletion sources/extract/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"regexp"

"gophers.dev/cmds/donutdns/sources/set"
"github.com/shoenig/donutdns/sources/set"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions sources/fetch/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"

"github.com/coredns/coredns/plugin/pkg/log"
"gophers.dev/cmds/donutdns/sources"
"gophers.dev/cmds/donutdns/sources/extract"
"gophers.dev/cmds/donutdns/sources/set"
"gophers.dev/pkgs/ignore"
"github.com/shoenig/donutdns/sources"
"github.com/shoenig/donutdns/sources/extract"
"github.com/shoenig/donutdns/sources/set"
"github.com/shoenig/ignore"
)

// A Downloader is used to download a set of source lists.
Expand Down
4 changes: 2 additions & 2 deletions sources/fetch/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"

"github.com/coredns/coredns/plugin/pkg/log"
"github.com/shoenig/donutdns/sources"
"github.com/shoenig/donutdns/sources/extract"
"github.com/shoenig/test/must"
"gophers.dev/cmds/donutdns/sources"
"gophers.dev/cmds/donutdns/sources/extract"
)

var pLog = log.NewWithPlugin("-test")
Expand Down