Skip to content

Commit 817d0cb

Browse files
authored
Readme (#39)
* buttons * make with languages * completions * chatgpty to html * formatting * center thanks * beginning * organizing new options * Installation options * looking noice * touchups * links * Fixing buttons * fixing completions and documents
1 parent 5e165c0 commit 817d0cb

3 files changed

Lines changed: 111 additions & 156 deletions

File tree

README.md

Lines changed: 109 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,114 @@
1-
<div align="center">
2-
<h1>doge</h1>
3-
4-
doge is a fork of [dog](https://github.com/ogham/dog).
5-
6-
<!-- <a href="https://travis-ci.org/github/ogham/dog">
7-
<img src="https://travis-ci.org/ogham/dog.svg?branch=master" alt="Build status" />
8-
</a> -->
9-
10-
<a href="https://saythanks.io/to/Dj-Codeman">
11-
<img src="https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg" alt="Say thanks!" />
12-
</a>
1+
<h1>DOGE</h1>
2+
3+
<p align="center">
4+
<img src="https://img.shields.io/github/license/Dj-Codeman/doge?style=flat-square&logo=opensourceinitiative&logoColor=white&color=0080ff" alt="license">
5+
<img href="https://saythanks.io/to/Dj-Codeman" src="https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg" alt="Say thanks!" />
6+
<img src="https://img.shields.io/github/last-commit/Dj-Codeman/doge?style=flat-square&logo=git&logoColor=white&color=0080ff" alt="last-commit">
7+
<img src="https://img.shields.io/github/languages/top/Dj-Codeman/doge?style=flat-square&color=0080ff" alt="repo-top-language">
8+
<img src="https://img.shields.io/github/languages/count/Dj-Codeman/doge?style=flat-square&color=0080ff" alt="repo-language-count">
9+
<p>
10+
<p align="center">
11+
<img src="https://img.shields.io/badge/YAML-CB171E.svg?style=flat-square&logo=YAML&logoColor=white" alt="YAML">
12+
<img src="https://img.shields.io/badge/PowerShell-5391FE.svg?style=flat-square&logo=PowerShell&logoColor=white" alt="PowerShell">
13+
<img src="https://img.shields.io/badge/Docker-2496ED.svg?style=flat-square&logo=Docker&logoColor=white" alt="Docker">
14+
<img src="https://img.shields.io/badge/GitHub%20Actions-2088FF.svg?style=flat-square&logo=GitHub-Actions&logoColor=white" alt="GitHub%20Actions">
15+
<img src="https://img.shields.io/badge/JSON-000000.svg?style=flat-square&logo=JSON&logoColor=white" alt="JSON">
16+
<img src="https://img.shields.io/badge/Rust-000000.svg?style=flat-square&logo=Rust&logoColor=white" alt="Rust">
17+
</p>
18+
</div>
19+
20+
<img src="doge-screenshot.jpg" alt="A screenshot of dog making a DNS request">
21+
22+
<hr>
23+
24+
<div>
25+
<h4>Doge <em>can</em> look up!</h4>
26+
<p><strong>doge</strong> is a command-line DNS client, like <code>dig</code> forked from the amazing work done <a href="https://github.com/ogham/dog">here</a>. It has colourful output, understands normal command-line argument syntax, supports the DNS-over-TLS and DNS-over-HTTPS protocols, and can emit JSON. I believe this is an amazing project and should be improved on.</p>
27+
</div>
28+
29+
<div>
30+
<h2>Examples</h2>
31+
<pre>
32+
<code>doge example.net</code> Query a domain using default settings
33+
<code>doge example.net MX</code> ...looking up MX records instead
34+
<code>doge example.net MX @1.1.1.1</code> ...using a specific nameserver instead
35+
<code>doge example.net MX @1.1.1.1 -T</code> ...using TCP rather than UDP
36+
<code>doge exapple.net MX @1.1.1.1 -p 69</code> ...using a nonstandard port
37+
<code>doge -q example.net -t MX -n 1.1.1.1 -T</code> As above, but using explicit arguments
38+
</pre>
39+
40+
<h2>Command-line options</h2>
41+
<div>
42+
<h3>Query options</h3>
43+
<pre>
44+
<code>&lt;arguments&gt;</code> Human-readable host names, nameservers, types, or classes
45+
<code>-q, --query=HOST</code> Host name or domain name to query
46+
<code>-t, --type=TYPE</code> Type of the DNS record being queried (A, MX, NS...)
47+
<code>-n, --nameserver=ADDR</code> Address of the nameserver to send packets to
48+
<code>-p, --port=PORT</code> Port options for sending queries on nonstandard ports
49+
<code>--class=CLASS</code> Network class of the DNS record being queried (IN, CH, HS)
50+
</pre>
51+
</div>
52+
53+
<div>
54+
<h3>Sending options</h3>
55+
<pre>
56+
<code>--edns=SETTING Whether to OPT in to EDNS (disable, hide, show)
57+
--txid=NUMBER Set the transaction ID to a specific value
58+
-Z=TWEAKS Set uncommon protocol-level tweaks</code>
59+
</pre>
60+
</div>
61+
62+
<div>
63+
<h3>Protocol options</h3>
64+
<pre>
65+
<code>-U, --udp Use the DNS protocol over UDP
66+
-T, --tcp Use the DNS protocol over TCP
67+
-S, --tls Use the DNS-over-TLS protocol
68+
-H, --https Use the DNS-over-HTTPS protocol</code>
69+
</pre>
70+
</div>
71+
72+
<div>
73+
<h3>Output options</h3>
74+
<pre>
75+
<code>-1, --short Short mode: display nothing but the first result
76+
-J, --json Display the output as JSON
77+
--color, --colour=WHEN When to colourise the output (always, automatic, never)
78+
--seconds Do not format durations, display them as seconds
79+
--time Print how long the response took to arrive</code>
80+
</pre>
81+
</div>
1382
</div>
1483

15-
![A screenshot of dog making a DNS request](doge-screenshot.jpg)
16-
17-
---
18-
19-
Doge _can_ look up!
20-
21-
**doge** is a command-line DNS client, like `dig` forked from the amazing work done [here](https://github.com/ogham/dog).
22-
It has colourful output, understands normal command-line argument syntax, supports the DNS-over-TLS and DNS-over-HTTPS protocols, and can emit JSON. I belive this is an amazing project and should be improved on.
23-
24-
## Examples
25-
26-
doge example.net Query a domain using default settings
27-
doge example.net MX ...looking up MX records instead
28-
doge example.net MX @1.1.1.1 ...using a specific nameserver instead
29-
doge example.net MX @1.1.1.1 -T ...using TCP rather than UDP
30-
doge exapple.net MX @1.1.1.1 -p 53 ...using a nonstandart port
31-
doge -q example.net -t MX -n 1.1.1.1 -T As above, but using explicit arguments
32-
33-
---
34-
35-
## Command-line options
36-
37-
### Query options
38-
39-
<arguments> Human-readable host names, nameservers, types, or classes
40-
-q, --query=HOST Host name or domain name to query
41-
-t, --type=TYPE Type of the DNS record being queried (A, MX, NS...)
42-
-n, --nameserver=ADDR Address of the nameserver to send packets to
43-
-p, --port=PORT Port options for sending queries on nonstandart ports
44-
--class=CLASS Network class of the DNS record being queried (IN, CH, HS)
45-
46-
### Sending options
47-
48-
--edns=SETTING Whether to OPT in to EDNS (disable, hide, show)
49-
--txid=NUMBER Set the transaction ID to a specific value
50-
-Z=TWEAKS Set uncommon protocol-level tweaks
51-
52-
### Protocol options
5384

54-
-U, --udp Use the DNS protocol over UDP
55-
-T, --tcp Use the DNS protocol over TCP
56-
-S, --tls Use the DNS-over-TLS protocol
57-
-H, --https Use the DNS-over-HTTPS protocol
85+
<!-- more options -->
5886

59-
### Output options
60-
61-
-1, --short Short mode: display nothing but the first result
62-
-J, --json Display the output as JSON
63-
--color, --colour=WHEN When to colourise the output (always, automatic, never)
64-
--seconds Do not format durations, display them as seconds
65-
--time Print how long the response took to arrive
66-
67-
68-
---
69-
70-
## Installation
71-
72-
Currently:
73-
To install dog, you can download a pre-compiled binary, or you can compile it from source. You _**may**_ be able to install dog using your OS’s package manager, depending on your platform.
74-
75-
Issues:
76-
I am not a rust expert at all, Honestly I'm the opposite, just learning codding. I used [`dog`](https://github.com/ogham/dog) on my arch system and a few random *nix Laptops that I perpetually fix and break . As such part of this progect will be outside of my skill set or ability to work on currently.
77-
For **Windows** I don't intende on installing windows 11 anytime soon, So I most likely won't be adding new windows features
78-
For **Macos** Till i can afford to waste money on a mac, the workflow for building release packages is the only support macos is going to get
79-
For **Docker**, This is magic as far as I'm concerned. While I learn the spells to use it in a meaningful way expect things to be broken
80-
81-
If any of these are things you want to see make a PR and I'll read and merge it, Be on the lookout for some potentially dumb questions from me.
82-
83-
### Packages
84-
85-
They exist now !!!
86-
87-
$ cargo install dns-doge
88-
$ yay -S dns-doge
87+
<h2>Installation</h2>
88+
<div>
89+
<h3>Current and Upcoming packages</h3>
90+
<pre>
91+
<code>Cargo: cargo install dns-doge
92+
ArchLinux: yay -S dns_doge
93+
Ubuntu/Debian: Comming Soon
94+
RHEL/Fedora/Cenos: Publishing rpm</code>
95+
</pre>
8996

90-
<!-- - For Homebrew on macOS, install the [`dog`](https://formulae.brew.sh/formula/dog) formula.
91-
- For NixOS, install the [`dogdns`](https://search.nixos.org/packages?channel=unstable&show=dogdns&query=dogdns) package. -->
92-
93-
94-
### Downloads
95-
96-
Binary downloads of doge are available from [the releases section on GitHub](https://github.com/Dj-Codeman/doge/releases/) for 64-bit Windows, macOS, and Linux targets. They contain the compiled executable, the manual page, and shell completions.
97-
98-
99-
### Compilation
100-
101-
doge is written in [Rust](https://www.rust-lang.org).
102-
I working on rustc version [1.76.0](https://blog.rust-lang.org/2024/02/08/Rust-1.76.0.html) you should be running this version or newer.
103-
The recommended way to install Rust for development is from the [official download page](https://www.rust-lang.org/tools/install), using rustup.
104-
105-
To build, download the source code and run:
106-
107-
$ cargo build
108-
$ cargo test
109-
110-
111-
- If you are compiling a copy for yourself, be sure to run `cargo build --release` or `make build-release` to benefit from release-mode optimisations.
112-
Copy the resulting binary, which will be in the `target/release` directory, into a folder in your `$PATH`.
113-
`/usr/local/bin` is usually a good choice.
114-
115-
- To compile and install the manual pages, you will need [pandoc](https://pandoc.org/).
116-
The `make man` command will compile the Markdown into manual pages, which it will place in the `target/man` directory.
117-
To use them, copy them into a directory that `man` will read.
118-
`/usr/local/share/man` is usually a good choice.
119-
120-
121-
### Container image
122-
123-
To build the container image of doge, you can use Docker, Podman or Kaniko. Here an example using Docker:
124-
125-
$ docker build -t doge .
126-
127-
You can then run it using the following command:
128-
129-
$ docker run -it --rm doge
130-
131-
To run dog directly, you can then define the following alias:
132-
133-
$ alias doge="docker run -it --rm doge"
134-
135-
136-
### Feature toggles
137-
138-
doge has three Cargo features that can be switched off to remove functionality.
139-
While doing so makes doge less useful, it results in a smaller binary that takes less time to build.
140-
141-
There are three feature toggles available, all of which are active by default:
142-
143-
- `with_idna`, which enables [IDNA](https://en.wikipedia.org/wiki/Internationalized_domain_name) processing
144-
- `with_tls`, which enables DNS-over-TLS
145-
- `with_https`, which enables DNS-over-HTTPS (requires `with_tls`)
146-
147-
Use `cargo` to build a binary that uses feature toggles. For example, to disable TLS and HTTPS support but keep IDNA support enabled, you can run:
148-
149-
$ cargo build --no-default-features --features=with_idna
150-
151-
The list of features that have been disabled can be checked at runtime as part of the `--version` string.
152-
153-
154-
---
155-
156-
## Documentation
157-
158-
For documentation on how to use doge, see the dog website: <https://dns.lookup.dog/>
159-
Eventually I will make a new one
97+
<h3>Docker/Podman</h3>
98+
<p>To build the container image of doge, you can use Docker or Podman. Here an example using Docker:</p>
99+
<code>$ docker build -t doge .</code>
100+
<p>You can then run it using the following command:</p>
101+
<code>$ docker run -it --rm doge</code>
102+
<p>To run dog directly, you can then define the following alias:</p>
103+
<code>$ alias doge="docker run -it --rm doge"</code>
104+
105+
<h3>Notes</h3>
106+
<p>I am not a Rust expert at all, Honestly I'm the opposite, just learning coding. I used <a href="https://github.com/ogham/dog">dog</a> on my Arch system and a few random *nix Laptops that I perpetually fix and break. As such parts of maintaining and improving this project
107+
will be outside of my understanding. Learning packaging, docker stuff and CI/CD. I'm too broke for a mac book, and currently refuse to
108+
install windows 10/11, Small fixes and improvements I'll try to fix timely but major things especially on my non target machines might
109+
take awhile - forever to fix ( please drop a PR ) in those cases :). </p>
110+
111+
<h4>Website</h4>
112+
<p> I will make a website at some point... for the time being nothing to drastic has changed from the dog <a href=" https://dns.lookup.dog">website</a>
113+
</p>
114+
</div>

completions/doge.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ _doge()
4545
;;
4646
esac
4747
} &&
48-
complete -o bashdefault -F _dog dog
48+
complete -o bashdefault -F _doge doge

man/doge.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% doge(1) v0.1.1
1+
% doge(1) v0.2.7
22

33
<!-- This is the doge(1) man page, written in Markdown. -->
44
<!-- To generate the roff version, run `just man`, -->

0 commit comments

Comments
 (0)