https://github.com/tantalor93/doq-go
DoQ client library written in Golang
https://github.com/tantalor93/doq-go
dns dns-over-quic doq golang rfc9250
Last synced: 6 months ago
JSON representation
DoQ client library written in Golang
- Host: GitHub
- URL: https://github.com/tantalor93/doq-go
- Owner: Tantalor93
- License: mit
- Created: 2023-04-04T10:56:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T11:44:51.000Z (over 1 year ago)
- Last Synced: 2025-03-18T11:11:29.698Z (about 1 year ago)
- Topics: dns, dns-over-quic, doq, golang, rfc9250
- Language: Go
- Homepage:
- Size: 86.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# doq-go
[](https://github.com/tantalor93/doq-go/releases)
[](https://github.com/Tantalor93/doq-go/blob/master/go.mod#L3)
[](https://godoc.org/github.com/tantalor93/doq-go/doq)
[](LICENSE)
[](https://circleci.com/gh/Tantalor93/doq-go?branch=main)
[](https://github.com/Tantalor93/doq-go/actions/workflows/lint.yml)
[](https://codecov.io/gh/Tantalor93/doq-go)
[](https://goreportcard.com/report/github.com/tantalor93/doq-go)
DNS over QUIC (=DoQ, as defined in [RFC9250](https://datatracker.ietf.org/doc/rfc9250/)) client library written in Golang and built on top [quic-go](https://github.com/quic-go/quic-go) and [dns](https://github.com/miekg/dns)
libraries.
## Usage in your project
add dependency
```
go get github.com/tantalor93/doq-go
```
## Examples
```
// create client with default settings resolving via AdGuard DoQ Server
client := doq.NewClient("dns.adguard-dns.com:853")
// prepare payload
q := dns.Msg{}
q.SetQuestion("www.google.com.", dns.TypeA)
// send DNS query
r, err := client.Send(context.Background(), &q)
if err != nil {
panic(err)
}
// do something with response
fmt.Println(dns.RcodeToString[r.Rcode])
```