Compare commits

...

34 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
32 changed files with 471 additions and 332 deletions

View File

@ -1,4 +1,4 @@
name: Gitea Release
name: Forgejo Release
on:
push:
@ -13,9 +13,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout submodules
run: git submodule update --init --recursive
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v4
@ -30,7 +28,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --clean
args: release --clean --skip docker,snapcraft
env:
GORELEASER_FORCE_TOKEN: gitea
GITEA_TOKEN: ${{ secrets.PUBLISH_TOKEN }}

View File

@ -10,16 +10,15 @@ jobs:
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: Checkout repository
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- 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@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@v4
uses: actions/setup-go@v5
with:
go-version: '>=1.20.1'
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@v5
with:
distribution: goreleaser
version: latest
args: release --clean --skip=homebrew,nix,scoop
args: release --clean --skip=aur,homebrew,nix,scoop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -10,16 +10,15 @@ jobs:
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@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goVer }}
- name: Checkout repository
uses: actions/checkout@v4
- 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,7 +5,7 @@ before:
- make clean
- go mod tidy
# Make manpages
- doc/makeman.sh
- docs/makeman.sh
# Vendor dependencies
- go mod vendor
@ -17,11 +17,14 @@ 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_
@ -42,75 +45,6 @@ archives:
meta: true
wrap_in_directory: "{{ .ProjectName }}"
universal_binaries:
- replace: true
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
groups:
- title: "Dependency Updates"
regexp: "^.*fix\\(deps\\)*:+.*$"
order: 2
- title: "Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: "Other"
order: 999
filters:
exclude:
- "^test:"
- "^docs?:"
- "typo"
- "^ci:"
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 "doc/awl.1.gz"
scoops:
- repository:
owner: packaging
name: scoop
folder: bucket
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: BSD-3-Clause
nix:
-
repository:
owner: packaging
name: nur
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: bsd3
extra_install: |-
installManPage ./doc/awl.1.gz
installShellCompletion ./completions/*
nfpms:
- id: packages
package_name: awl-dns
@ -131,10 +65,10 @@ nfpms:
contents:
- src: completions/bash.bash
dst: /usr/share/bash-completion/completions/awl
- src: doc/awl.1.gz
- src: docs/awl.1.gz
dst: /usr/share/man/man1/awl.1.gz
- src: LICENCE
dst: /usr/share/doc/awl/copyright
- src: LICENSE
dst: /usr/share/docs/awl/copyright
- src: completions/fish.fish
dst: /usr/share/fish/vendor_completions.d/awl.fish
# DEB only
@ -170,7 +104,6 @@ nfpms:
{{- 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>
@ -183,18 +116,105 @@ nfpms:
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 -}}
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"
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\\)*:+.*$"
order: 2
- title: "Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: "Other"
order: 999
filters:
exclude:
- "^test:"
- "^docs?:"
- "typo"
- "^ci:"
uploads:
-
name: packages
- name: packages
method: PUT
mode: archive
exts:

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

250
README.md
View File

@ -1,103 +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
# Query a domain over TLS, print as JSON
awl example.com +tls +json
```
- AUR: [awl-dns-git](https://aur.archlinux.org/packages/awl-dns-git)
- Debian/Ubuntu (any .deb consuming distro should work):
For more and the usage, see the [manpage](https://git.froth.zone/sam/awl/wiki/awl.1).
```sh
# Add PGP key
sudo curl https://git.froth.zone/api/packages/sam/debian/repository.key -o /usr/share/keyrings/git-froth-zone.asc
# Add repo
echo "deb [signed-by=/usr/share/keyrings/git-froth-zone.asc] https://git.froth.zone/api/packages/sam/debian sid main" | sudo tee /etc/apt/sources.list.d/git-froth-zone.list
sudo apt update
sudo apt install awl-dns
```
## Installing
- Fedora (any .rpm consuming distro should work [but will run into problems updating, not recommended](https://git.froth.zone/sam/awl/issues/197)):
```sh
echo '[git-froth-zone-sam]
name=sam - Froth Git
baseurl=https://git.froth.zone/api/packages/sam/rpm
enabled=1
gpgcheck=0
gpgkey=https://git.froth.zone/api/packages/sam/rpm/repository.key' | sudo tee /etc/yum.repos.d/git-froth-zone-sam.repo
sudo yum install awl-dns
```
On any platform, with [Go](https://go.dev) installed, run the following command to install:
- Alpine (any .apk consuming distro should work):
```sh
echo "https://git.froth.zone/api/packages/sam/alpine/edge/main" | sudo tee -a /etc/apk/repositories
sudo curl -JO https://git.froth.zone/api/packages/sam/alpine/key --output-dir /etc/apk/keys
sudo apk add awl-dns
```
- Homebrew:
```sh
brew install SamTherapy/tap/awl
```
- Scoop:
```pwsh
scoop bucket add froth https://git.froth.zone/packages/scoop.git
scoop install awl
```
### From source
Dependencies:
- [Go](https://go.dev/) >= 1.20
- GNU/BSD make or Plan 9 mk (if using the makefile/mkfile)
- [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (optional, for man page)
Using `go install`:
```sh
```shell
go install dns.froth.zone/awl@latest
```
Using the makefile:
### Packaging
```sh
make && sudo make install
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-devel).
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

@ -83,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)
}
@ -99,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)
}
@ -132,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

@ -90,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 {

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.

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

33
go.mod
View File

@ -1,32 +1,33 @@
module dns.froth.zone/awl
go 1.20
go 1.21.9
toolchain go1.22.2
require (
dns.froth.zone/dnscrypt v0.0.1
dns.froth.zone/dnscrypt v0.0.2
github.com/dchest/uniuri v1.2.0
github.com/miekg/dns v1.1.56
github.com/quic-go/quic-go v0.40.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.17.0
golang.org/x/sys v0.14.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.5.1
)
require (
github.com/AdguardTeam/golibs v0.17.2 // 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-20230315185526-52ccab3ef572 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // 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.13.0 // indirect
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
go.uber.org/mock v0.3.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.14.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.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)

90
go.sum
View File

@ -1,9 +1,7 @@
dns.froth.zone/dnscrypt v0.0.1 h1:plShBpr4lwQC9LNy6aUtKj4cyB1XSCrjutrUHdGIxtA=
dns.froth.zone/dnscrypt v0.0.1/go.mod h1:QZ0HAm7mWe8wz1dTqbKmTZhlr06x5qpe6ZCTPJ7uY30=
github.com/AdguardTeam/golibs v0.14.0 h1:/vfJshXBVaevMuBgzAIr+F64XdNqZL+j9F33GXJmgeQ=
github.com/AdguardTeam/golibs v0.14.0/go.mod h1:hOtcb8dPfKcFjWTPA904hTA4dl1aWvzeebdJpE72IPk=
github.com/AdguardTeam/golibs v0.17.2 h1:vg6wHMjUKscnyPGRvxS5kAt7Uw4YxcJiITZliZ476W8=
github.com/AdguardTeam/golibs v0.17.2/go.mod h1:DKhCIXHcUYtBhU8ibTLKh1paUL96n5zhQBlx763sj+U=
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=
@ -12,35 +10,31 @@ 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.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
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/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-20230808223545-4887780b67fb h1:oqpb3Cwpc7EOml5PVGMYbSGmwNui2R7i8IW83gs4W0c=
github.com/google/pprof v0.0.0-20230808223545-4887780b67fb/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA=
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5XqmmYsTLzJp/TO9Lhy39gkverk=
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
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.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE=
github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
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-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs=
github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/quic-go/quic-go v0.40.0 h1:GYd1iznlKm7dpHD7pOVpUvItgMPo/jrMgDWZhMCecqw=
github.com/quic-go/quic-go v0.40.0/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c=
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=
@ -48,36 +42,32 @@ github.com/stefansundin/go-zflag v1.1.1/go.mod h1:HXX5rABl1AoTcZ2jw+CqJ7R8irczaL
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU=
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
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/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
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/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=

2
mkfile
View File

@ -17,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

@ -96,7 +96,7 @@ 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.",

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

@ -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

@ -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,7 +87,7 @@ 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