diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-09-18 20:02:34 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-09-18 20:02:34 +0200 |
commit | 468d4e5f72f36bbf7f073a9214440a18e235a67a (patch) | |
tree | 071b5a02b40338c11c659016fabecc09b37cbc9b | |
parent | 858023eac91f4c1a7dd94bc8d4dd6a6f649a99c4 (diff) |
resolve using quad9 for now
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/main.rs | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -6,8 +6,8 @@ This client uses the official XML-RPC API instead of the DynDNS API. As a result there is no limit on the number of DynDNS records. It only works if you're using INWX's own nameservers for your zone. -Also it's required to have a DNS forwarder running on localhost port 53 -(IPv6 is required). +Also the Quad9 resolver `2620:fe::fe` must be reachable over IPv6 on port 53, +though this can easily be changed in the code. Configurability is planned. # Usage diff --git a/src/main.rs b/src/main.rs index db297d6..1442c60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -518,7 +518,7 @@ fn push_net6(config: ConfigNet6, rx: &mpsc::Receiver<Ipv6Net>) -> Result<()> { fn resolve_endpoint(endpoint: &Endpoint) -> Result<SocketAddr> { for i in 0..MAX_DNS_ATTEMPTS { - match resolve_loopback(endpoint.domain()) { + match resolve_quad9(endpoint.domain()) { Ok(ip_addr) => return Ok((ip_addr, 443).into()), Err(e) => { if i >= MAX_DNS_ATTEMPTS - 1 { @@ -535,11 +535,11 @@ fn resolve_endpoint(endpoint: &Endpoint) -> Result<SocketAddr> { unreachable!() } -fn resolve_loopback(hostname: &str) -> Result<IpAddr> { +fn resolve_quad9(hostname: &str) -> Result<IpAddr> { let mut cfg = ResolverConfig::new(); cfg.add_name_server(NameServerConfig::new( - SocketAddr::new(Ipv6Addr::LOCALHOST.into(), 53), + "[2620:fe::fe]:53".parse()?, Protocol::Udp, )); |