diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 120000 index 0000000..dc1dc0c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1 @@ +/dev/null \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..67015ae --- /dev/null +++ b/CONTRIBUTING.md @@ -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. diff --git a/README.md b/README.md index 5592f2c..f1c2504 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,15 @@ -# awl + +# awl > awl *(noun)*: A pointed tool for making small holes in wood or leather - A command-line DNS lookup tool that supports DNS queries over UDP, TCP, TLS, HTTPS, DNSCrypt, and 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) [![Go Report](https://goreportcard.com/badge/dns.froth.zone/awl?style=for-the-badge)](https://goreportcard.com/report/dns.froth.zone/awl) [![License](https://img.shields.io/github/license/samtherapy/awl?style=for-the-badge)](https://spdx.org/licenses/BSD-3-Clause.html) - 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). ## Examples @@ -20,8 +18,8 @@ Awl is designed to be a drop-in replacement for [dig](https://bind9.readthedocs. # Query a domain over UDP awl example.com -# Query a domain over TCP -awl example.com +# Query a domain over HTTPS, print only the results +awl example.com +https --short # Query a domain over TLS, print as JSON awl example.com +tls +json @@ -63,6 +61,7 @@ apk add awl-dns Arch 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 @@ -138,6 +137,7 @@ brew install SamTherapy/tap/awl ```shell brew install SamTherapy/tap/awl ``` +
@@ -152,11 +152,27 @@ brew install SamTherapy/tap/awl scoop bucket add froth https://git.froth.zone/packages/scoop.git scoop install awl ``` + +## Contributing + +Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file for more information. + +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)! + +### Mirrors + +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://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. diff --git a/cmd/misc.go b/cmd/misc.go index cc192aa..ed79143 100644 --- a/cmd/misc.go +++ b/cmd/misc.go @@ -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) } diff --git a/doc/awl-text.png b/doc/img/awl-text.png similarity index 100% rename from doc/awl-text.png rename to doc/img/awl-text.png diff --git a/doc/img/awl.svg b/doc/img/awl.svg new file mode 100644 index 0000000..3310529 --- /dev/null +++ b/doc/img/awl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pkg/resolvers/general.go b/pkg/resolvers/general.go index 67586ae..5cba475 100644 --- a/pkg/resolvers/general.go +++ b/pkg/resolvers/general.go @@ -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) } diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index ac80188..d6c5360 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -2,12 +2,16 @@ # why not? name: awl -base: core20 +base: bare 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. +icon: doc/img/awl.svg +issues: + - https://git.froth.zone/sam/awl/issues + - ~sammefishe/awl-devel@lists.sr.ht grade: devel confinement: strict @@ -38,4 +42,4 @@ apps: command: bin/awl completer: share/bash-completion/completions/awl plugs: - - network \ No newline at end of file + - network