feat(client): add HttpConnector::set_local_addresses to set both IPv6 and IPv4 local addrs (#2172)
Currently HttpConnector::set_local_address method accepts a single argument. Server might not support IPv6 or IPv4. Therefore, the only solution at the moment is to manually perform DNS resolution and pick appropriate local address family. This is inefficient, as leads to 2 DNS lookups per request. This commit allows specifying both IPv4 and IPv6, so connector can decide which one to use based on DNS resolution results.
This commit is contained in:
@@ -55,6 +55,9 @@ tokio-util = { version = "0.3", features = ["codec"] }
|
||||
tower-util = "0.3"
|
||||
url = "1.0"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dev-dependencies]
|
||||
pnet = "0.25.0"
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"runtime",
|
||||
|
||||
Reference in New Issue
Block a user