Compare commits

...

2 Commits

Author SHA1 Message Date
astra 1aea2d35a5 Add dark theme 2023-03-26 23:34:06 +01:00
astra 6b9bd48e60 Update import path and dependencies 2023-03-26 23:33:20 +01:00
13 changed files with 81 additions and 32 deletions

View File

@ -39,13 +39,13 @@ to experiment with writing a DNS Client from scratch in `Go` myself. Hence the n
### Binary
You can grab the latest binaries for Linux, MacOS and Windows from the [Releases](https://github.com/mr-karan/doggo/releases) section.
You can grab the latest binaries for Linux, MacOS and Windows from the [Releases](https://git.zio.sh/astra/doggo/releases) section.
For eg, to pull the latest `linux-amd64` binary:
```shell
$ cd "$(mktemp -d)"
$ curl -sL "https://github.com/mr-karan/doggo/releases/download/v0.3.7/doggo_0.3.7_linux_amd64.tar.gz" | tar xz
$ curl -sL "https://git.zio.sh/astra/doggo/releases/download/v0.3.7/doggo_0.3.7_linux_amd64.tar.gz" | tar xz
$ mv doggo /usr/local/bin
# doggo should be available now in your $PATH
$ doggo
@ -94,7 +94,7 @@ scoop install doggo
You need to have `go` installed in your system.
```bash
$ go install github.com/mr-karan/doggo/cmd/doggo@latest
$ go install git.zio.sh/astra/doggo/cmd/doggo@latest
```
The binary will be available at `$GOPATH/bin/doggo`.

View File

@ -6,8 +6,8 @@ import (
"net/http"
"time"
"github.com/mr-karan/doggo/internal/app"
"github.com/mr-karan/doggo/pkg/utils"
"git.zio.sh/astra/doggo/internal/app"
"git.zio.sh/astra/doggo/pkg/utils"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi"

View File

@ -0,0 +1,48 @@
:root {
--primary: #4338ca;
--background: #0d1117;
}
body {
background-color: var(--background);
color: #c9d1d9;
}
.box {
border: 1px solid #30363d;
box-shadow: unset;
}
.help a {
text-decoration: none;
}
a:hover {
color: var(--primary);
text-decoration: underline;
}
input, select, button {
background-color: #010409;
border: 1px solid #30363d;
color: #ffffff;
}
button {
color: #c9d1d9;
background-color: #21262d;
box-shadow: 0 0 transparent, 0 0 transparent;
}
button:hover,
button:focus {
background-color: #30363d;
border-color: #8b949e;
transition-duration: .1s;
}
table th {
background: #161b22;
border-bottom: unset;
color: #c9d1d9;
}

View File

@ -8,9 +8,9 @@ import (
"net/http"
"time"
"github.com/mr-karan/doggo/internal/app"
"github.com/mr-karan/doggo/pkg/models"
"github.com/mr-karan/doggo/pkg/resolvers"
"git.zio.sh/astra/doggo/internal/app"
"git.zio.sh/astra/doggo/pkg/models"
"git.zio.sh/astra/doggo/pkg/resolvers"
)
type httpResp struct {

View File

@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link href="assets/style.css" rel="stylesheet">
<link href="assets/dark.css" rel="stylesheet">
</head>
<body>
<div class="main">
@ -52,7 +53,7 @@
required pattern="(tcp|udp|tls|https|sdns):\/\/(.*)" />
<p class="help">
To use different protocols like DOH, DOT etc. refer to the instructions
<a href="https://github.com/mr-karan/doggo#transport-options">here</a>.
<a href="https://git.zio.sh/astra/doggo#transport-options">here</a>.
</p>
</div>
</div>
@ -84,7 +85,7 @@
<span>&#9829;</span> by
<a href="https://mrkaran.dev"><strong>mrkaran</strong></a>
</p>
<p><a href="https://github.com/mr-karan/doggo">Source Code</a></p>
<p><a href="https://git.zio.sh/astra/doggo">Source Code</a></p>
</div>
</footer>
<script src="assets/main.js"> </script>

View File

@ -5,11 +5,11 @@ import (
"os"
"time"
"git.zio.sh/astra/doggo/internal/app"
"git.zio.sh/astra/doggo/pkg/resolvers"
"git.zio.sh/astra/doggo/pkg/utils"
"github.com/knadh/koanf"
"github.com/knadh/koanf/providers/posflag"
"github.com/mr-karan/doggo/internal/app"
"github.com/mr-karan/doggo/pkg/resolvers"
"github.com/mr-karan/doggo/pkg/utils"
"github.com/sirupsen/logrus"
flag "github.com/spf13/pflag"
)
@ -149,8 +149,8 @@ func main() {
// Resolve Queries.
var (
responses []resolvers.Response
responseErrors []error
responses []resolvers.Response
responseErrors []error
)
for _, q := range app.Questions {
for _, rslv := range app.Resolvers {

8
go.mod
View File

@ -1,4 +1,4 @@
module github.com/mr-karan/doggo
module git.zio.sh/astra/doggo
go 1.19
@ -8,9 +8,9 @@ require (
github.com/fatih/color v1.13.0
github.com/go-chi/chi v1.5.4
github.com/knadh/koanf v1.4.4
github.com/lucas-clemente/quic-go v0.31.1
github.com/miekg/dns v1.1.50
github.com/olekukonko/tablewriter v0.0.5
github.com/quic-go/quic-go v0.33.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/pflag v1.0.5
golang.org/x/sys v0.3.0
@ -24,8 +24,6 @@ require (
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20221219190121-3cb0bae90811 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.4 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.2 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
@ -34,6 +32,8 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/onsi/ginkgo/v2 v2.6.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 // indirect

12
go.sum
View File

@ -171,12 +171,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pretty v0.2.0/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/lucas-clemente/quic-go v0.31.1 h1:O8Od7hfioqq0PMYHDyBkxU2aA7iZ2W9pjbrWuja2YR4=
github.com/lucas-clemente/quic-go v0.31.1/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYgE6JQ+54TLd/Dq2g=
github.com/marten-seemann/qtls-go1-18 v0.1.4 h1:ogomB+lWV3Vmwiu6RTwDVTMGx+9j7SEi98e8QB35Its=
github.com/marten-seemann/qtls-go1-18 v0.1.4/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4=
github.com/marten-seemann/qtls-go1-19 v0.1.2 h1:ZevAEqKXH0bZmoOBPiqX2h5rhQ7cbZi+X+rlq2JUbCE=
github.com/marten-seemann/qtls-go1-19 v0.1.2/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
@ -257,6 +251,12 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/quic-go/qtls-go1-19 v0.2.1 h1:aJcKNMkH5ASEJB9FXNeZCyTEIHU1J7MmHyz1Q1TSG1A=
github.com/quic-go/qtls-go1-19 v0.2.1/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI=
github.com/quic-go/qtls-go1-20 v0.1.1 h1:KbChDlg82d3IHqaj2bn6GfKRj84Per2VGf5XV3wSwQk=
github.com/quic-go/qtls-go1-20 v0.1.1/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM=
github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0=
github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA=
github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=

View File

@ -1,9 +1,9 @@
package app
import (
"git.zio.sh/astra/doggo/pkg/models"
"git.zio.sh/astra/doggo/pkg/resolvers"
"github.com/miekg/dns"
"github.com/mr-karan/doggo/pkg/models"
"github.com/mr-karan/doggo/pkg/resolvers"
"github.com/sirupsen/logrus"
)

View File

@ -7,9 +7,9 @@ import (
"net/url"
"time"
"git.zio.sh/astra/doggo/pkg/config"
"git.zio.sh/astra/doggo/pkg/models"
"github.com/ameshkov/dnsstamps"
"github.com/mr-karan/doggo/pkg/config"
"github.com/mr-karan/doggo/pkg/models"
)
// LoadNameservers reads all the user given

View File

@ -4,9 +4,9 @@ import (
"encoding/json"
"fmt"
"git.zio.sh/astra/doggo/pkg/resolvers"
"github.com/fatih/color"
"github.com/miekg/dns"
"github.com/mr-karan/doggo/pkg/resolvers"
"github.com/olekukonko/tablewriter"
)

View File

@ -9,8 +9,8 @@ import (
"os"
"time"
"github.com/lucas-clemente/quic-go"
"github.com/miekg/dns"
"github.com/quic-go/quic-go"
"github.com/sirupsen/logrus"
)

View File

@ -3,8 +3,8 @@ package resolvers
import (
"time"
"git.zio.sh/astra/doggo/pkg/models"
"github.com/miekg/dns"
"github.com/mr-karan/doggo/pkg/models"
"github.com/sirupsen/logrus"
)