aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-09-18 19:43:10 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-09-18 19:43:10 +0200
commit792056f10e444f9e6c50ed4ce5a4ca4f91933fb1 (patch)
tree5e415a147eb3544b488fedb4894d66be311ee307
parent9145b504b3179e723a66ede952f8983beebfddab (diff)
Revert "introduce crate feature for localhost DNS resolution"
This reverts commit 9145b504b3179e723a66ede952f8983beebfddab.
-rw-r--r--Cargo.toml4
-rw-r--r--README.md6
-rw-r--r--src/main.rs24
3 files changed, 6 insertions, 28 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 5950fd7..6a536f2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,3 @@ linkaddrs = { version = "0.1.0", git = "https://github.com/HimbeerserverDE/linka
serde = "1.0"
serde_json = { version = "1.0", features = ["std"] }
trust-dns-resolver = "0.23.0"
-
-[features]
-default = ["localhost_dns"]
-localhost_dns = []
diff --git a/README.md b/README.md
index 12bf5ed..1e4de42 100644
--- a/README.md
+++ b/README.md
@@ -15,12 +15,6 @@ dyndns [config]
where config is the config path (defaults to /data/dyndns.conf).
-# Crate features
-
-This crate provides the `localhost_dns` feature, which is enabled by default.
-If enabled, `localhost_dns` causes `[::1]:53` to be used for resolution
-of the API endpoint hostnames. Otherwise the system configuration is used.
-
# Configuration
The configuration file is simply a JSON file.
diff --git a/src/main.rs b/src/main.rs
index c7a9e50..db297d6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -405,12 +405,8 @@ fn push_addr4(config: ConfigIpv4, rx: &mpsc::Receiver<Ipv4Net>) -> Result<()> {
#[cfg(debug_assertions)]
let endpoint = Endpoint::Sandbox;
- let clt = if cfg!(localhost_dns) {
- let addr = resolve_endpoint(&endpoint)?;
- Client::login_addr(endpoint, addr, user, pass)
- } else {
- Client::login(endpoint, user, pass)
- }?;
+ let addr = resolve_endpoint(&endpoint)?;
+ let clt = Client::login_addr(endpoint, addr, user, pass)?;
clt.call(RecordUpdate {
ids: config.records.clone(),
@@ -443,12 +439,8 @@ fn push_addr6(config: ConfigIpv6, rx: &mpsc::Receiver<Ipv6Net>) -> Result<()> {
#[cfg(debug_assertions)]
let endpoint = Endpoint::Sandbox;
- let clt = if cfg!(localhost_dns) {
- let addr = resolve_endpoint(&endpoint)?;
- Client::login_addr(endpoint, addr, user, pass)
- } else {
- Client::login(endpoint, user, pass)
- }?;
+ let addr = resolve_endpoint(&endpoint)?;
+ let clt = Client::login_addr(endpoint, addr, user, pass)?;
clt.call(RecordUpdate {
ids: config.records.clone(),
@@ -481,12 +473,8 @@ fn push_net6(config: ConfigNet6, rx: &mpsc::Receiver<Ipv6Net>) -> Result<()> {
#[cfg(debug_assertions)]
let endpoint = Endpoint::Sandbox;
- let clt = if cfg!(localhost_dns) {
- let addr = resolve_endpoint(&endpoint)?;
- Client::login_addr(endpoint, addr, user, pass)
- } else {
- Client::login(endpoint, user, pass)
- }?;
+ let addr = resolve_endpoint(&endpoint)?;
+ let clt = Client::login_addr(endpoint, addr, user, pass)?;
for id in &config.records {
let info: RecordInfoResponse = clt.call(RecordInfoCall {