Compare commits

...

113 Commits

Author SHA1 Message Date
Renovate Bot 6677c6b5e5 fix(deps): update module github.com/quic-go/quic-go to v0.43.1
Mirror Push / mirror (push) Successful in 5s Details
Test / test (oldstable) (push) Successful in 41s Details
Test / test (stable) (push) Successful in 37s Details
2024-05-04 23:00:35 +00:00
Renovate Bot 7126c753e9 fix(deps): update module golang.org/x/sys to v0.20.0
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 41s Details
Test / test (stable) (push) Successful in 38s Details
2024-05-04 16:00:25 +00:00
Renovate Bot c1a4a7f93a fix(deps): update module github.com/quic-go/quic-go to v0.43.0
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 43s Details
Test / test (stable) (push) Successful in 40s Details
2024-04-27 15:00:46 +00:00
Sam Therapy 9aebf89f57
docs: make the README a little nicer
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 44s Details
Test / test (stable) (push) Successful in 37s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-04-19 23:01:11 +02:00
Renovate Bot 37e0c1e9b5 fix(deps): update module github.com/miekg/dns to v1.1.59
Mirror Push / mirror (push) Successful in 7s Details
Test / test (oldstable) (push) Successful in 43s Details
Test / test (stable) (push) Successful in 39s Details
2024-04-17 21:00:38 +00:00
Sam Therapy 40278ed22f
chore: Add Snap and Docker with Goreleaser
Forgejo Release / release (push) Failing after 1m6s Details
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 45s Details
Test / test (stable) (push) Successful in 38s Details
Why not though snap sucks and docker seems kind of pointless since this is just a static file

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-04-17 19:00:51 +02:00
Renovate Bot 7631dd7a7b fix(deps): update module golang.org/x/net to v0.24.0
Mirror Push / mirror (push) Successful in 5s Details
Test / test (oldstable) (push) Successful in 44s Details
Test / test (stable) (push) Successful in 39s Details
2024-04-04 20:01:14 +00:00
Renovate Bot 2140c1582f fix(deps): update module golang.org/x/sys to v0.19.0
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 45s Details
Test / test (stable) (push) Successful in 38s Details
2024-04-04 16:01:12 +00:00
Renovate Bot 8c00f85636 fix(deps): update module golang.org/x/net to v0.23.0
Mirror Push / mirror (push) Successful in 5s Details
Test / test (oldstable) (push) Successful in 45s Details
Test / test (stable) (push) Successful in 45s Details
2024-04-03 19:01:10 +00:00
Renovate Bot 8e54337787 chore(deps): update dependency go to v1.22.2
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 43s Details
Test / test (stable) (push) Successful in 44s Details
2024-04-03 16:01:11 +00:00
Sam Therapy a5980be3cc
docs: Use the docs folder more
Mirror Push / mirror (push) Successful in 7s Details
Test / test (stable) (push) Successful in 36s Details
Test / test (oldstable) (push) Successful in 56s Details
Also rename it from doc to docs

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-23 22:05:57 +01:00
Sam Therapy 58cee5b3c9
docs: Add more documentation
Mirror Push / mirror (push) Successful in 6s Details
Test / test (stable) (push) Successful in 39s Details
Test / test (oldstable) (push) Successful in 56s Details
Add the "official" logo.
Also run golangci-lint

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-23 22:00:01 +01:00
Renovate Bot 3881caff0d fix(deps): update module github.com/quic-go/quic-go to v0.42.0
Mirror Push / mirror (push) Successful in 6s Details
Test / test (oldstable) (push) Successful in 57s Details
Test / test (stable) (push) Successful in 29s Details
2024-03-18 02:01:09 +00:00
Sam Therapy d8c40abf5a
misc(deps): Re-enable automerge
Mirror Push / mirror (push) Successful in 5s Details
Test / test (stable) (push) Successful in 34s Details
Test / test (oldstable) (push) Successful in 55s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-16 23:47:30 +01:00
Sam Therapy 92cf0b465b
ci: Improve all actions
Mirror Push / mirror (push) Successful in 6s Details
Test / test (stable) (push) Successful in 50s Details
Test / test (oldstable) (push) Successful in 1m12s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-16 23:26:02 +01:00
Sam Therapy b5f4ea9c42
ci: Get rid of dedicated submodules step
Mirror Push / mirror (push) Successful in 9s Details
Test / test (stable) (push) Successful in 46s Details
Test / test (oldstable) (push) Successful in 53s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-16 21:28:49 +01:00
Sam Therapy 8434739516
fix(AAAA): AAAAA
Mirror Push / mirror (push) Successful in 8s Details
Test / test (oldstable) (push) Successful in 1m9s Details
Test / test (stable) (push) Successful in 41s Details
Gitea Release / release (push) Failing after 1m14s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-15 18:42:29 +01:00
Sam Therapy 556b7a48af
[SKIP CI] fix(readme): correct the manpage URL
Mirror Push / mirror (push) Successful in 7s Details
Test / test (oldstable) (push) Successful in 1m9s Details
Gitea Release / release (push) Failing after 1m19s Details
Test / test (stable) (push) Successful in 40s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-15 18:32:09 +01:00
Sam Therapy 21047275bf
fix(quic): A workaround for adguard not working over QUIC
Mirror Push / mirror (push) Successful in 6s Details
Test / test (stable) (push) Successful in 41s Details
Test / test (oldstable) (push) Successful in 52s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-03-15 18:20:03 +01:00
Sam Therapy 835cb8c950
fix(docs): Totally redesign the readme
Also, use the American spelling of LICENSE instead of LICENCE since that is what everyone else already does
2024-03-15 18:16:58 +01:00
Sam Therapy 20f5b21be1
fix(deps): go get -u 2024-03-15 15:35:02 +01:00
Renovate Bot b975dd8c00 fix(deps): update module golang.org/x/net to v0.22.0
Mirror Push / mirror (push) Successful in 9s Details
Test / test (oldstable) (push) Failing after 43s Details
Test / test (stable) (push) Failing after 41s Details
2024-03-04 21:00:28 +00:00
Renovate Bot 42e50d3e93 fix(deps): update module github.com/miekg/dns to v1.1.58
Mirror Push / mirror (push) Successful in 7s Details
Test / test (oldstable) (push) Successful in 37s Details
Test / test (stable) (push) Successful in 40s Details
2024-01-18 12:00:21 +00:00
Sam Therapy 7030e68100
fix(deps): go get -u
Mirror Push / mirror (push) Successful in 7s Details
Test / test (oldstable) (push) Successful in 34s Details
Test / test (stable) (push) Successful in 39s Details
2024-01-09 21:10:07 +01:00
Renovate Bot c4a267cec9 fix(deps): update module golang.org/x/net to v0.20.0
Mirror Push / mirror (push) Successful in 8s Details
Test / test (oldstable) (push) Successful in 35s Details
Test / test (stable) (push) Successful in 40s Details
2024-01-08 19:00:21 +00:00
Renovate Bot 434de0e5b4 fix(deps): update module golang.org/x/sys to v0.16.0
Mirror Push / mirror (push) Successful in 6s Details
Test / test (stable) (push) Successful in 38s Details
Test / test (oldstable) (push) Successful in 44s Details
2024-01-04 16:00:25 +00:00
Renovate Bot 52cef2e3a3 fix(deps): update module github.com/quic-go/quic-go to v0.40.1
Mirror Push / mirror (push) Successful in 6s Details
Test / test (stable) (push) Successful in 34s Details
Test / test (oldstable) (push) Successful in 41s Details
2023-12-13 05:00:25 +00:00
Renovate Bot e0b14b8b00 chore(deps): update actions/setup-go action to v5
Mirror Push / mirror (push) Successful in 8s Details
Test / test (stable) (push) Successful in 32s Details
Test / test (oldstable) (push) Successful in 40s Details
2023-12-06 16:00:23 +00:00
Renovate Bot c580ac78d4 fix(deps): update module golang.org/x/net to v0.19.0
Mirror Push / mirror (push) Successful in 7s Details
Test / test (stable) (push) Successful in 35s Details
Test / test (oldstable) (push) Successful in 41s Details
2023-11-27 18:00:40 +00:00
Renovate Bot 99e75afcd3 fix(deps): update module golang.org/x/sys to v0.15.0
Mirror Push / mirror (push) Successful in 8s Details
Test / test (oldstable) (push) Successful in 34s Details
Test / test (stable) (push) Successful in 40s Details
2023-11-27 17:00:24 +00:00
Renovate Bot 6ddbf854d8 fix(deps): update module github.com/miekg/dns to v1.1.57
Mirror Push / mirror (push) Successful in 9s Details
Test / test (stable) (push) Successful in 35s Details
Test / test (oldstable) (push) Successful in 39s Details
2023-11-15 10:00:52 +00:00
Sam Therapy 16ef3de591
docs(readme): Use a better file name for deb
Mirror Push / mirror (push) Successful in 8s Details
Test / test (stable) (push) Successful in 33s Details
Test / test (oldstable) (push) Successful in 41s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-13 18:44:48 +01:00
Renovate Bot f9263300c7 fix(deps): update module golang.org/x/net to v0.18.0
Mirror Push / mirror (push) Successful in 8s Details
Test / test (oldstable) (push) Successful in 36s Details
Test / test (stable) (push) Successful in 39s Details
2023-11-08 23:00:24 +00:00
Sam Therapy d43543e48a
fix(deps): Go sum update from goreleaser
Mirror Push / mirror (push) Successful in 8s Details
Test / test (oldstable) (push) Successful in 34s Details
Test / test (stable) (push) Successful in 39s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-09 00:38:52 +01:00
Sam Therapy 0a6d6b432c
fix(ci): Force goreleaser to use gitea
Mirror Push / mirror (push) Successful in 11s Details
Test / test (oldstable) (push) Successful in 43s Details
Test / test (stable) (push) Successful in 38s Details
Gitea Release / release (push) Failing after 1m10s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 22:04:09 +01:00
Sam Therapy ffb16ff7fa
fix)ci): make apt update first
Mirror Push / mirror (push) Successful in 7s Details
Gitea Release / release (push) Failing after 31s Details
Test / test (stable) (push) Successful in 39s Details
Test / test (oldstable) (push) Successful in 41s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 21:57:50 +01:00
Sam Therapy efb4cd6c4a
[SKIP CI] fix(ci): remove sudo
Mirror Push / mirror (push) Successful in 7s Details
Gitea Release / release (push) Failing after 29s Details
Test / test (stable) (push) Successful in 31s Details
Test / test (oldstable) (push) Successful in 37s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 21:54:57 +01:00
Sam Therapy 59fa146d7f
feat!(quic): Remove gccgo support
Mirror Push / mirror (push) Successful in 7s Details
Gitea Release / release (push) Failing after 22s Details
Test / test (stable) (push) Successful in 38s Details
Test / test (oldstable) (push) Successful in 1m23s Details
Since gccgo is stuck at 1.18 without generics, drop support
sadge

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 21:51:44 +01:00
Sam Therapy c5c90b97af
fix(deps): go get -u
Mirror Push / mirror (push) Successful in 10s Details
Test / test (stable) (push) Successful in 33s Details
Test / test (oldstable) (push) Successful in 41s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 21:47:19 +01:00
Sam Therapy e1122a9de7
misc: Cleanup before a release
Mirror Push / mirror (push) Successful in 8s Details
Test / test (stable) (push) Successful in 33s Details
Test / test (oldstable) (push) Successful in 42s Details
Kept a lot waiting, haven't I?

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 21:45:39 +01:00
Sam Therapy 26ef04b969 feat(goreleaser): Vastly simplify upload process (#229)
Mirror Push / mirror (push) Successful in 8s Details
Test / test (stable) (push) Successful in 38s Details
Test / test (oldstable) (push) Successful in 1m1s Details
Make the upload process to Gitea packages much less of a clusterbomb

Reviewed-on: #229
2023-11-08 18:02:34 +00:00
Sam Therapy 2565d34ade
docs(readme): Update mailing list
Mirror Push / mirror (push) Successful in 10s Details
Test / test (oldstable) (push) Successful in 35s Details
Test / test (stable) (push) Successful in 38s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 01:04:30 +01:00
Sam Therapy 7dd9b138a3
ci: Add sr.ht mirror
Mirror Push / mirror (push) Successful in 9s Details
Test / test (oldstable) (push) Successful in 34s Details
Test / test (stable) (push) Successful in 39s Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-08 00:54:53 +01:00
Sam Therapy b8a2407169 ci: Add Gitea Actions (#228)
Test / test (oldstable) (push) Successful in 1m0s Details
Test / test (stable) (push) Successful in 39s Details
Use Gitea Actions instead of Drone.

Reviewed-on: #228
2023-11-07 20:27:18 +00:00
Renovate Bot 9ef46d33e8 fix(deps): update module golang.org/x/sys to v0.14.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-11-04 16:00:24 +00:00
Renovate Bot 939a09da5b fix(deps): update module github.com/quic-go/quic-go to v0.40.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-31 05:00:30 +00:00
Renovate Bot 87c59551ec fix(deps): update module github.com/quic-go/quic-go to v0.39.3
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-27 07:00:24 +00:00
Renovate Bot 7efc9523bf fix(deps): update module github.com/quic-go/quic-go to v0.39.2
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-25 05:00:39 +00:00
Renovate Bot 2084ae69f6 fix(deps): update module github.com/quic-go/quic-go to v0.39.1
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-17 07:00:22 +00:00
Renovate Bot 5130b6c3cd fix(deps): update module golang.org/x/net to v0.17.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-10 17:00:24 +00:00
Renovate Bot 8c949ce4ca fix(deps): update module golang.org/x/net to v0.16.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-06 00:00:19 +00:00
Renovate Bot b3fad7abcf fix(deps): update module golang.org/x/sys to v0.13.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-10-05 13:00:22 +00:00
Renovate Bot b713aeb7d4 fix(deps): update module github.com/quic-go/quic-go to v0.39.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-24 12:00:23 +00:00
Renovate Bot 260eb979b3 fix(deps): update module gotest.tools/v3 to v3.5.1
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-16 20:00:23 +00:00
Renovate Bot 83ecfbaea1 fix(deps): update module github.com/miekg/dns to v1.1.56
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-12 11:00:22 +00:00
Renovate Bot 10faea804b chore(deps): update goreleaser/goreleaser-action action to v5
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-11 19:00:21 +00:00
Renovate Bot 0f80004790 fix(deps): update module golang.org/x/net to v0.15.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-05 17:00:24 +00:00
Renovate Bot 12863559c5 chore(deps): update actions/checkout action to v4
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-04 13:00:20 +00:00
Renovate Bot 8e9574f870 fix(deps): update module golang.org/x/sys to v0.12.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-09-02 13:00:21 +00:00
Renovate Bot fadb04f49f fix(deps): update module github.com/quic-go/quic-go to v0.38.1
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-08-25 01:00:23 +00:00
Renovate Bot 5704c6a0dd fix(deps): update module github.com/quic-go/quic-go to v0.38.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-08-21 04:00:25 +00:00
Renovate Bot 9c8e5349bf fix(deps): update module github.com/quic-go/quic-go to v0.37.6
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-08-20 00:00:25 +00:00
Sam Therapy dcd932c42e
[SKIP CI] docs: Bump go version in README
Maybe with the removal of the quic TLS fork go version can be supported
longer

gccgo generic support soon (tm) :(
2023-08-11 20:37:07 +02:00
Sam Therapy f4c3283954
[SKIP CI] fix(goreleaser): Unbreak termux?
Hopefully this unbreaks termux packages because they try going into
/usr/bin which makes termux very sad
2023-08-11 20:23:31 +02:00
Sam Therapy 824a60aef1
fix(mk): Add version number in -V
awk(1) magic saves the day
2023-08-11 20:22:16 +02:00
Sam Therapy 43e53a4055
fix(ci): Update GitHub Actions to Go 1.21
continuous-integration/drone/push Build is passing Details
2023-08-10 19:43:43 +02:00
Sam Therapy 60b0300eec
fix(goreleaser): Remove deprecation warnings
continuous-integration/drone/push Build is passing Details
2023-08-10 19:37:54 +02:00
Sam Therapy 9740e6b348
fix(deps): Update indirect dependencies
continuous-integration/drone/push Build is passing Details
2023-08-10 19:35:03 +02:00
Renovate Bot 8c888a90f1 fix(deps): update module gotest.tools/v3 to v3.5.0 (#202)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-committed-by: Renovate Bot <renovate@whitesourcesoftware.com>
2023-08-10 15:07:46 +00:00
Renovate Bot 71477684d9 fix(deps): update module github.com/quic-go/quic-go to v0.37.4 (#206)
continuous-integration/drone/push Build is running Details
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-committed-by: Renovate Bot <renovate@whitesourcesoftware.com>
2023-08-10 15:07:32 +00:00
Renovate Bot e3951db486 fix(deps): update module golang.org/x/net to v0.14.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-08-04 23:00:28 +00:00
Renovate Bot dfe4cca176 fix(deps): update module golang.org/x/sys to v0.11.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-08-04 16:00:23 +00:00
Renovate Bot b5102c91e6 fix(deps): update module golang.org/x/net to v0.13.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-08-01 22:00:24 +00:00
Renovate Bot 03e8f6be61 Merge pull request 'fix(deps): update module golang.org/x/net to v0.12.0' (#205) from renovate/golang.org-x-net-0.x into master
continuous-integration/drone/push Build is passing Details
2023-07-15 17:00:20 +00:00
Renovate Bot f60cd1c315 Merge pull request 'fix(deps): update module golang.org/x/sys to v0.10.0' (#204) from renovate/golang.org-x-sys-0.x into master
continuous-integration/drone/push Build is passing Details
2023-07-15 15:35:47 +00:00
Renovate Bot 00b116abf4 Merge pull request 'fix(deps): update module github.com/quic-go/quic-go to v0.36.2' (#203) from renovate/github.com-quic-go-quic-go-0.x into master
continuous-integration/drone/push Build was killed Details
2023-07-15 15:35:40 +00:00
Renovate Bot 821149b463 Merge pull request 'fix(deps): update module golang.org/x/net to v0.11.0' (#199) from renovate/golang.org-x-net-0.x into master
continuous-integration/drone/push Build is passing Details
2023-06-21 19:07:12 +00:00
Renovate Bot f2f53795ef Merge pull request 'fix(deps): update module github.com/miekg/dns to v1.1.55' (#200) from renovate/github.com-miekg-dns-1.x into master
continuous-integration/drone/push Build is running Details
2023-06-21 19:06:39 +00:00
Renovate Bot 322345a758 Merge pull request 'fix(deps): update module github.com/quic-go/quic-go to v0.36.0' (#201) from renovate/github.com-quic-go-quic-go-0.x into master
continuous-integration/drone/push Build is passing Details
2023-06-21 18:58:40 +00:00
Renovate Bot b4de2ba89e Merge pull request 'fix(deps): update module golang.org/x/sys to v0.9.0' (#198) from renovate/golang.org-x-sys-0.x into master
continuous-integration/drone/push Build is running Details
2023-06-21 18:58:15 +00:00
Sam Therapy 3421066420
[SKIP CI] docs(readme): I hate RPM
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-06-09 01:32:26 +02:00
Sam Therapy aef8a73a28
[SKIP CI] packaging: Correct RPM documentation
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-06-09 01:07:02 +02:00
Sam Therapy ba93384f9b
misc: lint
continuous-integration/drone/push Build is passing Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-06-02 23:21:56 +02:00
Sam Therapy 66855b5542 make test happy for some reason
continuous-integration/drone/push Build is failing Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-06-02 21:10:05 +00:00
Sam Therapy ccc9df39b6 update QUIC code to work with new quic-go version
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-06-02 21:10:05 +00:00
Renovate Bot c6bbda17b2 fix(deps): update module github.com/quic-go/quic-go to v0.35.1 2023-06-02 21:10:05 +00:00
Sam Therapy db77f2315c
fix(https): Small HTTPS annoyance fixes
continuous-integration/drone/push Build is failing Details
Fixes /dns-query being appended on failure
Fixes /dns-query from being appended when it should not be

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-06-02 22:54:02 +02:00
Sam Therapy a157dcb7fb
[SKIP CI] feat(goreleaser): Target termux too 2023-05-15 17:02:00 +02:00
Sam Therapy 428c218405
[SKIP CI] docs(readme): Update packaging location
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-05-14 23:21:39 +02:00
Sam Therapy 8df4863cf4
feat(ci): use my new package utility instead of pages
continuous-integration/drone/push Build is passing Details
2023-05-14 22:45:54 +02:00
Sam Therapy c0cd4d7771
feat(goreleaser): Enable APK and RPM
Gitea supports them now so add them!
2023-05-12 23:19:24 +02:00
Renovate Bot 5f1b81a2be fix(deps): update module golang.org/x/net to v0.10.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-05-08 17:00:21 +00:00
Renovate Bot 45d1aaf535 fix(deps): update module golang.org/x/sys to v0.8.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-05-04 16:00:24 +00:00
Renovate Bot 4f42657294 fix(deps): update module github.com/quic-go/quic-go to v0.34.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-04-30 00:00:27 +00:00
Renovate Bot b6bd22a8fe fix(deps): update module github.com/miekg/dns to v1.1.54
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-04-29 23:00:27 +00:00
Sam Therapy b0d8e325d6
fix(gomod): Explicitly require 1.19
continuous-integration/drone/push Build is passing Details
2023-04-30 00:42:09 +02:00
Sam Therapy fb9fd7689f
fix(trace): Remove wrong error message
continuous-integration/drone/push Build is passing Details
Reverse queries *are* actually supported, so the error message was wrong
Even dig supports it naturally.
2023-04-27 22:04:28 +02:00
Sam Therapy 329d81c001
fix(deps): go get -u
continuous-integration/drone/push Build is passing Details
2023-04-12 14:46:46 +02:00
Renovate Bot 5329a6f2e0 fix(deps): update module golang.org/x/net to v0.9.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-04-10 20:00:30 +00:00
Renovate Bot 95ff6f554c fix(deps): update module golang.org/x/sys to v0.7.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-04-04 17:00:43 +00:00
Sam Therapy 928123edbd
fix(deps): go get -u
continuous-integration/drone/push Build is passing Details
2023-03-28 22:21:18 +02:00
Renovate Bot fd3ceeb066 chore(deps): update actions/setup-go action to v4
continuous-integration/drone/push Build is passing Details
2023-03-28 20:18:02 +00:00
Renovate Bot 1acd48b16d fix(deps): update module github.com/miekg/dns to v1.1.53
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is running Details
2023-03-28 19:00:34 +00:00
Sam Therapy 27ece358c6
fix(resolvers): QUIC: close as soon as the writing is done
continuous-integration/drone/push Build is passing Details
This is required by RFC 9250, and would break some requests when done wrong

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-03-09 23:39:00 +01:00
Sam Therapy 58fa7af2ea
fix(release): Correct scoop bucket location
continuous-integration/drone/push Build is passing Details
Use the scoop bucket template
2023-03-07 18:45:45 +01:00
Sam Therapy 75fb8f2fc6
fix(docs): We're so back
continuous-integration/drone/push Build is passing Details
Using my fork of the DNSCrypt library brings back go install

This reverts commit daff2b7687.
2023-03-07 00:13:26 +01:00
Sam Therapy 3423958809
fix(deps): Use my fork of the dnscrypt lib (#185)
continuous-integration/drone/push Build is passing Details
- Uses newer versions of libraries
- Nicer URL (subjective)
- it is mine :)

Reviewed-on: #185
Reviewed-by: grumbulon <grumbulon@grumbulon.xyz>
2023-03-06 22:41:12 +00:00
Renovate Bot 60491c39c1 fix(deps): update module golang.org/x/net to v0.8.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-03-05 04:00:19 +00:00
Renovate Bot 39f605740a fix(deps): update module golang.org/x/sys to v0.6.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-03-04 16:00:22 +00:00
Sam Therapy 171f5d0d11
fix(doc): fix literally unusable typo in manpage
continuous-integration/drone/push Build is passing Details
2023-03-01 16:16:21 +01:00
Renovate Bot 1e4ff59631 fix(deps): update module github.com/miekg/dns to v1.1.51
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-02-26 12:00:19 +00:00
Renovate Bot f1583fef52 fix(deps): update module github.com/quic-go/quic-go to v0.33.0
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2023-02-22 06:00:28 +00:00
Sam Therapy fa709ca327
fix(ci): :(
continuous-integration/drone/push Build was killed Details
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-20 20:44:59 +01:00
42 changed files with 686 additions and 558 deletions

View File

@ -1,166 +0,0 @@
// SPDX-License-Identifier: BSD-3-Clause
local testing(version, arch) = {
kind: 'pipeline',
type: 'docker',
name: '%s-%s' % [version, arch],
platform: {
arch: arch,
},
steps: [
{
name: 'lint',
image: 'golangci/golangci-lint',
commands: [
'golangci-lint run ./...',
],
},
{
name: 'cache',
image: 'golang:%s' % [version],
commands: [
'go mod tidy',
],
depends_on: [
'lint',
],
volumes: [
{
name: 'cache',
path: '/go',
},
],
},
{
name: 'test',
image: 'golang:%s' % [version],
commands: [
'make test-ci',
],
depends_on: [
'cache',
],
volumes: [
{
name: 'cache',
path: '/go',
},
],
},
{
name: 'fuzz',
image: 'golang:%s' % [version],
commands: [
'make fuzz-ci',
],
depends_on: [
'cache',
],
volumes: [
{
name: 'cache',
path: '/go',
},
],
},
],
trigger: {
event: {
exclude: [
'tag',
],
},
},
volumes: [
{
name: 'cache',
temp: {},
},
],
};
// "Inspired by" https://goreleaser.com/ci/drone/
local release() = {
kind: 'pipeline',
type: 'docker',
name: 'release',
clone: {
disable: true,
},
trigger: {
event: [
'tag',
],
},
steps: [
{
name: 'clone',
image: 'woodpeckerci/plugin-git',
settings: {
tags: true,
},
},
{
name: 'test',
image: 'golang',
commands: [
'make test-ci',
],
volumes: [
{
name: 'cache',
path: '/go',
},
],
},
{
name: 'release',
image: 'goreleaser/goreleaser',
environment: {
GITEA_TOKEN: {
from_secret: 'GITEA_TOKEN',
},
},
commands: [
'apk add --no-cache scdoc',
'goreleaser release',
],
volumes: [
{
name: 'cache',
path: '/go',
},
],
},
{
name: 'trigger',
image: 'grafana/drone-downstream',
settings: {
token: {
from_secret: 'DRONE_TOKEN',
},
repositories: [
'packages/awl',
],
parameters: [
'TAG=${DRONE_TAG}',
],
},
},
],
volumes: [
{
name: 'cache',
temp: {},
},
],
};
[
testing('1.19', 'amd64'),
testing('1.19', 'arm64'),
testing('1.20', 'amd64'),
testing('1.20', 'arm64'),
release(),
]

View File

@ -0,0 +1,35 @@
name: Forgejo Release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: Install scdoc
run: apt-get update && apt-get install -y scdoc
- name: Release with GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --skip docker,snapcraft
env:
GORELEASER_FORCE_TOKEN: gitea
GITEA_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
UPLOAD_PACKAGES_SECRET: ${{ secrets.PUBLISH_TOKEN }}

View File

@ -0,0 +1,14 @@
name: Mirror Push
on: push
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: git@git.sr.ht:~sammefishe/awl
ssh_private_key: ${{ secrets.SRHT_SSH_KEY }}

View File

@ -0,0 +1,24 @@
name: Test
on: push
jobs:
test:
strategy:
fail-fast: true
matrix:
goVer: ["oldstable", "stable"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goVer }}
- name: Test
run: make test-ci

View File

@ -4,32 +4,53 @@ on:
push:
tags:
- "*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS : ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
# Workaround a dumb docker problem where everything has to be lowercase
- id: lowercase
run: |
echo IMAGE_NAME=$(echo $IMAGE_NAME | tr '[:upper:]' '[:lower:]') >> "${GITHUB_ENV}"
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.20
go-version: stable
- name: Install scdoc
run: sudo apt-get install -y scdoc
- name: Workaround a dumb Snap bug
run: mkdir -p $HOME/.cache/snapcraft/download && mkdir -p $HOME/.cache/snapcraft/stage-packages
- name: Release with GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean --skip=aur,homebrew,nix,scoop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -7,19 +7,18 @@ jobs:
fail-fast: true
matrix:
platform: [macos, windows]
goVer: ["1.19.x", "1.20.x"]
goVer: ["oldstable", "stable"]
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goVer }}
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Test
run: make test-ci

4
.gitignore vendored
View File

@ -23,7 +23,7 @@ coverage/*
!coverage/.gitkeep
awl
doc/awl.1
doc/awl.1.gz
docs/awl.1
docs/awl.1.gz
.dccache

4
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "doc/wiki"]
path = doc/wiki
[submodule "docs/wiki"]
path = docs/wiki
url = ../awl.wiki

View File

@ -5,9 +5,10 @@ before:
- make clean
- go mod tidy
# Make manpages
- doc/makeman.sh
- docs/makeman.sh
# Vendor dependencies
- go mod vendor
builds:
- env:
- CGO_ENABLED=0
@ -16,21 +17,26 @@ builds:
- plan9_amd64
- freebsd_amd64
universal_binaries:
- replace: true
archives:
- files:
- LICENCE
- LICENSE
- completions/**
- doc/awl.1.gz
- docs/awl.1.gz
name_template: >-
{{ .ProjectName }}_
{{- if eq .Os "darwin" }}MacOS_
{{- else if eq .Os "freebsd" }}FreeBSD_
{{- else }}{{- title .Os }}_{{ end }}
{{- .Arch }}
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "mips64" }}mips64_hardfloat
{{- else if eq .Arch "mips64le" }}mips64le_hardfloat
{{- else }}{{ .Arch }}{{ end -}}
format_overrides:
- goos: windows
format: zip
rlcp: true
- files:
- vendor/**
id: vendor
@ -38,7 +44,111 @@ archives:
name_template: "{{ .ProjectName }}-{{ .Version }}-deps"
meta: true
wrap_in_directory: "{{ .ProjectName }}"
rlcp: true
nfpms:
- id: packages
package_name: awl-dns
vendor: Sam Therapy <sam@samtherapy.net>
maintainer: Sam Therapy <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
section: utils
bindir: /usr/bin
formats:
- apk
- archlinux
- deb
- rpm
contents:
- src: completions/bash.bash
dst: /usr/share/bash-completion/completions/awl
- src: docs/awl.1.gz
dst: /usr/share/man/man1/awl.1.gz
- src: LICENSE
dst: /usr/share/docs/awl/copyright
- src: completions/fish.fish
dst: /usr/share/fish/vendor_completions.d/awl.fish
# DEB only
- src: completions/zsh.zsh
dst: /usr/share/zsh/vendor-completions/_awl
packager: deb
# Alpine .apk only
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: apk
# RPM only
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: rpm
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
overrides:
deb:
file_name_template: >-
{{- .PackageName }}_
{{- .Version }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "arm" }}armel
{{- else }}{{ .Arch }}{{ end -}}
rpm:
file_name_template: >-
{{- .PackageName }}-
{{- .Version }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}armhfp
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end -}}
- id: termux
package_name: awl-dns
vendor: Sam Therapy <sam@samtherapy.net>
maintainer: Sam Therapy <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
section: utils
formats:
- termux.deb
file_name_template: >-
{{- .PackageName }}_
{{- .Version }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}arm
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end -}}
snapcrafts:
-
name: awl-dns
grade: stable
publish: true
summary: A command-line DNS query tool
description: |-
Awl is a command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
confinement: strict
license: BSD-3-Clause
base: bare
apps:
awl-dns:
command: awl
plugs:
- network
completer: completions/bash.bash
dockers:
-
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
checksum:
name_template: "checksums.txt"
@ -46,9 +156,44 @@ checksum:
snapshot:
name_template: "{{ incpatch .Version }}-next"
brews:
- repository:
owner: packaging
name: homebrew
homepage: https://dns.froth.zone/awl
description: A DNS query tool
license: BSD-3-Clause
# custom_block: |
# head "https://git.froth.zone/sam/awl.git"
install: |-
bin.install "awl"
bash_completion.install "completions/bash.bash" => "awl"
zsh_completion.install "completions/zsh.zsh" => "_awl"
fish_completion.install "completions/fish.fish" => "awl.fish"
man1.install "docs/awl.1.gz"
nix:
- repository:
owner: packaging
name: nur
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: bsd3
extra_install: |-
installManPage ./docs/awl.1.gz
installShellCompletion ./completions/*
scoops:
- repository:
owner: packaging
name: scoop
folder: bucket
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: BSD-3-Clause
changelog:
sort: asc
groups:
- title: "Dependency Updates"
regexp: "^.*fix\\(deps\\)*:+.*$"
@ -61,7 +206,6 @@ changelog:
order: 1
- title: "Other"
order: 999
filters:
exclude:
- "^test:"
@ -69,66 +213,23 @@ changelog:
- "typo"
- "^ci:"
brews:
- tap:
owner: sam
name: homebrew
homepage: https://dns.froth.zone/awl
description: A DNS query tool
license: BSD-3-Clause
# custom_block: |
# head "https://git.froth.zone/sam/awl.git"
install: |-
bin.install "awl"
bash_completion.install "completions/bash.bash" => "awl"
zsh_completion.install "completions/zsh.zsh" => "_awl"
fish_completion.install "completions/fish.fish" => "awl.fish"
man1.install "doc/awl.1.gz"
scoop:
bucket:
owner: sam
name: scoop
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: BSD-3-Clause
nfpms:
- id: packages
maintainer: Sam <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
bindir: /usr/bin
section: utils
formats:
uploads:
- name: packages
method: PUT
mode: archive
exts:
- deb
# - rpm
# - apk
contents:
- src: completions/bash.bash
dst: /usr/share/bash-completion/completions/awl
- src: completions/zsh.zsh
dst: /usr/share/zsh/vendor-completions/_awl
packager: deb
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: apk
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: rpm
- src: completions/fish.fish
dst: /usr/share/fish/vendor_completions.d/awl.fish
- src: doc/awl.1.gz
dst: /usr/share/man/man1/awl.1.gz
- src: LICENCE
dst: /usr/share/doc/awl/copyright
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
- rpm
- apk
- termux.deb
username: sam
target: >-
https://git.froth.zone/api/packages/sam/
{{- if eq .ArtifactExt "deb" }}debian/pool/sid/main/upload
{{- else if eq .ArtifactExt "termux.deb" }}debian/pool/termux/main/upload
{{- else if eq .ArtifactExt "rpm" }}rpm/upload
{{- else if eq .ArtifactExt "apk" }}alpine/edge/main{{ end -}}
custom_artifact_name: true # Truncate the artifact name from the upload URL
gitea_urls:
api: https://git.froth.zone/api/v1

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM scratch
ENTRYPOINT ["/awl"]
COPY awl /

View File

@ -22,7 +22,7 @@ install:
else
install: all
install -$(INSTALLFLAGS)m755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -$(INSTALLFLAGS)m644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
install -$(INSTALLFLAGS)m644 docs/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
# completions need to go in one specific place :)
install -$(INSTALLFLAGS)m644 completions/bash.bash $(DESTDIR)$(PREFIX)/$(SHARE)/bash-completion/completions/$(PROG)
install -$(INSTALLFLAGS)m644 completions/fish.fish $(DESTDIR)$(PREFIX)/$(SHARE)/fish/vendor_completions.d/$(PROG).fish

View File

@ -1,11 +1,11 @@
Copyright 2022 Sam Therapy, Gregward Bulon
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
Copyright 2022 Sam Therapy, Gregward Bulon
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -9,7 +9,7 @@ EXE := $(PROG)
.PHONY: install
install: all
install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -Dm644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
install -Dm644 docs/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
# completions need to go in one specific place :)
install -Dm644 completions/bash.bash $(DESTDIR)$(PREFIX)$(SHARE)/bash-completion/completions/$(PROG)
install -Dm644 completions/fish.fish $(DESTDIR)$(PREFIX)$(SHARE)/fish/vendor_completions.d/$(PROG).fish

242
README.md
View File

@ -1,79 +1,195 @@
# awl
<!-- markdownlint-disable MD033 -->
# <img src="./docs/img/awl-text.png" width="50%" title="awl logo" alt="awl">
[![Build Status](https://ci.git.froth.zone/api/badges/sam/awl/status.svg)](https://ci.git.froth.zone/sam/awl)
> awl *(noun)*: A pointed tool for making small holes in wood or leather
`awl` is a command-line DNS client, much like
[`drill`](https://github.com/NLnetLabs/ldns),
[`dig`](https://bind9.readthedocs.io/en/v9_18_3/manpages.html#dig-dns-lookup-utility),
[`dog`](https://github.com/ogham/dog),
[`doggo`](https://github.com/mr-karan/doggo), or
[`q`](https://github.com/natesales/q).
A command-line DNS lookup tool that supports DNS queries over UDP, TCP, TLS, HTTPS, DNSCrypt, and QUIC.
`awl` is designed to be a drop-in replacement for the venerable dig, but support
newer RFC query types, such as DNS-over-HTTPS and DNS-over-QUIC.
[![Gitea Release](https://img.shields.io/gitea/v/release/sam/awl?gitea_url=https%3A%2F%2Fgit.froth.zone&display_name=release&style=for-the-badge)](https://git.froth.zone/sam/awl)
[![Last Commit](https://img.shields.io/gitea/last-commit/sam/awl?gitea_url=https%3A%2F%2Fgit.froth.zone&style=for-the-badge)](https://git.froth.zone/sam/awl/commits/branch/master)
[![License](https://img.shields.io/github/license/samtherapy/awl?style=for-the-badge)](https://spdx.org/licenses/BSD-3-Clause.html)
[![Go Report](https://goreportcard.com/badge/dns.froth.zone/awl?style=for-the-badge)](https://goreportcard.com/report/dns.froth.zone/awl)
## Usage
- [Feature wiki](https://git.froth.zone/sam/awl/wiki/Supported)
- [Manpage](https://git.froth.zone/sam/awl/wiki/awl.1)
Awl is designed to be a drop-in replacement for [dig](https://bind9.readthedocs.io/en/v9_18_3/manpages.html#dig-dns-lookup-utility).
## Building and installing
## Examples
### From releases
```shell
# Query a domain over UDP
awl example.com
Grab a prebuilt binary from the
[release](https://git.froth.zone/sam/awl/releases) section.
# Query a domain over HTTPS, print only the results
awl example.com +https --short
### Package Managers
- AUR: [awl-dns-git](https://aur.archlinux.org/packages/awl-dns-git)
- Debian/Ubuntu:
```sh
# Add PGP key
curl -sL https://packages.freecumextremist.finance/key.asc | sudo tee /usr/share/keyrings/awl.asc >/dev/null
# Add repo
echo "deb [signed-by=/usr/share/keyrings/awl.asc] https://packages.freecumextremist.finance/awl/apt awl main" | sudo tee /etc/apt/sources.list.d/awl.list >/dev/null
sudo apt update
sudo apt install awl
```
- Homebrew:
```sh
brew install SamTherapy/tap/awl
```
- Scoop:
```pwsh
scoop bucket add froth https://git.froth.zone/sam/scoop.git
scoop install awl
```
### From source
Dependencies:
- [Go](https://go.dev/) >= 1.18
- GNU/BSD make or Plan 9 mk (if using the makefile/mkfile)
- [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (optional, for man page)
Using the makefile:
```sh
make && sudo make install
# Query a domain over TLS, print as JSON
awl example.com +tls +json
```
For more and the usage, see the [manpage](https://git.froth.zone/sam/awl/wiki/awl.1).
## Installing
On any platform, with [Go](https://go.dev) installed, run the following command to install:
```shell
go install dns.froth.zone/awl@latest
```
### Packaging
Alternatively, many package managers are supported:
<details>
<summary>Linux</summary>
#### Distro-specific
<details>
<summary>Alpine Linux</summary>
Provided by [Gitea packages](https://git.froth.zone/sam/-/packages/alpine/awl-dns) \
***Any distro that uses apk should also work***
```shell
# Add the repository
echo "https://git.froth.zone/api/packages/sam/alpine/edge/main" | tee -a /etc/apk/repositories
# Get the signing key
curl -JO https://git.froth.zone/api/packages/sam/alpine/key --output-dir /etc/apk/keys
# Install
apk add awl-dns
```
</details>
<details>
<summary>Arch</summary>
AUR package available as [awl-dns-git](https://aur.archlinux.org/packages/awl-dns-git/)
```shell
yay -S awl-dns-git ||
paru -S awl-dns-git
```
</details>
<details>
<summary>Debian / Ubuntu</summary>
Provided by [Gitea packages](https://git.froth.zone/sam/-/packages/debian/awl-dns/) \
***Any distro that uses deb/dpkg should also work***
```shell
# Add PGP key
sudo curl https://git.froth.zone/api/packages/sam/debian/repository.key -o /usr/share/keyrings/git-froth-zone-sam.asc
# Add repo
echo "deb [signed-by=/usr/share/keyrings/git-froth-zone-sam.asc] https://git.froth.zone/api/packages/sam/debian sid main" | sudo tee /etc/apt/sources.list.d/git-froth-zone-sam.list
# Update and install
sudo apt update
sudo apt install awl-dns
```
</details>
<details>
<summary>Fedora / RHEL / SUSE</summary>
Provided by [Gitea packages](https://git.froth.zone/sam/-/packages/rpm/awl-dns/) \
***Any distro that uses rpm/dnf might also work, I've never tried it***
```shell
# Add the repository
dnf config-manager --add-repo https://git.froth.zone/api/packages/sam/rpm.repo ||
zypper addrepo https://git.froth.zone/api/packages/sam/rpm.repo
# Install
dnf install awl-dns ||
zypper install awl-dns
```
</details>
<details>
<summary>Gentoo</summary>
```shell
# Add the ebuild repository
eselect repository add froth-zone git https://git.froth.zone/packaging/portage.git
emaint sync -r froth-zone
# Install
emerge -av net-dns/awl
```
</details>
#### Distro-agnostic
<details>
<summary><a href="https://brew.sh" nofollow>Homebrew</a></summary>
```shell
brew install SamTherapy/tap/awl
```
</details>
<details>
<summary>Snap</summary>
Snap package available as [awl-dns](https://snapcraft.io/awl-dns)
```shell
snap install awl-dns ||
sudo snap install awl-dns
```
</details>
</details>
<hr />
<details>
<summary>macOS</summary>
<details open>
<summary><a href="https://brew.sh" nofollow>Homebrew</a></summary>
```shell
brew install SamTherapy/tap/awl
```
</details>
</details>
<hr />
<details>
<summary>Windows</summary>
<details open>
<summary><a href="https://scoop.sh" nofollow>Scoop</a></summary>
```pwsh
scoop bucket add froth https://git.froth.zone/packages/scoop.git
scoop install awl
```
</details>
</details>
## Contributing
Send a [pull request](https://git.froth.zone/sam/awl/pulls) our way. Prefer
emails? Send a patch to the
[mailing list](https://lists.sr.ht/~sammefishe/awl-dev).
Please see the [CONTRIBUTING.md](./docs/CONTRIBUTING.md) file for more information.
Found a bug or want a new feature? Create an issue
[here](https://git.froth.zone/sam/awl/issues).
TL;DR: If you like the project, spread the word! If you want to contribute, [use the issue tracker](https://git.froth.zone/sam/awl/issues) or [open a pull request](https://git.froth.zone/sam/awl/pulls).
Want to use email instead? Use our [mailing list](https://lists.sr.ht/~sammefishe/awl-devel)!
### Licence
### Mirrors
Revised BSD, See [LICENCE](./LICENCE)
The canonical repository is located on [my personal Forgejo instance](https://git.froth.zone/sam/awl). \
Official mirrors are located on [GitHub](https://github.com/SamTherapy/awl) and [SourceHut](https://git.sr.ht/~sammefishe/awl/).
Contributions are accepted on all mirrors, but the Forgejo instance is preferred.
## License
[BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html)
### Credits
- Awl image taken from [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Awl.tif), imaged is licensed CC0.

View File

@ -60,10 +60,6 @@ func ParseCLI(args []string, version string) (opts *util.Options, err error) {
opts.Logger.Warn("Every query after the root query will only use UDP/TCP")
}
if opts.Reverse {
opts.Logger.Error("Reverse queries are not currently supported")
}
opts.RD = true
}

View File

@ -104,7 +104,7 @@ func TestVersion(t *testing.T) {
_, err := cli.ParseCLI(args, "test")
assert.ErrorType(t, err, util.ErrNotError)
assert.ErrorIs(t, err, util.ErrNotError)
}
func TestTimeout(t *testing.T) {

View File

@ -35,6 +35,11 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
opts.HTTPS = true
opts.Request.Server = arg
opts.Logger.Info("DNS-over-HTTPS implicitly set")
_, endpoint, isSplit := strings.Cut(arg, "/")
if isSplit {
opts.HTTPSOptions.Endpoint = "/" + endpoint
}
case strings.HasPrefix(arg, "quic://"):
opts.QUIC = true
opts.Request.Server = strings.TrimPrefix(arg, "quic://")
@ -78,7 +83,6 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
opts.Logger.Info(arg, "detected as a domain name")
opts.Request.Name, err = idna.ToASCII(arg)
if err != nil {
return fmt.Errorf("unicode to punycode: %w", err)
}
@ -94,7 +98,6 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
opts.Logger.Info(arg, "is unknown. Assuming domain")
opts.Request.Name, err = idna.ToASCII(arg)
if err != nil {
return fmt.Errorf("unicode to punycode: %w", err)
}
@ -127,7 +130,7 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
case opts.HTTPS:
opts.Request.Server = "https://dns.cloudflare.com"
case opts.QUIC:
opts.Request.Server = "dns.adguard.com"
opts.Request.Server = "dns.froth.zone"
default:
var err error
resolv, err := conf.GetDNSConfig()

View File

@ -3,6 +3,7 @@
package cli_test
import (
"strings"
"testing"
cli "dns.froth.zone/awl/cmd"
@ -89,7 +90,7 @@ func TestDefaultServer(t *testing.T) {
{"DNSCrypt", "sdns://AQMAAAAAAAAAETk0LjE0MC4xNC4xNDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20"},
{"TLS", "dns.google"},
{"HTTPS", "https://dns.cloudflare.com"},
{"QUIC", "dns.adguard.com"},
{"QUIC", "dns.froth.zone"},
}
for _, test := range tests {
@ -128,6 +129,7 @@ func TestFlagSetting(t *testing.T) {
{"@sdns://AQMAAAAAAAAAETk0LjE0MC4xNC4xNDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20", "sdns://AQMAAAAAAAAAETk0LjE0MC4xNC4xNDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20", "DNSCrypt"},
{"@tls://dns.google", "dns.google", "TLS"},
{"@https://dns.cloudflare.com/dns-query", "https://dns.cloudflare.com/dns-query", "HTTPS"},
{"@https://dns.example.net/a", "https://dns.example.net/a", "HTTPS with a set path"},
{"@quic://dns.adguard.com", "dns.adguard.com", "QUIC"},
{"@tcp://dns.froth.zone", "dns.froth.zone", "TCP"},
{"@udp://dns.example.com", "dns.example.com", "UDP"},
@ -144,23 +146,23 @@ func TestFlagSetting(t *testing.T) {
err := cli.ParseMiscArgs([]string{test.in}, opts)
assert.NilError(t, err)
switch test.over {
case "DNSCrypt":
switch {
case strings.HasPrefix(test.over, "DNSCrypt"):
assert.Assert(t, opts.DNSCrypt)
assert.Equal(t, opts.Request.Server, test.expected)
case "TLS":
case strings.HasPrefix(test.over, "TLS"):
assert.Assert(t, opts.TLS)
assert.Equal(t, opts.Request.Server, test.expected)
case "HTTPS":
case strings.HasPrefix(test.over, "HTTPS"):
assert.Assert(t, opts.HTTPS)
assert.Equal(t, opts.Request.Server, test.expected)
case "QUIC":
case strings.HasPrefix(test.over, "QUIC"):
assert.Assert(t, opts.QUIC)
assert.Equal(t, opts.Request.Server, test.expected)
case "TCP":
case strings.HasPrefix(test.over, "TCP"):
assert.Assert(t, opts.TCP)
assert.Equal(t, opts.Request.Server, test.expected)
case "UDP":
case strings.HasPrefix(test.over, "UDP"):
assert.Assert(t, true)
assert.Equal(t, opts.Request.Server, test.expected)
}

View File

@ -1,7 +0,0 @@
#!/bin/sh
set -e
rm -f doc/awl.1.gz
scdoc <doc/awl.1.scd >doc/awl.1
gzip -9 -n doc/awl.1

1
docs/CODE_OF_CONDUCT.md Symbolic link
View File

@ -0,0 +1 @@
/dev/null

57
docs/CONTRIBUTING.md Normal file
View File

@ -0,0 +1,57 @@
# Contributing to awl
First off, thank you! We appreciate your interest in wanting to contribute to awl.
> If you like the project, spread the word! Help us grow by sharing the project with anyone you thing might be interested. Here are some ways you can help:
>
> - Star the project on GitHub
> - Share the project on social media
> - Tell your friends about the project
## How to contribute
If you want to contribute to awl, you can do so by:
- [Reporting a bug](#reporting-a-bug)
- [Requesting a feature](#requesting-a-feature)
- [Submitting a pull request](#submitting-a-pull-request)
### Reporting a bug
If you find a bug in awl, please [open an issue](https://git.froth.zone/sam/awl/issues) on the project's issue tracker. When reporting a bug, please include as much information as possible, such as:
- The version of awl you are using
- The operating system you are using
- The steps to reproduce the bug
- Any error messages you received
### Requesting a feature
If you have an idea for a feature you would like to see in awl, please [open an issue](https://git.froth.zone/sam/awl/issues) on the project's issue tracker. When requesting a feature, please include as much information as possible, such as:
- A description of the feature
- Why you think the feature would be useful
- Any other relevant information
### Submitting a pull request
If you would like to contribute code to awl, you can do so by submitting a pull request. To submit a pull request, follow these steps:
1. Fork the project on Git
2. Create a new branch for your changes
3. Make your changes
4. Push your changes to your fork
5. [Open a pull request](https://git.froth.zone/sam/awl/pulls) on the project's Git repository
When submitting a pull request, please include as much information as possible, such as:
- A description of the changes you made
- Why you made the changes
- Any other relevant information
Alternatively, you can also contribute by sending an email to the project's [mailing list](https://lists.sr.ht/~sammefishe/awl-devel). For more information about using Git over email, refer to [git-send-email.io](https://git-send-email.io/)
#### Code Style
Before submitting a pull request, please run `make lint` to ensure your code adheres to the project's code style.
Make sure that you have `golangci-lint` installed, that is our linter of choice.

View File

@ -42,7 +42,7 @@ If one cannot be found, *awl* will query the localhost.
*-h*
Show a "short" help message.
*-p*, *--port* *port*
*-p*, *--port* _port_
Sets the port to query. Default ports listed below.
- _53_ for *UDP* and *TCP*
- _853_ for *TLS* and *QUIC*
@ -259,4 +259,4 @@ This man page is probably not complete.
Likely numerous more, report them either to the tracker
_https://git.froth.zone/sam/awl/issues_ or via email
_~sammefishe/awl-dev@lists.sr.ht_
_~sammefishe/awl-develop@lists.sr.ht_

BIN
docs/img/awl-text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

1
docs/img/awl.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 505 KiB

7
docs/makeman.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
rm -f docs/awl.1.gz
scdoc <docs/awl.1.scd >docs/awl.1
gzip -9 -n docs/awl.1

View File

45
go.mod
View File

@ -1,38 +1,33 @@
module dns.froth.zone/awl
go 1.18
go 1.21.9
toolchain go1.22.2
require (
github.com/ameshkov/dnscrypt/v2 v2.2.5
dns.froth.zone/dnscrypt v0.0.2
github.com/dchest/uniuri v1.2.0
github.com/miekg/dns v1.1.50
github.com/quic-go/quic-go v0.32.0
github.com/miekg/dns v1.1.59
github.com/quic-go/quic-go v0.43.1
github.com/stefansundin/go-zflag v1.1.1
golang.org/x/net v0.7.0
golang.org/x/sys v0.5.0
golang.org/x/net v0.24.0
golang.org/x/sys v0.20.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.4.0
gotest.tools/v3 v3.5.1
)
require (
github.com/AdguardTeam/golibs v0.12.0 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 // indirect
github.com/AdguardTeam/golibs v0.20.3 // indirect
github.com/ameshkov/dnsstamps v1.0.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/onsi/ginkgo/v2 v2.8.3 // indirect
github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.6.0 // indirect
github.com/onsi/ginkgo/v2 v2.16.0 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)
replace github.com/aead/poly1305 => github.com/SamTherapy/poly1305 v0.0.2

140
go.sum
View File

@ -1,11 +1,7 @@
github.com/AdguardTeam/golibs v0.12.0 h1:z4Q3Mz0pHJ2Zag4B0RBaIXEUue1TPOKkbRiYkwC4r7I=
github.com/AdguardTeam/golibs v0.12.0/go.mod h1:87bN2x4VsTritptE3XZg9l8T6gznWsIxHBcQ1DeRIXA=
github.com/SamTherapy/poly1305 v0.0.2 h1:yeVUbb5xJ8iWOSzcatQK0XJsXAssF7SmByqIq6lNQlo=
github.com/SamTherapy/poly1305 v0.0.2/go.mod h1:pAYNThkdBb8dYfY02Hjn97Dqk6mklThpviDjRNfVDak=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/ameshkov/dnscrypt/v2 v2.2.5 h1:Ju1gQeez+6XLtk/b/k3RoJ2t+Ls+BSItLTZjZeedneY=
github.com/ameshkov/dnscrypt/v2 v2.2.5/go.mod h1:Cu5GgMvCR10BeXgACiGDwXyOpfMktsSIidml1XBp6uM=
dns.froth.zone/dnscrypt v0.0.2 h1:ytqjic/Qway4OuLw8ee0ubxdNzy+F3igUGDrEVwyLls=
dns.froth.zone/dnscrypt v0.0.2/go.mod h1:QZ0HAm7mWe8wz1dTqbKmTZhlr06x5qpe6ZCTPJ7uY30=
github.com/AdguardTeam/golibs v0.20.3 h1:5RiDypxBebd4Y2eftwm6JJla18oBqRHwanR7q0rnrxw=
github.com/AdguardTeam/golibs v0.20.3/go.mod h1:/votX6WK1PdcZ3T2kBOPjPCGmfhlKixhI6ljYrFRPvI=
github.com/ameshkov/dnsstamps v1.0.3 h1:Srzik+J9mivH1alRACTbys2xOxs0lRH9qnTA7Y1OYVo=
github.com/ameshkov/dnsstamps v1.0.3/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@ -14,102 +10,66 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dchest/uniuri v1.2.0 h1:koIcOUdrTIivZgSLhHQvKgqdWZq5d7KdMEWF1Ud6+5g=
github.com/dchest/uniuri v1.2.0/go.mod h1:fSzm4SLHzNZvWLvWJew423PhAzkpNQYq+uNLq4kxhkY=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
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/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q=
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=
github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
github.com/onsi/ginkgo/v2 v2.8.3 h1:RpbK1G8nWPNaCVFBWsOGnEQQGgASi6b8fxcWBvDYjxQ=
github.com/onsi/ginkgo/v2 v2.8.3/go.mod h1:6OaUA8BCi0aZfmzYT/q9AacwTzDpNbxILUT+TlBq6MY=
github.com/onsi/gomega v1.27.0 h1:QLidEla4bXUuZVFa4KX6JHCsuGgbi85LC/pCHrt/O08=
github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs=
github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk=
github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM=
github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qtls-go1-18 v0.2.0 h1:5ViXqBZ90wpUcZS0ge79rf029yx0dYB0McyPJwqqj7U=
github.com/quic-go/qtls-go1-18 v0.2.0/go.mod h1:moGulGHK7o6O8lSPSZNoOwcLvJKJ85vVNc7oJFD65bc=
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.32.0 h1:lY02md31s1JgPiiyfqJijpu/UX/Iun304FI3yUqX7tA=
github.com/quic-go/quic-go v0.32.0/go.mod h1:/fCsKANhQIeD5l76c2JFU+07gVE3KaA0FP+0zMWwfwo=
github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ=
github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/stefansundin/go-zflag v1.1.1 h1:XabhzWS588bVvV1z1UctSa6i8zHkXc5W9otqtnDSHw8=
github.com/stefansundin/go-zflag v1.1.1/go.mod h1:HXX5rABl1AoTcZ2jw+CqJ7R8irczaLquGNZlFabZooc=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb h1:PaBZQdo+iSDyHT053FjUCgZQ/9uqVwPOcl7KSWhKn6w=
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw=
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=

8
mkfile
View File

@ -1,10 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Plan 9 mkfile
</$objtype/mkfile
GO = go
PROG = awl
GOFLAGS = -ldflags=-s -ldflags=-w -ldflags=-X=main.version=PLAN9 -trimpath
VERSION = `{awk '{print substr($0,0,8)}' .git/refs/heads/master}
GOFLAGS = -ldflags=-s -ldflags=-w -ldflags=-X=main.version=$VERSION -trimpath
CGO_ENABLED = 0
@ -15,7 +17,7 @@ $PROG:
install:V:
$GO install $GOFLAGS .
# cp doc/$PROG.1 /sys/man/1/$PROG
# cp docs/$PROG.1 /sys/man/1/$PROG
test:V:
$GO test -v -cover ./...

View File

@ -4,6 +4,7 @@ package query_test
import (
"testing"
"time"
"dns.froth.zone/awl/pkg/query"
"dns.froth.zone/awl/pkg/util"
@ -95,11 +96,12 @@ func TestCreateQ(t *testing.T) {
QUIC: true,
Request: util.Request{
Server: "dns.adguard.com",
Server: "dns.froth.zone",
Port: 853,
Type: dns.TypeA,
Name: "example.com.",
Retries: 3,
Timeout: time.Second,
},
Display: util.Display{
Comments: true,

View File

@ -61,7 +61,7 @@ type Answer struct {
// EDNS0 is for all EDNS options.
//
// RFC: https://datatracker.ietf.org/doc/draft-peltan-edns-presentation-format/
// RFC: https://datatracker.ietf.org/docs/draft-peltan-edns-presentation-format/
//
//nolint:govet,tagliatelle
type EDNS0 struct {

View File

@ -7,7 +7,7 @@ import (
"time"
"dns.froth.zone/awl/pkg/util"
"github.com/ameshkov/dnscrypt/v2"
"dns.froth.zone/dnscrypt"
"github.com/miekg/dns"
)

View File

@ -8,7 +8,7 @@ import (
"dns.froth.zone/awl/pkg/query"
"dns.froth.zone/awl/pkg/util"
"github.com/ameshkov/dnscrypt/v2"
"dns.froth.zone/dnscrypt"
"github.com/miekg/dns"
"gotest.tools/v3/assert"
)

View File

@ -1,12 +1,13 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build !gccgo
package resolvers
import (
"context"
"crypto/tls"
"fmt"
"io"
"strings"
"time"
"dns.froth.zone/awl/pkg/util"
@ -31,12 +32,20 @@ func (resolver *QUICResolver) LookUp(msg *dns.Msg) (resp util.Response, err erro
NextProtos: []string{"doq"},
}
// Make sure that TLSHost is ALWAYS set
if resolver.opts.TLSHost == "" {
tls.ServerName = strings.Split(resolver.opts.Request.Server, ":")[0]
}
conf := new(quic.Config)
conf.HandshakeIdleTimeout = resolver.opts.Request.Timeout
resolver.opts.Logger.Debug("quic: making query")
connection, err := quic.DialAddr(resolver.opts.Request.Server, tls, conf)
ctx, cancel := context.WithTimeout(context.Background(), resolver.opts.Request.Timeout)
defer cancel()
connection, err := quic.DialAddr(ctx, resolver.opts.Request.Server, tls, conf)
if err != nil {
return resp, fmt.Errorf("doq: dial: %w", err)
}
@ -65,6 +74,11 @@ func (resolver *QUICResolver) LookUp(msg *dns.Msg) (resp util.Response, err erro
return resp, fmt.Errorf("doq: quic stream write: %w", err)
}
err = stream.Close()
if err != nil {
return resp, fmt.Errorf("doq: quic stream close: %w", err)
}
resolver.opts.Logger.Debug("quic: reading stream")
fullRes, err := io.ReadAll(stream)
@ -83,11 +97,6 @@ func (resolver *QUICResolver) LookUp(msg *dns.Msg) (resp util.Response, err erro
resolver.opts.Logger.Debug("quic: closing stream")
err = stream.Close()
if err != nil {
return resp, fmt.Errorf("doq: quic stream close: %w", err)
}
resp.DNS = &dns.Msg{}
resolver.opts.Logger.Debug("quic: unpacking response")

View File

@ -1,26 +0,0 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build gccgo
// TODO: Whenever gccgo supports quic-go, delete this
package resolvers
import (
"errors"
"dns.froth.zone/awl/pkg/util"
"github.com/miekg/dns"
)
// QUICResolver is for DNS-over-QUIC queries.
type QUICResolver struct {
opts *util.Options
}
var _ Resolver = (*QUICResolver)(nil)
var errNotImplemented = errors.New("DNS-over-QUIC not supported when running gccgo!")
// LookUp cannot be used with gccgo because gccgo does not (and likely will not) support generics.
func (resolver *QUICResolver) LookUp(msg *dns.Msg) (util.Response, error) {
return util.Response{}, errNotImplemented
}

View File

@ -22,7 +22,7 @@ func TestQuic(t *testing.T) {
opts *util.Options
}{
{
"Valid",
"Valid, AdGuard",
&util.Options{
QUIC: true,
Logger: util.InitLogger(0),
@ -35,6 +35,21 @@ func TestQuic(t *testing.T) {
},
},
},
{
"Valid, Froth",
&util.Options{
QUIC: true,
Logger: util.InitLogger(0),
Request: util.Request{
Server: "dns.froth.zone",
Type: dns.TypeA,
Name: "git.freecumextremist.com",
Port: 853,
Timeout: 750 * time.Millisecond,
Retries: 3,
},
},
},
{
"Bad domain",
&util.Options{

View File

@ -62,7 +62,6 @@ func (resolver *StandardResolver) LookUp(msg *dns.Msg) (resp util.Response, err
msg.Extra = resp.DNS.Extra
resp.DNS, resp.RTT, err = dnsClient.Exchange(msg, resolver.opts.Request.Server)
if err != nil {
return resp, fmt.Errorf("badcookie: DNS exchange: %w", err)
}

View File

@ -10,7 +10,7 @@ import (
"dns.froth.zone/awl/pkg/query"
"dns.froth.zone/awl/pkg/util"
"github.com/ameshkov/dnscrypt/v2"
"dns.froth.zone/dnscrypt"
"github.com/miekg/dns"
"gotest.tools/v3/assert"
)

View File

@ -31,7 +31,11 @@ func LoadResolver(opts *util.Options) (resolver Resolver, err error) {
opts.Request.Server = "https://" + opts.Request.Server
}
opts.Request.Server += opts.HTTPSOptions.Endpoint
// Make sure that the endpoint is defaulted to /dns-query
if !strings.HasSuffix(opts.Request.Server, opts.HTTPSOptions.Endpoint) {
opts.Request.Server += opts.HTTPSOptions.Endpoint
}
resolver = &HTTPSResolver{
opts: opts,
}

View File

@ -1,4 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", ":npm", ":gomod"]
"extends": ["config:base", ":npm", ":gomod"],
"automerge": true
}

View File

@ -1,41 +0,0 @@
# You may ask yourself, why make a snap?
# why not?
name: awl
base: core20
adopt-info: awl
license: BSD-3-Clause
summary: A command-line DNS query tool.
description: |
awl is a command line DNS tool, much like dig and drill.
grade: devel
confinement: strict
architectures:
- build-on: amd64
- build-on: arm64
- build-on: s390x
- build-on: ppc64el
- build-on: armhf
parts:
awl:
build-packages:
- scdoc
plugin: go
source-type: git
source: https://git.froth.zone/sam/awl
override-pull: |
snapcraftctl pull
snapcraftctl set-version "$(git describe --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || echo 'UNKNOWN')"
override-build: |
HASH=$(git describe --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || echo 'UNKNOWN')+snap make
PREFIX=$SNAPCRAFT_PART_INSTALL make install
apps:
awl:
command: bin/awl
completer: share/bash-completion/completions/awl
plugs:
- network

View File

@ -23,19 +23,19 @@ MAN ?= $(PREFIX)/$(SHARE)/man
PROG ?= awl
# hehe
all: $(PROG) doc/$(PROG).1
all: $(PROG) docs/$(PROG).1
$(PROG): $(SOURCES)
$(GO) build -o $(EXE) $(GOFLAGS) .
doc/$(PROG).1: doc/$(PROG).1.scd
docs/$(PROG).1: docs/$(PROG).1.scd
$(SCDOC) <$? >$@
doc/wiki/$(PROG).1.md: doc/$(PROG).1
docs/wiki/$(PROG).1.md: docs/$(PROG).1
pandoc --from man --to gfm -o $@ $?
## update_doc: update documentation (requires pandoc)
update_doc: doc/wiki/$(PROG).1.md
update_doc: docs/wiki/$(PROG).1.md
.PHONY: fmt
fmt:
@ -87,8 +87,9 @@ cover: coverage/cover.html
clean:
$(GO) clean
# Ignore errors if you remove something that doesn't exist
rm -f doc/$(PROG).1
rm -f docs/$(PROG).1
rm -f coverage/cover*
rm -rf vendor
## help: Prints this help message
.PHONY: help