Commit Graph

186 Commits

Author SHA1 Message Date
DaRK AnGeL
3c7072f4b6 Merge branch 'master' of https://github.com/masterwishx/cloudflare-ddns 2026-03-17 10:05:15 +02:00
DaRK AnGeL
3d796d470c Deduplicate IPs before DNS record update
Remove duplicate IPs before updating DNS records to ensure stable input.

Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
2026-03-17 10:04:20 +02:00
DaRK AnGeL
36bdbea568 Deduplicate IPs before DNS record update
Remove duplicate IPs before updating DNS records to ensure stable input.
2026-03-16 20:28:26 +02:00
DaRK AnGeL
6085ba0cc2 Add Host header to fetch_trace_ip function 2026-03-16 09:02:10 +02:00
Timothy Miller
560a3b7b28 Bump version to 2.0.2 2.0.2 2026-03-13 00:10:31 -04:00
Timothy Miller
1b3928865b Use literal IP trace URLs as primary
Primary trace endpoints now use literal IPs per address family to
guarantee correct address family selection. Fallback uses
api.cloudflare.com to work around WARP/Zero Trust interception. Rename
constants and update tests accordingly.
2026-03-13 00:04:08 -04:00
Timothy Miller
93d351d997 Use Cloudflare trace by default and validate IPs
Default IPv4 provider is now CloudflareTrace.
Primary uses api.cloudflare.com; fallbacks are literal IPs.
Build per-family HTTP clients by binding to 0.0.0.0/[::] so the trace
endpoint observes the requested address family. Add validate_detected_ip
to reject wrong-family or non-global addresses (loopback, link-local,
private, documentation ranges, etc). Update tests and legacy updater
URLs.
Default to Cloudflare trace and validate IPs

Use api.cloudflare.com as the primary trace endpoint (fallbacks
remain literal IPs) to avoid WARP/Zero Trust interception. Build
IP-family-specific HTTP clients by binding to the unspecified
address so the trace endpoint sees the correct family. Add
validate_detected_ip to reject non-global or wrong-family addresses
and expand tests. Bump crate version and tempfile dev-dependency.
2.0.1
2026-03-11 18:42:46 -04:00
Timothy Miller
e7772c0fe0 Change default IPv4 provider to ipify
Update README and tests to reflect new defaults

Bump actions/checkout to v6, replace linux/arm/v7 with
linux/ppc64le in the Docker build, and normalize tag quoting in the
GitHub workflow
2026-03-10 05:37:09 -04:00
Timothy Miller
33266ced63 Correct Docker image size in README 2026-03-10 05:11:56 -04:00
Timothy Miller
332d730da8 Highlight tiny static Docker image in README 2026-03-10 02:06:52 -04:00
Timothy Miller
a4ac4e1e1c Use scratch release image and optimize build
Narrow tokio features to rt-multi-thread, macros, time and signal.
Add release profile to reduce binary size:
opt-level = s, lto = true, codegen-units = 1, strip = true, panic =
abort
Update Cargo.lock to remove unused deps and adjust Dockerfile to copy
CA certs from builder and set ENTRYPOINT for the release image
Use scratch base image and optimize release build

Add linux/ppc64le support in CI and build script
Switch Docker release stage to scratch, copy CA certificates from the
builder and use an explicit ENTRYPOINT for the binary
Tighten Cargo release profile (opt-level="s", lto, codegen-units=1,
strip, panic="abort") and reduce Tokio features to shrink the binary
Update README to reflect image size and supported platforms
2026-03-10 02:04:30 -04:00
Timothy Miller
6cad2de74c Remove linux/arm/v7 platform from image workflow 2026-03-10 01:49:59 -04:00
Timothy Miller
fd0d2ea647 Add Docker Hub badges to README 2026-03-10 01:28:15 -04:00
Timothy Miller
b1a2fa7af3 Migrate cloudflare-ddns to Rust
Add Cargo.toml, Cargo.lock and a full src/ tree with modules and tests
Update Dockerfile to build a Rust release binary and simplify CI/publish
Remove legacy Python script, requirements.txt, and startup helper
Switch .gitignore to Rust artifacts; update Dependabot and workflows to
cargo
Add .env example, docker-compose env, and update README and VSCode
settings

