An open API service indexing awesome lists of open source software.

https://github.com/woshiluo/cloudflare-ddns

Yet another ddns client over cloudflare api written by rust.
https://github.com/woshiluo/cloudflare-ddns

cloudflare ddns rust

Last synced: 12 months ago
JSON representation

Yet another ddns client over cloudflare api written by rust.

Awesome Lists containing this project

README

          

# cloudflare-ddns

Yet another ddns client over cloudflare api written by rust.

# How to build?

You should install rust toolchins like https://rustup.rs/.

```
git clone https://github.com/woshiluo/cloudflare-ddns
cd ./cloudflare-ddns
cargo build --release
```

Then the binary will be plcaed in `target/release/cloudflare-ddns`

# How to use?

You should provide four arguments.

```
--token
--zone
--domain
--ipserver
```

- `token`: Your cloudflare api token
- `zone`: The zone which your domain in
- `domain`: Your domain
- `ipserver`: A server address which should response like `{ "ip": "xxx.xxx.xxx.xxx" }`.

# How it works?

The program will query ipserver and domain's ip at start. Then

1. If the ipserver returns ip is equal with domain's ip, do nothing.
2. If not, try update with cloudflare api.
3. Wait utill domain's ttl expired.
4. Return 1.