Compare commits
No commits in common. "fc2361614e617c39b975aa0d53babfb975790c39" and "ae5a5b84b9e7731a849a31c309895aa5365c843c" have entirely different histories.
fc2361614e
...
ae5a5b84b9
3 changed files with 4 additions and 43 deletions
|
@ -30,8 +30,5 @@ strip = "symbols"
|
|||
lto = "thin"
|
||||
codegen-units = 1
|
||||
|
||||
[package.metadata.deb]
|
||||
name = "cloudflare-ddns-rs"
|
||||
|
||||
[package.metadata.deb.systemd-units]
|
||||
unit-scripts = "systemd/"
|
||||
|
|
24
README.md
24
README.md
|
@ -29,15 +29,8 @@ different IP address.
|
|||
|
||||
## Installation
|
||||
|
||||
First, create an initial file at `/etc/cloudflare-ddns.toml`. Set the permissions
|
||||
so that it is readable and writable by `root` only:
|
||||
|
||||
```
|
||||
# sudo touch /etc/cloudflare-ddns.toml
|
||||
# chmod 600 /etc/cloudflare-ddns.toml
|
||||
```
|
||||
|
||||
Populate it with the following:
|
||||
First, create an initial file at `/etc/cloudflare-ddns.toml`. Populate it with
|
||||
the following:
|
||||
|
||||
```toml
|
||||
[account]
|
||||
|
@ -136,16 +129,3 @@ successful, installation is complete.
|
|||
A `.deb` package is created via [`cargo-deb`].
|
||||
|
||||
[`cargo-deb`]: https://github.com/kornelski/cargo-deb
|
||||
|
||||
## Security
|
||||
|
||||
This project attempts to take security seriously. Please note the following
|
||||
hardening notes applied by default.
|
||||
|
||||
### Hardened `systemd` service configuration
|
||||
|
||||
In principle, this service needs very little access to a host, and needs access
|
||||
to the internet. As a result, the default `systemd` service configuration
|
||||
aggressively restricts the capabilities of the binary to a minimum set of
|
||||
features, namely access to the internet and dependency to do so. If you believe
|
||||
more directives could be provided, please create a PR.
|
18
src/main.rs
18
src/main.rs
|
@ -264,22 +264,6 @@ async fn handle_run(conf: Config, run: Run) -> Result<()> {
|
|||
cache_file.0.insert(record.id, addr);
|
||||
continue;
|
||||
}
|
||||
|
||||
for message in resp.messages {
|
||||
info!(
|
||||
code = message.code,
|
||||
message = message.message,
|
||||
"Cloudflare API returned message"
|
||||
);
|
||||
}
|
||||
|
||||
for error in resp.errors {
|
||||
warn!(
|
||||
code = error.code,
|
||||
message = error.message,
|
||||
"Cloudflare API returned error"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -328,7 +312,7 @@ fn ip_cache_path(cache_dir: Option<PathBuf>) -> Result<PathBuf> {
|
|||
#[derive(Deserialize, Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct Message {
|
||||
code: u32,
|
||||
code: u16,
|
||||
message: String,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue