diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-03 16:35:13 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-03 16:35:13 +0200 |
commit | fcb5935d02a99af6b175890a89956c9c65f0011a (patch) | |
tree | 9474149c7eb16f7c90592cf816be64608f9e682f | |
parent | 19a548879e46387b7644c2762905d76963448a6a (diff) |
hijack dns resolution of ipv4.tunnelbroker.net
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 1d67436..cd316ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -236,9 +236,15 @@ fn configure_local( *local.lock().unwrap() = ip_config.addr; for i in 0..3 { - // This can resolve DNS just fine as long as dnsd is running - // and has an internet connection. - match reqwest::blocking::get(&config.updt) { + match reqwest::blocking::Client::builder() + .resolve( + "ipv4.tunnelbroker.net", + SocketAddrV4::new(Ipv4Addr::new(64, 62, 200, 2), 443).into(), + ) + .build()? + .get(&config.updt) + .send() + { Ok(v) => { v.error_for_status()?; } |