(
name: &str,
endpoint: &str,
remote: Option<&str>,
local: bool,
)
| 791 | } |
| 792 | |
| 793 | fn plaintext_gateway_metadata( |
| 794 | name: &str, |
| 795 | endpoint: &str, |
| 796 | remote: Option<&str>, |
| 797 | local: bool, |
| 798 | ) -> GatewayMetadata { |
| 799 | let (remote_host, resolved_host) = remote.map_or((None, None), |dest| { |
| 800 | let ssh_host = extract_host_from_ssh_destination(dest); |
| 801 | let resolved = resolve_ssh_hostname(&ssh_host); |
| 802 | (Some(dest.to_string()), Some(resolved)) |
| 803 | }); |
| 804 | |
| 805 | GatewayMetadata { |
| 806 | name: name.to_string(), |
| 807 | gateway_endpoint: endpoint.to_string(), |
| 808 | is_remote: plaintext_gateway_is_remote(endpoint, remote, local), |
| 809 | gateway_port: 0, |
| 810 | remote_host, |
| 811 | resolved_host, |
| 812 | auth_mode: Some("plaintext".to_string()), |
| 813 | ..Default::default() |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | fn gateway_select_with<F>( |
| 818 | name: Option<&str>, |
no test coverage detected