Resolve the bind address to a connectable host. Wildcard binds (`0.0.0.0`, `::`, empty) are "any-address" listeners, not valid connect targets, so they map to the matching loopback. Specific addresses are probed as-is.
(spec: &ForwardSpec)
| 482 | /// `::`, empty) are "any-address" listeners, not valid connect targets, so they |
| 483 | /// map to the matching loopback. Specific addresses are probed as-is. |
| 484 | fn forward_probe_host(spec: &ForwardSpec) -> &str { |
| 485 | match spec.bind_addr.as_str() { |
| 486 | "" | "0.0.0.0" => "127.0.0.1", |
| 487 | "::" => "::1", |
| 488 | host => host, |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | /// Best-effort cleanup for the SSH child this process spawned. |
| 493 | fn terminate_owned_forward_child(child: &mut Child) { |
no test coverage detected