Sync your Tailscale devices to Cloudflare DNS.
The functionality is based on this documentation on Tailscale: https://tailscale.com/kb/1054/dns?q=subdomain#using-a-public-dns-subdomain
It is basically taking the Tailscale IP addresses and put them under a subdomain A record on the DNS provider, which is Cloudflare in our case.
- Cloudflare API key: https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
- Create with permission to modify zones
- Tailscale API key: https://login.tailscale.com/login?next_url=%2Fadmin%%2Fsettings%2Fkeys
https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/
cp .env.example .env
Add the environment variables gathered in the previous steps.
- Prerequisites:
go
>= v1.21make
- Clone this repository
git clone https://github.com/aaanh/tailflare
- Go would hopefully install the needed dependencies on first run
- Run
make run