diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | LICENSE | 22 | ||||
| -rw-r--r-- | Makefile | 35 | ||||
| -rw-r--r-- | go.mod | 3 | ||||
| -rw-r--r-- | go.sum | 2 | ||||
| -rw-r--r-- | readme | 4 |
6 files changed, 67 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0922409 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +sdns +todo.md @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2026 radhitya + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f1f8ac7 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +BINARY = sdns + +GO = go +GOMOD = . + +.PHONY: default build test lint fmt clean run install fuzz race + +default: test lint build + +build: + $(GO) build -o $(BINARY) $(GOMOD) + +test: + $(GO) test -race -count=1 ./... + +lint: + $(GO) vet ./... + +fmt: + gofmt -w . + +clean: + rm -f $(BINARY) + +run: build + ./$(BINARY) + +install: + $(GO) install $(GOMOD) + +fuzz: + $(GO) test -fuzz=FuzzBuildResponse -fuzztime=30s ./internal/server/ + +race: + $(GO) test -race -count=1 ./... @@ -2,8 +2,9 @@ module sdns go 1.26.1 +require github.com/miekg/dns v1.1.72 + require ( - github.com/miekg/dns v1.1.72 // indirect golang.org/x/mod v0.31.0 // indirect golang.org/x/net v0.48.0 // indirect golang.org/x/sync v0.19.0 // indirect @@ -1,3 +1,5 @@ +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI= github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs= golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= @@ -0,0 +1,4 @@ +sdns +==== + +simple authoritative dns written in golang |
