Skip to content

GabhenDM/rustflare-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rustflare DNS

!! This is WIP !!

This is a simple CLI tool to dynamically update Cloudflare DNS with an A Record from your Public IP (using https://api.ipify.org).

Usage

Building from Source

# Clone the repository
git clone https://github.com/GabhenDM/rustflare-dns.git
cd rustflare-dns

# Build the project
cargo build --release

# Set environment variables
export RUSTFLARE_ZONE_ID=<ZONE_ID>
export RUSTFLARE_API_KEY=<API_KEY>
export RUSTFLARE_RECORD_NAME=<RECORD_NAME>
export RUSTFLARE_PROXIED=true|false

# Run the tool
./target/release/rustflare-dns

Docker

You can also run this tool using Docker. Build the Docker image and run the container as follows:

# Run the Docker container
docker run --rm \
    -e RUSTFLARE_ZONE_ID=<ZONE_ID> \
    -e RUSTFLARE_API_KEY=<API_KEY> \
    -e RUSTFLARE_RECORD_NAME=<RECORD_NAME> \
    -e RUSTFLARE_PROXIED=true|false \
    robijndm/rustflare-dns

Replace <ZONE_ID>, <API_KEY>, and <RECORD_NAME> with your Cloudflare credentials and desired DNS record information.

Environment Variables

  • RUSTFLARE_ZONE_ID: The Zone ID of your Cloudflare domain.
  • RUSTFLARE_API_TOKEN: Your Cloudflare API token with DNS edit permissions.
  • RUSTFLARE_RECORD_NAME: The DNS record name to update (e.g., example.com) RUSTFLARE_PROXIED: Set to true if you want the DNS record to be proxied through Cloudflare, or false if you want it to bypass Cloudflare.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors