Detects your external IP address and updates a DNS record in Cloudflare.
From source: go get -u github.com/trapped/dynflare
Docker: docker run trapped/dynflare --help
Both environment variables and CLI flags are supported.
CLOUDFLARE_EMAILor-cloudflare-email: Cloudflare email used for API authenticationCLOUDFLARE_API_KEYor-cloudflare-api-key: Cloudflare API keyRECORDSor-r: multiple values supported; DNS records in the<provider>:<zone>:<type>:<name>format; if using the environment variable, join records with,(comma)-p: pretty-print all DNS records in a tab-separated table-dry: fake the actual DNS update
After setting everything up, you should be able to just run ./dynflare; depending on your use-case, you might want to set up a cronjob or a Kubernetes CronJob.
- IPify
- MyIP
- More public services (planned)
- Self-connect using ngrok (planned)
- Fetch from multiple sources and pick most seen
IP providers must implement the Provider interface:
type Provider interface {
Name() string
Fetch() (string, error)
}Contributions are welcome! Just submit a pull request.