From 2ec91d6d1b5f73a5024cd2173188a1edaf4fa40f Mon Sep 17 00:00:00 2001 From: shellrow <81893184+shellrow@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:54:19 +0900 Subject: [PATCH] Change dst socket address --- src/gateway.rs | 2 +- src/interface.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gateway.rs b/src/gateway.rs index 452164a..7a14981 100644 --- a/src/gateway.rs +++ b/src/gateway.rs @@ -60,7 +60,7 @@ fn send_udp_packet(){ Ok(s) => s, Err(e) => panic!("Error happened {}", e), }; - let dest: &str = "8.8.8.8:80"; + let dest: &str = "1.1.1.1:80"; socket.set_ttl(1).unwrap(); socket.send_to(&buf, dest).unwrap(); } diff --git a/src/interface.rs b/src/interface.rs index 7b84cba..cd48ed6 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -98,7 +98,7 @@ fn get_local_ipaddr() -> Option { Err(_) => return None, }; - match socket.connect("8.8.8.8:80") { + match socket.connect("1.1.1.1:80") { Ok(()) => (), Err(_) => return None, };