mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
With this we implement DNS forwarding that's specified in #2043 This also solve the DNS story in Android. For the headless client in Linux we still need to implement split dns, but we can make do with this, specially, we can read from resolvconf and use the forward DNS (not ideal but can work if we want a beta headless client). For the resolver I used `trusted-proto-resolver`. The other options were: * Using `domain`'s resolver but while it could work for now, it's no ideal for this since it doesn't support DoH or DoT and doesn't provide us with a DNS cache. * Using `trusted-proto-client`, it doesn't provide us with a DNS cache, though we could eventually replace it since it provides a way to access the underlying buffer which could make our code a bit simpler. * Writing our own. While we could make the API ideal, this is too much work for beta. @pratikvelani I did some refactor in the kotlin side so we can return an array of bytearrays so that we don't require parsing on connlib side, I also tried to make the dns server detector a bit simpler please take a look it's my first time doing kotlin @thomaseizinger please take a look specially at the first commit, I tried to integrate with the `poll_events` and the `ClientState`.