This commit enables virtual DNS by default for the CLI.
Pros for this decision:
- It works out of the box in most cases.
- Users do not need to install third-party software.
- Users do not need to update their /etc/resolv.conf.
Cons:
- Not every server might support this.
- Hijacking port 53 without asking is somewhat intrusive.
Also, make the --dns argument an enum type. In the future, native
support for DNS over TCP/TLS might be added. In that case we could e.g.
supply tcp://1.1.1.1 to the --dns argument without breaking the CLI.
This commit does two things:
First, it implements a first, unfinished version of the virtual DNS
functionality. This feature is incomplete and has known bugs. Since it
needs to be enabled manually, this is not a huge issue so far.
Second, the commit fixes a bug where TCP streams where not properly
relayed, causing TCP connections to stall.