Remove the old Python implementation and requirements; add a Rust
implementation with Cargo.toml/Cargo.lock and full src/ modules, tests,
and notifier/heartbeat support. Update Dockerfile, build/publish
scripts, dependabot and workflows, README, and provide env-based
docker-compose and .env examples.
2026-03-10 01:21:21 -04:00
Timothy Miller
f0d9510fff Merge pull request #117 from arulrajnet/env-support
[feature] Support for environmental substitution in config.json
2024-08-23 13:55:33 -04:00
Timothy Miller
4ea9ba5745 Merge pull request #151 from 4n4n4s/dependabot-github-actions
Update github-actions
2023-12-10 16:51:21 -05:00
Timothy Miller
9a295bbf91 Merge pull request #127 from adamantike/fix/copy-dependencies-from-stage
Reduce Docker image size by only copying pip installed dependencies
2023-10-12 02:15:43 -04:00
Timothy Miller
fecf30cd2a Merge pull request #139 from Suyun114/ttl-patch
Add TTL set to 1 (auto)
2023-10-12 02:10:52 -04:00
Timothy Miller
f7d1ff8687 Merge pull request #140 from Nevah5/master
Fixed example config for load balancing support in README.md
2023-10-12 02:10:10 -04:00
4n4n4s
fa398b83fc Update github-actions 2023-09-16 16:52:56 +02:00
Timothy Miller
9eb395031e Merge pull request #137 from timothymiller/dependabot/pip/requests-2.31.0
Bump requests from 2.28.2 to 2.31.0
2023-07-23 16:15:58 -04:00
Nevah5
a8a7ed1e5f Fixed example config for load balancing support in README.md 2023-06-04 20:34:14 +02:00
Suyun
060257fe12 Add TTL set to 1 (auto) 2023-06-01 19:35:04 +08:00
dependabot[bot]
4be08d8811 Bump requests from 2.28.2 to 2.31.0
Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.2...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 06:13:44 +00:00
Michael Manganiello
0ca623329a Reduce Docker image size by only copying pip installed dependencies
Currently, the multi-stage Docker build makes the `release` stage
inherit from `dependencies`, which will include any files created by the
`pip install` process in the final image.

By using `pip install --user` to make dependencies be installed in
`~/.local`, we can only copy those files into the final image, reducing
the image size:

```
cloudflare-ddns-fix-applied     latest            68427bd7c88d   3 minutes ago   54.6MB
cloudflare-ddns-master          latest            2675320b651d   8 minutes ago   65.9MB
```

A good resource going deeper on how this approach works can be found at
https://pythonspeed.com/articles/multi-stage-docker-python/, solution 1.
2023-02-22 10:26:02 -03:00
Arul
d3fe3940f9 addressing review comments 2023-02-21 06:53:01 +05:30
Arul
fa79547f9b Merge branch 'master' into env-support 2023-02-21 06:40:37 +05:30
Timothy Miller
6e92fc0d09 Fix load balancer errors 2023-02-15 19:28:08 -05:00
Timothy Miller
82b97f9cda Updated Load Balancing docs 2023-02-15 17:32:14 -05:00
Timothy Miller
190b90f769 Merge pull request #120 from DeeeeLAN/master
[feature] Add load balancer support
2023-02-15 17:27:03 -05:00
Timothy Miller
fff882be11 Revert config-example.json options for netif 2023-02-15 17:26:55 -05:00
Timothy Miller
713f0de5b0 Updated README.md 2023-02-15 17:15:03 -05:00
Timothy Miller
414ef99f96 Updated docker compose version to 3.9 2023-02-15 17:13:42 -05:00
Timothy Miller
ed65aff55f Revert netif changes for now 2023-02-15 17:05:00 -05:00
Timothy Miller
cb7b1804cf [feature] Extract IP address from netif credit: @comicchang 2023-02-15 16:14:22 -05:00
Timothy Miller
c135a7d343 Merge pull request #121 from davide125/systemd
Add systemd service and timer
2023-02-15 15:39:26 -05:00
Timothy Miller
af347f89b9 Update interpreter of shebang to python3 2023-02-15 15:37:06 -05:00
Timothy Miller
9824815e12 Git history folder added to gitignore 2023-02-15 15:30:36 -05:00
Timothy Miller
0dbd2f7c2b Added dependabot 2023-02-15 15:28:58 -05:00
Timothy Miller
e913d94eb8 Fix wildcard subdomain support 2023-02-15 15:22:06 -05:00
Timothy Miller
83fa74831e Updated README.md 2023-02-15 15:17:08 -05:00
Timothy Miller
f22ec89f3e Updated README.md 2023-02-15 15:15:23 -05:00
Timothy Miller
bd3f4a94cb Updated README.md 2023-02-15 15:05:59 -05:00
Timothy Miller
7212161f7b Updated README.md 2023-02-15 15:01:28 -05:00
Timothy Miller
2ad7e57d65 Added support for secondary IP checks if primary fails (Fixes #111)
Updated requests module version
2023-02-15 14:07:17 -05:00
Timothy Miller
5c909e25cd Updated README.md 2023-02-15 13:25:07 -05:00
Davide Cavalca
2c2e929d17 Add systemd service and timer 2023-01-29 15:28:11 -08:00
Dillan Mills
d92976993d Add load balancer slupport 2023-01-27 15:08:10 -07:00
Arul
a1fa3b9714 support for environmental substitution in config.json using python Template
refer comment in #35
2022-11-13 21:37:44 +05:30
Timothy Miller
7e6d74f1f6 Onboarding experience improved 2022-10-30 17:54:32 -04:00