nrdxp / cfdyndns Goto Github PK
View Code? Open in Web Editor NEWCloudFlare Dynamic DNS Client
License: MIT License
CloudFlare Dynamic DNS Client
License: MIT License
I am trying to run this service on NixOS but I am facing the following error with both the lastest tagged and master commit.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, url: "https://api.cloudflare.com/client/v4/zones", source: hyper::Error(Connect, Ssl(Error { code: ErrorCode(5), cause: Some(Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })) }, X509VerifyResult { code: 0, error: "ok" })) }', src/main.rs:59:10
stack backtrace:
0: 0x560ea9ef40fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf2ea00d5f3b53d9f
1: 0x560ea9f230ae - core::fmt::write::ha076a7e65c6b1874
2: 0x560ea9f034a1 - std::io::Write::write_fmt::h9630bb3b0fe886f5
3: 0x560ea9f0b575 - std::panicking::default_hook::{{closure}}::h64163197f96398c1
4: 0x560ea9f0b1d2 - std::panicking::default_hook::h92625161492e6b48
5: 0x560ea9f0ba91 - std::panicking::rust_panic_with_hook::hfdd7d6bb6788c6c2
6: 0x560ea9ef4437 - std::panicking::begin_panic_handler::{{closure}}::he81a60a7ef84ad4a
7: 0x560ea9ef4214 - std::sys_common::backtrace::__rust_end_short_backtrace::h62801bf9780239e6
8: 0x560ea9f0b742 - rust_begin_unwind
9: 0x560ea9cd3733 - core::panicking::panic_fmt::hfd221b9f37504b4a
10: 0x560ea9cd3873 - core::result::unwrap_failed::h7a3045feac200afb
11: 0x560ea9cf052b - cfdyndns::cloudflare_api::h2c8c2ef748c7b9e7
12: 0x560ea9cf0cfb - cfdyndns::main::h890b4ef85ecd2099
13: 0x560ea9cdbfe3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h7b2f491300ee378a
14: 0x560ea9ceb8a9 - std::rt::lang_start::{{closure}}::hec8c72fe99e36f09
15: 0x560ea9efc345 - std::rt::lang_start_internal::h09bcc9fffd987f14
16: 0x560ea9cf2112 - main
17: 0x7fa9f902924e - __libc_start_call_main
18: 0x7fa9f9029309 - __libc_start_main_alias_1
19: 0x560ea9cd3925 - _start
20: 0x0 - <unknown>
Seems like a SSL error, but not sure since I don't really master rust
Hi,
Thanks for releasing new version tag to help me with NixOS/nixpkgs#75865. But in v0.0.2, the version in Cargo.toml is updated but not in Cargo.lock, could you bump the version again.
Thank you very much
May 28 21:05:05 bro systemd[1]: Started CloudFlare Dynamic DNS Client.
░░ Subject: A start job for unit cfdyndns.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit cfdyndns.service has finished successfully.
░░
░░ The job identifier is 1078646.
May 28 21:05:06 bro cfdyndns-start[212683]: INFO cfdyndns::ip > XXX.XXX.XXX.XXX
May 28 21:05:07 bro cfdyndns-start[212683]: Error: error decoding response body: missing field `multiple_railguns_allowed` at line 1 column 578
May 28 21:05:07 bro systemd[1]: cfdyndns.service: Main process exited, code=exited, status=1/FAILURE
Seems like a change in Cloudflare's API?
Config: https://github.com/diogotcorreia/dotfiles/blob/bf6f0ee0fbf956d0983308f7270d7b7698e8d57d/hosts/bro/default.nix#L76-L80
Keep in mind that I'm using a patch from #56 as well.
cc @nrdxp
my systemctl status
:
× cfdyndns.service - CloudFlare Dynamic DNS Client
Loaded: loaded (/etc/systemd/system/cfdyndns.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sat 2023-11-11 08:35:01 UTC; 1min 34s ago
Duration: 1.137s
TriggeredBy: ● cfdyndns.timer
Process: 2985448 ExecStart=/nix/store/fgqyp2skdzka08p1d9n8cj5hkqhlg7ag-unit-script-cfdyndns-start/bin/cfdyndns-start (code=exited, status=1/FAILURE)
Main PID: 2985448 (code=exited, status=1/FAILURE)
IP: 5.1K in, 1.8K out
CPU: 139ms
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: INFO cfdyndns::ip > 123.123.123.123
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: INFO cfdyndns::ip > 1234:ab12:1234:ab12:1234:ab12:1234:ab12
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: Error: HTTP 400 Bad Request
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: 6003: Invalid request headers ({"error_chain": Array [Object {"code": Number(6111), "message": String("Invalid format for Authorization header")}]})
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: success: false
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: result: null
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: messages: []
Nov 11 08:35:01 immortal systemd[1]: cfdyndns.service: Main process exited, code=exited, status=1/FAILURE
Nov 11 08:35:01 immortal systemd[1]: cfdyndns.service: Failed with result 'exit-code'.
Nov 11 08:35:01 immortal systemd[1]: cfdyndns.service: Consumed 139ms CPU time, received 5.0K IP traffic, sent 1.7K IP traffic.
my config:
{ pkgs
, config
, ...
}: {
sops.secrets."cloudflare/cfdyndns" = { };
services.cfdyndns = {
enable = true;
records = [ "domain.one" "domain.two" ];
apiTokenFile = config.sops.secrets."cloudflare/cfdyndns".path;
};
}
It'd be quite useful to set my dynamic dns to my ipv6 address to avoid NAT issues and/or port forwarding.
Hey 👋,
I have been using cfdyndns for a while on my NixOS systems and it worked without any issues 👍.
Recently, I added a CAA
record to my zone using the CloudFlare WebUI. Since I added this record of type CAA
cfdyndns fails with an error:
Feb 22 14:25:00 MY-HOSTNAME cfdyndns-start[1661398]: INFO cfdyndns::ip > 93.XXX.XXX.XXX
Feb 22 14:25:00 MY-HOSTNAME cfdyndns-start[1661398]: INFO cfdyndns::ip > 2001:a61:YYYY:YYYY:YYYY:YYYY:YYYY:YYYY
Feb 22 14:25:03 MY-HOSTNAME cfdyndns-start[1661398]: Error: error decoding response body: unknown variant `CAA`, expected one of `A`, `AAAA`, `CNAME`, `NS`, `MX`, `TXT`, `SRV` at line 1 column 3357
Feb 22 14:25:03 MY-HOSTNAME systemd[1]: cfdyndns.service: Main process exited, code=exited, status=1/FAILURE
I redacted some fields for privacy reasons.
A quick search on the source code lead me to
Lines 72 to 83 in bd02dd0
I want to have private IPs with nice hostnames. So rather than using a DNS server to get the external ip, allow for deriving the "external IP" from a user-specified NIC.
(Scenario, I want a subdomain entry that routes to my machine on a private network but using public DNS because it's easier)
I am using one subdomain for ssh access. Unfortunately cfdyndns enable proxy after IP change.
There is even a PR to fix that but seem to be dead: #7
Hi, it seems like something is broken... I'm using NIXOS 23.05 with 23.11 channel
warning: the following units failed: cfdyndns.service
× cfdyndns.service - CloudFlare Dynamic DNS Client
Loaded: loaded (/etc/systemd/system/cfdyndns.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-01-16 17:01:39 CET; 1s ago
Duration: 452ms
TriggeredBy: ● cfdyndns.timer
Process: 13145 ExecStart=/nix/store/7pdq2618p2fh703z3wz8ib30mbl2kiyq-unit-script-cfdyndns-start/bin/cfdyndns-start (code=exited, status=1/FAILURE)
Main PID: 13145 (code=exited, status=1/FAILURE)
IP: 562B in, 452B out
CPU: 118msjanv. 16 17:01:38 jerserv systemd[1]: Started CloudFlare Dynamic DNS Client.
janv. 16 17:01:38 jerserv cfdyndns-start[13163]: INFO cfdyndns::ip > 82.66.158.3
janv. 16 17:01:38 jerserv cfdyndns-start[13163]: INFO cfdyndns::ip > 2a01:e0a:1b2:cd70:f3de:71ed:f9eb:6403
janv. 16 17:01:39 jerserv cfdyndns-start[13163]: Error: builder error: failed to parse header value
small failure on update of my nixos system.
Not sure why, just reporting in case it's helpful.
version 0.2.0 via nix
/nix/store/h9xdjz757ih538p536xfsnk0jb69c9sm-cfdyndns-0.2.0/bin/cfdyndns \
--records "subdomain.domain.com" \
--email "xxxxxxxxxxx" \
--key "yyyyyyyyyyy"
stuck forever, no logs even with --verbose
It would be nice to to use users API keys and not the global key.
Hi, @nrdxp,
GitHub is being picky.
nrdxp already has a repository in the colemickens/cfdyndns network
Want to delete your fork and I'll do the transfer again?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.