RapidoDNS for Linux and macOS
=============================

Anti-sanction DNS and SNI relay. Not a VPN: only the hostnames you choose go
through us, everything else on the machine goes out the way it always did.

Install
-------

    tar xzf rapidodns-unix.tar.gz
    cd rapidodns
    sudo ./rapidodns --check          # does the tunnel work from here?
    sudo ./rapidodns --list           # what can be carried
    sudo ./rapidodns discord steam    # carry those two
    sudo ./rapidodns --all            # carry everything on the list

Ctrl-C puts your DNS back. So does closing the terminal. If the machine lost
power in the middle of a session and DNS is still pointing here:

    sudo ./rapidodns --restore

Why it needs root: it listens on port 53 and changes the machine's resolver.
It does nothing else with the privilege, and every network setting it changes
is written to /var/lib/rapidodns before it changes it.

Running it in the background (Linux, systemd)
---------------------------------------------

    sudo cp -r . /opt/rapidodns
    sudo tee /etc/systemd/system/rapidodns.service >/dev/null <<'UNIT'
    [Unit]
    Description=RapidoDNS
    After=network-online.target
    Wants=network-online.target

    [Service]
    ExecStart=/opt/rapidodns/rapidodns --all
    Restart=on-failure
    RestartSec=5

    [Install]
    WantedBy=multi-user.target
    UNIT
    sudo systemctl enable --now rapidodns

macOS
-----

Works the same way. It sets DNS on every network service with
`networksetup`, and adds the loopback aliases it needs with `ifconfig`; both
are undone on exit. Because it is a script rather than a signed .app, macOS
will not ask you to approve anything -- but it also will not run it for you at
login. Use launchd if you want that.

Requirements
------------

Python 3.7 or newer, which both systems already have. Nothing to install.

Files
-----

    rapidodns        the program
    services.json    what each service is, and which hostnames it uses
    servers.json     which server to use and how to reach the tunnel

Both .json files are read from the folder the program is in, so you can edit
them without rebuilding anything.
