golang-examples/dns-over-wikipedia/hosts-file
Jeff Carr cee5e5fffd great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00
..
src great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00
.gitignore great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00
Cargo.lock great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00
Cargo.toml great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00
README.md great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00
shell.nix great rust & javascript example. clean code! 2022-12-02 21:08:22 -06:00

README.md

Required dependencies:

  • dnsmasq
    • Ubuntu: sudo apt install dnsmasq
    • macOS: brew install dnsmasq
  • Rust (and Cargo)

1. Configure dnsmasq

Linux:

Add the following to your dnsmasq.conf:

address=/.idk/127.0.0.1

macOS:

echo "address=/.idk/127.0.0.1" >> "$(brew --prefix)/etc/dnsmasq.conf"
sudo brew services start dnsmasq

2. Use dnsmasq to resolve queries

macOS:

sudo mkdir -p /etc/resolver
sudo tee -a /etc/resolver/idk > /dev/null << EOF
nameserver 127.0.0.1
EOF

3. Installing

cargo install --path .

4. Running

sudo dns-over-wikipedia