close to final of fake ip resolving

This commit is contained in:
2026-03-08 00:11:52 +07:00
parent b1cc4c14f4
commit 8bad1b0162
8 changed files with 91 additions and 42 deletions
+8 -2
View File
@@ -24,17 +24,23 @@ async fn main() {
.expect("Failed to initialize TUN device");
tun_device.setup_routing();
tun_device.setup_dns_redirection();
info!("TUN interface is UP: 10.0.0.1/24");
let config = Config::new(smoltcp::wire::HardwareAddress::Ip);
let mut caps = DeviceCapabilities::default();
let remote_address: String = "127.0.0.1:4443".into();
let remote_address: String = "172.18.151.121:4443".into();
caps.max_transmission_unit = 1500;
caps.medium = smoltcp::phy::Medium::Ip;
let network = Network::new(8080, ConnectionRole::Client, Some(remote_address));
let network = Network::new(
"0.0.0.0".into(),
8080,
ConnectionRole::Client,
Some(remote_address),
);
let proxy_ip = network.get_self_local_address();