Cloudflare is a popular DNS and CDN service provider. Being so, it lacks some basic functions like separate API keys for domains. So to mitigate the risk of putting your Global API Key everywhere on untrusted servers, I wrote a simple proxy for Cloudflare API with Rust and

Usage is simple: First clone the repo. Install Rust using rustup and compile. Install and setup PostgreSQL. Edit the .env file to provide DB information to the system and diesel setup. And now you are good to go!

Then create a user, a site and give the user privilege:

cargo run --bin new_user

cargo run --bin new_site

cargo run --bin new_priv

And run the web app with:


To call the API, simply use curl:

curl --verbose  --header "Content-Type: application/json" \
  --request POST \
  --data '{"user":"<USER>","key":"<API_KEY>","zone":"","rec":"","rectype":"A", "value":""}' \

Hope it can be useful for you :)