diff options
-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, )); |