mirror of
https://github.com/dndx/phantun.git
synced 2025-01-31 12:19:30 +08:00
fix(client) disable AAAA resolve, since tokio-tun does not yet have IPv6
support. See: https://github.com/yaa110/tokio-tun/pull/8
This commit is contained in:
parent
7db7164193
commit
cb9dd3e931
@ -99,12 +99,12 @@ async fn main() {
|
|||||||
let remote_addr = tokio::net::lookup_host(matches.value_of("remote").unwrap())
|
let remote_addr = tokio::net::lookup_host(matches.value_of("remote").unwrap())
|
||||||
.await
|
.await
|
||||||
.expect("bad remote address or host")
|
.expect("bad remote address or host")
|
||||||
.next()
|
.find(|addr| addr.is_ipv4())
|
||||||
.expect("unable to resolve remote host name");
|
.expect("unable to resolve remote host name or no valid A record was returned");
|
||||||
let remote_addr = if let SocketAddr::V4(addr) = remote_addr {
|
let remote_addr = if let SocketAddr::V4(addr) = remote_addr {
|
||||||
addr
|
addr
|
||||||
} else {
|
} else {
|
||||||
panic!("only IPv4 remote address is supported");
|
unreachable!();
|
||||||
};
|
};
|
||||||
info!("Remote address is: {}", remote_addr);
|
info!("Remote address is: {}", remote_addr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user