Skip to content

Commit

Permalink
Merge pull request #2 from claranet/update-github-references
Browse files Browse the repository at this point in the history
Update github references and remove Dockerfile
  • Loading branch information
dvdme authored Nov 26, 2024
2 parents 2b397f4 + 4b9343a commit 8282e0f
Show file tree
Hide file tree
Showing 18 changed files with 87 additions and 60 deletions.
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

24 changes: 0 additions & 24 deletions Dockerfile.build

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# go-dnsmasq
[![Latest Version](https://img.shields.io/github/release/janeczku/go-dnsmasq.svg?maxAge=60)][release]
[![Github All Releases](https://img.shields.io/github/downloads/janeczku/go-dnsmasq/total.svg?maxAge=86400)]()
[![Docker Pulls](https://img.shields.io/docker/pulls/janeczku/go-dnsmasq.svg?maxAge=86400)][hub]
[![License](https://img.shields.io/github/license/janeczku/go-dnsmasq.svg?maxAge=86400)]()
[![Latest Version](https://img.shields.io/github/release/claranet/go-dnsmasq.svg?maxAge=60)][release]
[![Github All Releases](https://img.shields.io/github/downloads/claranet/go-dnsmasq/total.svg?maxAge=86400)]()
[![License](https://img.shields.io/github/license/claranet/go-dnsmasq.svg?maxAge=86400)]()

[release]: https://github.com/janeczku/go-dnsmasq/releases
[hub]: https://hub.docker.com/r/janeczku/go-dnsmasq/
[release]: https://github.com/claranet/go-dnsmasq/releases

go-dnsmasq is a lightweight (1.2 MB) DNS caching server/forwarder with minimal filesystem and runtime overhead.

Expand Down Expand Up @@ -87,7 +85,7 @@ Set to your StatHat account email address

#### Run from the command line

Download the binary for your OS from the [releases page](https://github.com/janeczku/go-dnsmasq/releases/latest).
Download the binary for your OS from the [releases page](https://github.com/claranet/go-dnsmasq/releases/latest).

go-dnsmasq is available in two versions. The minimal version (`go-dnsmasq-min`) has a lower memory footprint but doesn't have caching, stats reporting and systemd support.

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

"github.com/janeczku/go-dnsmasq/server"
"github.com/janeczku/go-dnsmasq/cache"
"github.com/claranet/go-dnsmasq/server"
"github.com/claranet/go-dnsmasq/cache"
log "github.com/sirupsen/logrus"
)

Expand Down
20 changes: 20 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module github.com/claranet/go-dnsmasq

go 1.21.6

require (
github.com/codegangsta/cli v1.20.0
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/miekg/dns v1.1.61
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/sirupsen/logrus v1.9.3
)

require (
github.com/stathat/go v1.0.0 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/tools v0.22.0 // indirect
)
30 changes: 30 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
github.com/codegangsta/cli v1.20.0 h1:iX1FXEgwzd5+XN6wk5cVHOGQj6Q3Dcp20lUeS4lHNTw=
github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs=
github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stathat/go v1.0.0 h1:HFIS5YkyaI6tXu7JXIRRZBLRvYstdNZm034zcCeaybI=
github.com/stathat/go v1.0.0/go.mod h1:+9Eg2szqkcOGWv6gfheJmBBsmq9Qf5KDbzy8/aYYR0c=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 2 additions & 0 deletions hostsfile/hostsfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.

// Fork 2024 maintaining MIT License (MIT)

// Package hosts provides address lookups from local hostfile (usually /etc/hosts).
package hosts

Expand Down
2 changes: 2 additions & 0 deletions hostsfile/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.

// Fork 2024 maintaining MIT License (MIT)

package hosts

import (
Expand Down
16 changes: 9 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.

package main // import "github.com/janeczku/go-dnsmasq"
// Fork 2024 maintaining MIT License (MIT)

package main

import (
"fmt"
Expand All @@ -21,11 +23,11 @@ import (
"github.com/codegangsta/cli"
"github.com/miekg/dns"

"github.com/janeczku/go-dnsmasq/hostsfile"
"github.com/janeczku/go-dnsmasq/resolvconf"
"github.com/janeczku/go-dnsmasq/server"
"github.com/janeczku/go-dnsmasq/control"
"github.com/janeczku/go-dnsmasq/stats"
"github.com/claranet/go-dnsmasq/hostsfile"
"github.com/claranet/go-dnsmasq/resolvconf"
"github.com/claranet/go-dnsmasq/server"
"github.com/claranet/go-dnsmasq/control"
"github.com/claranet/go-dnsmasq/stats"
)

// set at build time
Expand All @@ -48,7 +50,7 @@ func init() {
func main() {
app := cli.NewApp()
app.Name = "go-dnsmasq"
app.Usage = "Lightweight caching DNS server and forwarder\n Website: http://github.com/janeczku/go-dnsmasq"
app.Usage = "Lightweight caching DNS server and forwarder\n Website: http://github.com/janeczku/go-dnsmasq, http://github.com/claranet/go-dnsmasq"
app.UsageText = "go-dnsmasq [global options]"
app.Version = Version
app.Author, app.Email = "", ""
Expand Down
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git checkout master
sleep 2

docker run --rm \
-v `pwd`:/go/src/github.com/janeczku/go-dnsmasq \
-v `pwd`:/go/src/github.com/claranet/go-dnsmasq \
${BUILD_IMAGE_NAME} \
gox \
-os "$GOOS" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-min
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git checkout minimal
sleep 2

docker run --rm \
-v `pwd`:/go/src/github.com/janeczku/go-dnsmasq \
-v `pwd`:/go/src/github.com/claranet/go-dnsmasq \
${BUILD_IMAGE_NAME} \
gox \
-os "$GOOS" \
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-remote
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BUILD_CONTAINER=$(docker run -d \
-arch "$GOARCH" \
-output="go-dnsmasq_{{.OS}}-{{.Arch}}" \
-tags="netgo" \
-ldflags="-w -s -X github.com/janeczku/go-dnsmasq/main.Version `git describe --tags`")
-ldflags="-w -s -X github.com/claranet/go-dnsmasq/main.Version `git describe --tags`")
cleanup_container() {
docker rm -v ${BUILD_CONTAINER}
}
Expand All @@ -36,4 +36,4 @@ for f in $(docker run --rm ${BUILT_IMAGE} sh -c 'echo go-dnsmasq_*'); do
echo " "${f}
docker cp ${BUILD_CONTAINER}:/go/src/github.com/docker/machine/${f} ./
done
echo Done
echo Done
8 changes: 4 additions & 4 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ scripts/build-min $VERSION
# UPX compression
echo "Packing binaries with UPX..."
for BINARY in go-dnsmasq*_linux*; do
docker run --rm -v `pwd`:/go/src/github.com/janeczku/go-dnsmasq \
docker run --rm -v `pwd`:/go/src/github.com/claranet/go-dnsmasq \
go-dnsmasq-build goupx $BINARY
done

for BINARY in go-dnsmasq*_darwin*; do
docker run --rm -v `pwd`:/go/src/github.com/janeczku/go-dnsmasq \
docker run --rm -v `pwd`:/go/src/github.com/claranet/go-dnsmasq \
go-dnsmasq-build upx $BINARY
done
echo "Generating file hashs..."
docker run --rm -v `pwd`:/go/src/github.com/janeczku/go-dnsmasq go-dnsmasq-build ./scripts/generate-sums
docker run --rm -v `pwd`:/go/src/github.com/claranet/go-dnsmasq go-dnsmasq-build ./scripts/generate-sums
echo "Uploading release..."
docker run --rm -e GITHUB_TOKEN go-dnsmasq-build github-release release \
--user janeczku \
Expand All @@ -47,7 +47,7 @@ docker run --rm -e GITHUB_TOKEN go-dnsmasq-build github-release release \
--description "" \
--pre-release
for BINARY in go-dnsmasq*_*; do
docker run --rm -e GITHUB_TOKEN -v `pwd`:/go/src/github.com/janeczku/go-dnsmasq \
docker run --rm -e GITHUB_TOKEN -v `pwd`:/go/src/github.com/claranet/go-dnsmasq \
go-dnsmasq-build github-release upload \
--user janeczku \
--repo go-dnsmasq \
Expand Down
2 changes: 2 additions & 0 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.

// Fork 2024 maintaining MIT License (MIT)

package server

import (
Expand Down
2 changes: 2 additions & 0 deletions server/forwarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.

// Fork 2024 maintaining MIT License (MIT)

package server

import (
Expand Down
4 changes: 3 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.

// Fork 2024 maintaining MIT License (MIT)

package server

import (
Expand All @@ -14,7 +16,7 @@ import (

log "github.com/sirupsen/logrus"
"github.com/coreos/go-systemd/activation"
"github.com/janeczku/go-dnsmasq/cache"
"github.com/claranet/go-dnsmasq/cache"
"github.com/miekg/dns"
)

Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package server
"time"
"github.com/miekg/dns"
"github.com/janeczku/go-dnsmasq/cache"
"github.com/claranet/go-dnsmasq/cache"
)
// Keep global port counter that increments with 10 for each
Expand Down
2 changes: 1 addition & 1 deletion stats/graphite.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/rcrowley/go-metrics"
"github.com/rcrowley/go-metrics/stathat"

"github.com/janeczku/go-dnsmasq/server"
"github.com/claranet/go-dnsmasq/server"
log "github.com/sirupsen/logrus"
)

Expand Down

0 comments on commit 8282e0f

Please sign in to comment.