mooncell

Crates.iomooncell
lib.rsmooncell
version0.1.3
sourcesrc
created_at2019-05-12 20:44:47.556781
updated_at2019-06-10 21:05:50.035828
descriptionA DNS-over-HTTPS server
homepage
repositoryhttps://github.com/detro/mooncell
max_upload_size
id133852
size91,929
Ivan De Marino (detro)

documentation

README

Crates.io Build Status License

Mooncell

A DNS over HTTPS proxy/bridge. The aim? Increasing your privacy, by avoiding your ISP DNS resolver.

It receives DNS requests (over UDP and TCP) and resolves them using a user selected provider.

Try it!

cargo install mooncell
# ...
mooncell -h

As you can see below, there are still features to be implemented for Mooncell to be considered "production worthy", but right now it's enough for you to play around with it.

Requirements for 1.0

  • Avoid circular calls by pre-resolving the providers hostnames. Will probably need a built-in list of IP-based DNS resolvers to use at launch.
  • Full end-to-end resolution
  • Configurable port to listen on
  • Support for UDP requests
  • Support for TCP requests
  • Built in list of providers to pick from
  • DNS-over-HTTPS via JSON
  • Handle resolution errors by returning an empty response
  • Switch to Rust 2018

Follow-up features

  • Adopt Rust official tooling for code formatting/styling (rustfmt, clippy, ...)
  • A configurable, local cache (in memory to begin with, then look into file backed)
  • DNS-over-HTTPS via binary message
  • User-configurable provider
  • Reach providers via IP, not via FQDN (i.e. resolve at launch, then send Host header)

Related documentation

IETF

(Stable) Providers of DNS-over-HTTPS

DNS protocol

Other

Compiling

Windows (x64)

  1. Install OpenSSL for Windows 64 bit via the large dev binaries, or in one of the other possible, painful ways
  2. Set varialbe set OPENSSL_DIR=c:\OpenSSL-Win64 (assuming you installed it in the default path)
  3. cargo build should now work

Personal notes

  • Both Processor and Server are services (similar to Guava services): you are suppose to start them, stop them and (optionally) wait for them to terminate. I think there is a good case here for implementing a tiny crate that provides Trait(s) for services a la Guava. UPDATE: Created srvzio and now Mooncell's services are based on it.
  • I made everything with Threads, but by the end I expect to rewrite everything using proper Rust async/await. I just could not surmount the Tokio + Hyper learning curve while also doing the same for the Rust language itself.
Commit count: 0

cargo fmt