Compare commits
106 Commits
Author | SHA1 | Date |
---|---|---|
Renovate Bot | 6677c6b5e5 | |
Renovate Bot | 7126c753e9 | |
Renovate Bot | c1a4a7f93a | |
Sam Therapy | 9aebf89f57 | |
Renovate Bot | 37e0c1e9b5 | |
Sam Therapy | 40278ed22f | |
Renovate Bot | 7631dd7a7b | |
Renovate Bot | 2140c1582f | |
Renovate Bot | 8c00f85636 | |
Renovate Bot | 8e54337787 | |
Sam Therapy | a5980be3cc | |
Sam Therapy | 58cee5b3c9 | |
Renovate Bot | 3881caff0d | |
Sam Therapy | d8c40abf5a | |
Sam Therapy | 92cf0b465b | |
Sam Therapy | b5f4ea9c42 | |
Sam Therapy | 8434739516 | |
Sam Therapy | 556b7a48af | |
Sam Therapy | 21047275bf | |
Sam Therapy | 835cb8c950 | |
Sam Therapy | 20f5b21be1 | |
Renovate Bot | b975dd8c00 | |
Renovate Bot | 42e50d3e93 | |
Sam Therapy | 7030e68100 | |
Renovate Bot | c4a267cec9 | |
Renovate Bot | 434de0e5b4 | |
Renovate Bot | 52cef2e3a3 | |
Renovate Bot | e0b14b8b00 | |
Renovate Bot | c580ac78d4 | |
Renovate Bot | 99e75afcd3 | |
Renovate Bot | 6ddbf854d8 | |
Sam Therapy | 16ef3de591 | |
Renovate Bot | f9263300c7 | |
Sam Therapy | d43543e48a | |
Sam Therapy | 0a6d6b432c | |
Sam Therapy | ffb16ff7fa | |
Sam Therapy | efb4cd6c4a | |
Sam Therapy | 59fa146d7f | |
Sam Therapy | c5c90b97af | |
Sam Therapy | e1122a9de7 | |
Sam Therapy | 26ef04b969 | |
Sam Therapy | 2565d34ade | |
Sam Therapy | 7dd9b138a3 | |
Sam Therapy | b8a2407169 | |
Renovate Bot | 9ef46d33e8 | |
Renovate Bot | 939a09da5b | |
Renovate Bot | 87c59551ec | |
Renovate Bot | 7efc9523bf | |
Renovate Bot | 2084ae69f6 | |
Renovate Bot | 5130b6c3cd | |
Renovate Bot | 8c949ce4ca | |
Renovate Bot | b3fad7abcf | |
Renovate Bot | b713aeb7d4 | |
Renovate Bot | 260eb979b3 | |
Renovate Bot | 83ecfbaea1 | |
Renovate Bot | 10faea804b | |
Renovate Bot | 0f80004790 | |
Renovate Bot | 12863559c5 | |
Renovate Bot | 8e9574f870 | |
Renovate Bot | fadb04f49f | |
Renovate Bot | 5704c6a0dd | |
Renovate Bot | 9c8e5349bf | |
Sam Therapy | dcd932c42e | |
Sam Therapy | f4c3283954 | |
Sam Therapy | 824a60aef1 | |
Sam Therapy | 43e53a4055 | |
Sam Therapy | 60b0300eec | |
Sam Therapy | 9740e6b348 | |
Renovate Bot | 8c888a90f1 | |
Renovate Bot | 71477684d9 | |
Renovate Bot | e3951db486 | |
Renovate Bot | dfe4cca176 | |
Renovate Bot | b5102c91e6 | |
Renovate Bot | 03e8f6be61 | |
Renovate Bot | f60cd1c315 | |
Renovate Bot | 00b116abf4 | |
Renovate Bot | 821149b463 | |
Renovate Bot | f2f53795ef | |
Renovate Bot | 322345a758 | |
Renovate Bot | b4de2ba89e | |
Sam Therapy | 3421066420 | |
Sam Therapy | aef8a73a28 | |
Sam Therapy | ba93384f9b | |
Sam Therapy | 66855b5542 | |
Sam Therapy | ccc9df39b6 | |
Renovate Bot | c6bbda17b2 | |
Sam Therapy | db77f2315c | |
Sam Therapy | a157dcb7fb | |
Sam Therapy | 428c218405 | |
Sam Therapy | 8df4863cf4 | |
Sam Therapy | c0cd4d7771 | |
Renovate Bot | 5f1b81a2be | |
Renovate Bot | 45d1aaf535 | |
Renovate Bot | 4f42657294 | |
Renovate Bot | b6bd22a8fe | |
Sam Therapy | b0d8e325d6 | |
Sam Therapy | fb9fd7689f | |
Sam Therapy | 329d81c001 | |
Renovate Bot | 5329a6f2e0 | |
Renovate Bot | 95ff6f554c | |
Sam Therapy | 928123edbd | |
Renovate Bot | fd3ceeb066 | |
Renovate Bot | 1acd48b16d | |
Sam Therapy | 27ece358c6 | |
Sam Therapy | 58fa7af2ea | |
Sam Therapy | 75fb8f2fc6 |
166
.drone.jsonnet
166
.drone.jsonnet
|
@ -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(),
|
||||
]
|
|
@ -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 }}
|
|
@ -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 }}
|
|
@ -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
|
|
@ -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.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@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 }}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,7 +23,7 @@ coverage/*
|
|||
!coverage/.gitkeep
|
||||
|
||||
awl
|
||||
doc/awl.1
|
||||
doc/awl.1.gz
|
||||
docs/awl.1
|
||||
docs/awl.1.gz
|
||||
|
||||
.dccache
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "doc/wiki"]
|
||||
path = doc/wiki
|
||||
[submodule "docs/wiki"]
|
||||
path = docs/wiki
|
||||
url = ../awl.wiki
|
||||
|
|
235
.goreleaser.yaml
235
.goreleaser.yaml
|
@ -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
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
FROM scratch
|
||||
ENTRYPOINT ["/awl"]
|
||||
COPY awl /
|
|
@ -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
|
||||
|
|
|
@ -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.
|
2
Makefile
2
Makefile
|
@ -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
242
README.md
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
/dev/null
|
|
@ -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.
|
|
@ -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_
|
Binary file not shown.
After Width: | Height: | Size: 195 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 505 KiB |
|
@ -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
|
40
go.mod
40
go.mod
|
@ -1,33 +1,33 @@
|
|||
module dns.froth.zone/awl
|
||||
|
||||
go 1.18
|
||||
go 1.21.9
|
||||
|
||||
toolchain go1.22.2
|
||||
|
||||
require (
|
||||
dns.froth.zone/dnscrypt v0.0.0-20230306222640-3459b621a676
|
||||
dns.froth.zone/dnscrypt v0.0.2
|
||||
github.com/dchest/uniuri v1.2.0
|
||||
github.com/miekg/dns v1.1.51
|
||||
github.com/quic-go/quic-go v0.33.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.8.0
|
||||
golang.org/x/sys v0.6.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/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-20230228050547-1710fef4ab10 // 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.9.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.7.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230304125523-9ff063c70017 // indirect
|
||||
golang.org/x/mod v0.9.0 // indirect
|
||||
golang.org/x/text v0.8.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
|
||||
)
|
||||
|
|
154
go.sum
154
go.sum
|
@ -1,7 +1,7 @@
|
|||
dns.froth.zone/dnscrypt v0.0.0-20230306222640-3459b621a676 h1:Ij1Tqwdz/xMqHDx4vl9OuTyTj+2tR6bwi8MHBI2xNnc=
|
||||
dns.froth.zone/dnscrypt v0.0.0-20230306222640-3459b621a676/go.mod h1:BL/pO9X1z29u88hdlxNXHrLYhIGZ30k8+vD6ksvTzUk=
|
||||
github.com/AdguardTeam/golibs v0.12.0 h1:z4Q3Mz0pHJ2Zag4B0RBaIXEUue1TPOKkbRiYkwC4r7I=
|
||||
github.com/AdguardTeam/golibs v0.12.0/go.mod h1:87bN2x4VsTritptE3XZg9l8T6gznWsIxHBcQ1DeRIXA=
|
||||
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=
|
||||
|
@ -10,120 +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/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso=
|
||||
github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk=
|
||||
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.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo=
|
||||
github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c=
|
||||
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/ginkgo/v2 v2.9.0 h1:Tugw2BKlNHTMfG+CheOITkYvk4LAh6MFOvikhGVnhE8=
|
||||
github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk=
|
||||
github.com/onsi/gomega v1.27.0 h1:QLidEla4bXUuZVFa4KX6JHCsuGgbi85LC/pCHrt/O08=
|
||||
github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754=
|
||||
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-19 v0.2.1 h1:aJcKNMkH5ASEJB9FXNeZCyTEIHU1J7MmHyz1Q1TSG1A=
|
||||
github.com/quic-go/qtls-go1-19 v0.2.1/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI=
|
||||
github.com/quic-go/qtls-go1-20 v0.1.1 h1:KbChDlg82d3IHqaj2bn6GfKRj84Per2VGf5XV3wSwQk=
|
||||
github.com/quic-go/qtls-go1-20 v0.1.1/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM=
|
||||
github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0=
|
||||
github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA=
|
||||
github.com/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=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
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.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
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/exp v0.0.0-20230304125523-9ff063c70017 h1:3Ea9SZLCB0aRIhSEjM+iaGIlzzeDJdpi579El/YIhEE=
|
||||
golang.org/x/exp v0.0.0-20230304125523-9ff063c70017/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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
||||
golang.org/x/mod v0.9.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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
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.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
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-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
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.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
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.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
|
||||
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
8
mkfile
|
@ -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 ./...
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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{
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:base", ":npm", ":gomod"]
|
||||
"extends": ["config:base", ":npm", ":gomod"],
|
||||
"automerge": true
|
||||
}
|
||||
|
|
|
@ -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
|
11
template.mk
11
template.mk
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue