From 33565185daa5acabd632ddeff5e03049e5a120ba Mon Sep 17 00:00:00 2001 From: Rostislav Raykov Date: Tue, 21 Apr 2020 10:03:17 +0200 Subject: [PATCH 1/2] docs: Update readme with 0.3.0 API changes --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1f62359..4a1f315 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,12 @@ This is a simple CLI you can use to continuously update an A DNS record for a do ## Options ``` - -k, --key The auth key you need to generate in your Cloudflare profile + -t, --token The API token you need to generate in your Cloudflare profile -c, --cache Cache file for previously reported IP address (if skipped the IP will be reported on every execution) -f, --config Your TOML config file containing all the required options (email, auth_key, zone, domain) which you can use instead of passing the arguments to the command line -d, --domain The domain for which you want to report the current IP address - -e, --email Your Cloudflare login email -z, --zone The zone in which your domain is (usually that is your base domain name) ``` @@ -22,8 +21,7 @@ This is a simple CLI you can use to continuously update an A DNS record for a do You Can pass a path to a configuration file (`-f` or `--config`) instead of each option as a command line argument. The configuration should be a [TOML](https://github.com/toml-lang/toml) file and hold the same options. Here's a sample: ```TOML -email = "example@example.com" -auth_key = "secretkey" +api_token = "secretkey" domain = "example.example.com" zone = "example.com" ``` @@ -36,6 +34,6 @@ You need to do some preparatory work in Cloudflare. Firstly this assumes you're You need to add a type `A` DNS record for your domain. The `Name` field you should fill in with the name of the subdomain. If you don't want to use a subdomain just type `@` then the base domain will be used. Then change the `Proxy status` field to be not `Proxied` but `DNS only`. This will allow you to input `0.0.0.0` in the `IPv4 Address` field. Then click the save button. You might need to wait sometime before the DNS record propagates. -### API key +### API token -We need to authenticate ourselves in front of the Cloudflare API. To do so we need to an auth key to pass along as a password together with our login email. You can find the global API key in `My profile > API Tokens`. \ No newline at end of file +We need to authenticate ourselves in front of the Cloudflare API. To do so we need to an API token to pass along with every request. You can generate an API token to use specifically with this application on Cloudflare in `My profile > API Tokens > Create Token`. \ No newline at end of file From d88bb93cfeb0b2b267736ae21bcff684bebd827c Mon Sep 17 00:00:00 2001 From: Rostislav Raykov Date: Tue, 21 Apr 2020 10:04:56 +0200 Subject: [PATCH 2/2] chore: Bump up version number to 0.3.0 --- .vscode/launch.json | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ae08e82..760ab0e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,7 +2,7 @@ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.1", + "version": "0.3.0", "configurations": [ { "type": "lldb", diff --git a/Cargo.lock b/Cargo.lock index 8a783bf..d7ca1aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "cloudflare-ddns" -version = "0.2.1" +version = "0.3.0" dependencies = [ "anyhow 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index a32237a..9d405d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudflare-ddns" -version = "0.2.1" +version = "0.3.0" authors = ["Rostislav Raykov "] edition = "2018" description = "A simple CLI tool to use Cloudflare's free DDNS service"