4 releases

0.1.3 Jun 10, 2019
0.1.2 May 12, 2019
0.1.1 May 12, 2019
0.1.0 May 12, 2019

#19 in #receive

BSD-3-Clause

90KB
1.5K SLoC

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)

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.

Dependencies

~22–30MB
~515K SLoC