Merge branch 'main' of github.com:mr-karan/doggo into main

pull/7/head v0.1.1
Karan Sharma 2020-12-19 10:57:14 +05:30
commit d406d54170
4 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@
**doggo** is a modern command-line DNS client (like _dig_) written in Golang. It outputs information in a neat concise manner and supports protocols like DoH, DoT as well. **doggo** is a modern command-line DNS client (like _dig_) written in Golang. It outputs information in a neat concise manner and supports protocols like DoH, DoT as well.
It's totally inspired from [dog](https://github.com/ogham/dog/) which is written in Rust. I wanted to add some features to it but since I don't know Rust, I found it as a nice oppurtunity It's totally inspired from [dog](https://github.com/ogham/dog/) which is written in Rust. I wanted to add some features to it but since I don't know Rust, I found it as a nice opportunity
to experiment with writing a DNS Client from scratch in `Go` myself. Hence the name `dog` +`go` => **doggo**. to experiment with writing a DNS Client from scratch in `Go` myself. Hence the name `dog` +`go` => **doggo**.
## Features ## Features
@ -63,7 +63,7 @@ $ sudo snap install doggo
``` ```
**NOTE**: Since the [confinement](https://snapcraft.io/docs/snap-confinement) mode is strict as of now, it cannot access your host's `/etc/resolv.conf`. **NOTE**: Since the [confinement](https://snapcraft.io/docs/snap-confinement) mode is strict as of now, it cannot access your host's `/etc/resolv.conf`.
I'll be making a request in the Snap forums soon so that it can be manually reviewed and allowed to use `--classic`. Until then, please specify a namesever manually I'll be making a request in the Snap forums soon so that it can be manually reviewed and allowed to use `--classic`. Until then, please specify a nameserver manually
if using `snap`. if using `snap`.
### From Source ### From Source
@ -200,7 +200,7 @@ URL scheme of the server is used to identify which resolver to use for lookups.
### Resolver Options ### Resolver Options
``` ```
--ndots=INT Specify ndots parameter. Takes value from /etc/resolv.conf if using the system namesever or 1 otherwise. --ndots=INT Specify ndots parameter. Takes value from /etc/resolv.conf if using the system nameserver or 1 otherwise.
--search Use the search list defined in resolv.conf. Defaults to true. Set --search=false to disable search list. --search Use the search list defined in resolv.conf. Defaults to true. Set --search=false to disable search list.
--timeout Specify timeout (in seconds) for the resolver to return a response. --timeout Specify timeout (in seconds) for the resolver to return a response.
-4 --ipv4 Use IPv4 only. -4 --ipv4 Use IPv4 only.

View File

@ -37,7 +37,7 @@
- [x] Add client transport options - [x] Add client transport options
- [x] Fix an issue while loading free form args, where the same records are being added twice - [x] Fix an issue while loading free form args, where the same records are being added twice
- [x] Remove urfave/cli in favour of `pflag + koanf` - [x] Remove urfave/cli in favour of `pflag + koanf`
- [x] Flags - Remove uneeded ones - [x] Flags - Remove unneeded ones
## Documentation ## Documentation
- [x] README - [x] README
@ -53,10 +53,10 @@
--- ---
# Future Release # Future Release
- [ ] Support obscure protocal tweaks in `dig` - [ ] Support obscure protocol tweaks in `dig`
- [ ] `digfile` - [ ] `digfile`
- [ ] Support more DNS Record Types - [ ] Support more DNS Record Types
- [ ] Error on NXDomain (Realted upstream [bug](https://github.com/miekg/dns/issues/1198)) - [ ] Error on NXDomain (Related upstream [bug](https://github.com/miekg/dns/issues/1198))
- [ ] Shell completions - [ ] Shell completions
- [ ] bash - [ ] bash
- [ ] zsh - [ ] zsh

View File

@ -38,8 +38,8 @@ func main() {
// Resolver Options // Resolver Options
f.Int("timeout", 5, "Sets the timeout for a query to T seconds. The default timeout is 5 seconds.") f.Int("timeout", 5, "Sets the timeout for a query to T seconds. The default timeout is 5 seconds.")
f.Bool("search", true, "Use the search list provided in resolv.conf. It sets the `ndots` parameter as well unless overriden by `ndots` flag.") f.Bool("search", true, "Use the search list provided in resolv.conf. It sets the `ndots` parameter as well unless overridden by `ndots` flag.")
f.Int("ndots", 0, "Specify the ndots paramter. Default value is taken from resolv.conf and fallbacks to 1 if ndots statement is missing in resolv.conf") f.Int("ndots", 0, "Specify the ndots parameter. Default value is taken from resolv.conf and fallbacks to 1 if ndots statement is missing in resolv.conf")
f.BoolP("ipv4", "4", false, "Use IPv4 only") f.BoolP("ipv4", "4", false, "Use IPv4 only")
f.BoolP("ipv6", "6", false, "Use IPv6 only") f.BoolP("ipv6", "6", false, "Use IPv6 only")

View File

@ -62,7 +62,7 @@ func (hub *Hub) prepareQuestions() ([]dns.Question, error) {
hub.Logger.WithFields(logrus.Fields{ hub.Logger.WithFields(logrus.Fields{
"domain": d, "domain": d,
"ndots": hub.QueryFlags.Ndots, "ndots": hub.QueryFlags.Ndots,
}).Debug("Attmepting to resolve") }).Debug("Attempting to resolve")
question := dns.Question{ question := dns.Question{
Name: d, Name: d,
} }