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.
- Host: GitHub
- URL: https://github.com/woshiluo/cloudflare-ddns
- Owner: woshiluo
- License: gpl-3.0
- Created: 2022-10-31T08:40:14.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-02T02:47:56.000Z (about 1 year ago)
- Last Synced: 2025-02-02T03:26:49.185Z (about 1 year ago)
- Topics: cloudflare, ddns, rust
- Language: Rust
- Homepage:
- Size: 64.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.