
Mooncell
A DNS over HTTPS proxy/bridge.
It receives DNS requests (over UDP and TCP) and resolves them using a user selected provider.
Requirements for 1.0
- [x] Full end-to-end resolution
- [x] Configurable port to listen on
- [x] Support for UDP requests
- [ ] Support for TCP requests
- [x] Built in list of providers to pick from
- [x] DNS-over-HTTPS via JSON
- [ ] Handle resolution errors by returning an empty response
- [x] 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)
- Install OpenSSL for Windows 64 bit via the large dev binaries, or in one of the other possible, painful ways
- Set varialbe
set OPENSSL_DIR=c:\OpenSSL-Win64
(assuming you installed it in the default path)
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.