diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 08487d5..1c5f6bc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,8 +4,6 @@ on: push: branches: - release - - master - - release tags: - 'latest' jobs: @@ -13,19 +11,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 - - name: openssl dependency + uses: actions/checkout@v3 + - name: Install OpenSSL dependency run: | sudo apt-get install libssl-dev - - name: Updating cargo - run: | - cargo update + - name: Update Cargo + run: cargo update - name: Build run: | cargo build --target=x86_64-unknown-linux-gnu --release - mkdir out + mkdir -p out mv -v target/x86_64-unknown-linux-gnu/release/doge out/doge_linux_64bit - - name: Upload to artifact + - name: Upload to Artifact uses: actions/upload-artifact@v3 with: name: binary_linux @@ -34,10 +31,9 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v4 - - name: Updating cargo - run: | - cargo update + uses: actions/checkout@v3 + - name: Update Cargo + run: cargo update - name: Setup Dependencies run: | rustup target add aarch64-apple-darwin @@ -46,10 +42,10 @@ jobs: run: | cargo build --target=aarch64-apple-darwin --release cargo build --target=x86_64-apple-darwin --release - mkdir out + mkdir -p out mv -v target/aarch64-apple-darwin/release/doge out/doge_darwin_arm64 mv -v target/x86_64-apple-darwin/release/doge out/doge_darwin_x86_64 - - name: Upload to artifact + - name: Upload to Artifact uses: actions/upload-artifact@v3 with: name: binary_macos @@ -58,38 +54,42 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v4 - - name: Setup rust - run: | - rustup target add aarch64-pc-windows-msvc + uses: actions/checkout@v3 + - name: Install Rust Toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Setup Windows Dependencies + run: rustup target add aarch64-pc-windows-msvc - name: Build run: | cargo build --release --target x86_64-pc-windows-msvc - mkdir out + mkdir -p out move target\x86_64-pc-windows-msvc\release\doge.exe out\doge_windows_x86_64.exe - - name: Upload to artifact + - name: Upload to Artifact uses: actions/upload-artifact@v3 with: name: binary_windows path: ./out/* release: - runs-on: ubuntu-latest - needs: - - build-linux - - build-windows - - build-macos - steps: - - name: Download Artifact - uses: actions/download-artifact@v3 - with: - path: ./artifacts - - name: organize files - run: | - tree artifacts - mkdir out - mv -v artifacts/**/doge_* out/ - - name: Release - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v1 - with: - files: ./out/doge_* + runs-on: ubuntu-latest + needs: + - build-linux + - build-windows + - build-macos + steps: + - name: Download Artifact + uses: actions/download-artifact@v3 + with: + path: ./artifacts + - name: Organize Files + run: | + mkdir -p out + mv -v artifacts/**/doge_* out/ + - name: Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: softprops/action-gh-release@v1 + with: + files: ./out/doge_* diff --git a/Cargo.lock b/Cargo.lock index 7f1b6ad..59092d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "doge_transport" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d86321702916d28a95a1137291e5f7de57e496d94d7f53b306469d802b62c66" +checksum = "fa9645f94826864bb8a0bb78291dee9b6f01ed7ad011123539b3fe203471424d" dependencies = [ "cfg-if", "doge_dns", @@ -394,9 +394,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matches" @@ -458,9 +458,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags", "cfg-if", @@ -499,9 +499,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -530,9 +530,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -1124,9 +1124,9 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zeroize" diff --git a/Cargo.toml b/Cargo.toml index 424d083..33e8468 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ exclude = [ homepage = "https://dns.lookup.dog/" license = "MIT" -version = "0.2.7" +version = "0.2.8" [[bin]] name = "doge" @@ -41,7 +41,7 @@ panic = "abort" # dns stuff doge_dns = "1.0.2" -doge_transport = "0.2.5" +doge_transport = "0.2.6" # command-line ansi_term = "0.12" diff --git a/README.md b/README.md index d5ce498..f37a92f 100644 --- a/README.md +++ b/README.md @@ -1,159 +1,116 @@ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ doge is a command-line DNS client, like dig forked from the amazing work done here. 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.
++ +doge example.netQuery a domain using default settings +doge example.net MX...looking up MX records instead +doge example.net MX @1.1.1.1...using a specific nameserver instead +doge example.net MX @1.1.1.1 -T...using TCP rather than UDP +doge exapple.net MX @1.1.1.1 -p 69...using a nonstandard port +doge -q example.net -t MX -n 1.1.1.1 -TAs above, but using explicit arguments +
++<arguments>Human-readable host names, nameservers, types, or classes +-q, --query=HOSTHost name or domain name to query +-t, --type=TYPEType of the DNS record being queried (A, MX, NS...) +-n, --nameserver=ADDRAddress of the nameserver to send packets to +-p, --port=PORTPort options for sending queries on nonstandard ports +--class=CLASSNetwork class of the DNS record being queried (IN, CH, HS) +
+ --edns=SETTING Whether to OPT in to EDNS (disable, hide, show)
+ --txid=NUMBER Set the transaction ID to a specific value
+ -Z=TWEAKS Set uncommon protocol-level tweaks
+
+
+ -U, --udp Use the DNS protocol over UDP
+ -T, --tcp Use the DNS protocol over TCP
+ -S, --tls Use the DNS-over-TLS protocol
+ -H, --https Use the DNS-over-HTTPS protocol
+
+
+ -1, --short Short mode: display nothing but the first result
+ -J, --json Display the output as JSON
+ --color, --colour=WHEN When to colourise the output (always, automatic, never)
+ --seconds Do not format durations, display them as seconds
+ --time Print how long the response took to arrive
+
+
+ Cargo: cargo install dns-doge
+ ArchLinux: yay -S dns_doge
+ Ubuntu/Debian: Comming Soon
+ RHEL/Fedora/Cenos: Publishing rpm
+
-
-
-
-### Downloads
-
-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.
-
-
-### Compilation
-
-doge is written in [Rust](https://www.rust-lang.org).
-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.
-The recommended way to install Rust for development is from the [official download page](https://www.rust-lang.org/tools/install), using rustup.
-
-To build, download the source code and run:
-
- $ cargo build
- $ cargo test
-
-
-- 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.
-Copy the resulting binary, which will be in the `target/release` directory, into a folder in your `$PATH`.
-`/usr/local/bin` is usually a good choice.
-
-- To compile and install the manual pages, you will need [pandoc](https://pandoc.org/).
-The `make man` command will compile the Markdown into manual pages, which it will place in the `target/man` directory.
-To use them, copy them into a directory that `man` will read.
-`/usr/local/share/man` is usually a good choice.
-
-
-### Container image
-
-To build the container image of doge, you can use Docker, Podman or Kaniko. Here an example using Docker:
-
- $ docker build -t doge .
-
-You can then run it using the following command:
-
- $ docker run -it --rm doge
-
-To run dog directly, you can then define the following alias:
-
- $ alias doge="docker run -it --rm doge"
-
-
-### Feature toggles
-
-doge has three Cargo features that can be switched off to remove functionality.
-While doing so makes doge less useful, it results in a smaller binary that takes less time to build.
-
-There are three feature toggles available, all of which are active by default:
-
-- `with_idna`, which enables [IDNA](https://en.wikipedia.org/wiki/Internationalized_domain_name) processing
-- `with_tls`, which enables DNS-over-TLS
-- `with_https`, which enables DNS-over-HTTPS (requires `with_tls`)
-
-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:
-
- $ cargo build --no-default-features --features=with_idna
-
-The list of features that have been disabled can be checked at runtime as part of the `--version` string.
-
-
----
-
-## Documentation
-
-For documentation on how to use doge, see the dog website: To build the container image of doge, you can use Docker or Podman. Here an example using Docker:
+$ docker build -t doge .
+ You can then run it using the following command:
+$ docker run -it --rm doge
+
+ To run doge directly, you can then define the following alias:
+ +$ alias doge="docker run -it --rm doge"
+
+I am not a Rust expert at all, Honestly I'm the opposite, just learning coding. I used dog 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 + 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 + install windows 10/11, Small fixes and improvements I'll try to fix timely but major things especially on my non target machines might + take awhile - forever to fix ( please drop a PR ) in those cases :).
+ +I will make a website at some point... for the time being nothing to drastic has changed from the dog website +
+