(args: &[&str], proxy_index: usize)
| 308 | } |
| 309 | |
| 310 | fn parse_ssh_prefix_before_proxy(args: &[&str], proxy_index: usize) -> Option<bool> { |
| 311 | let mut current = 1; |
| 312 | let mut saw_no_command = false; |
| 313 | while current < proxy_index { |
| 314 | let arg = args[current]; |
| 315 | if arg == "-o" { |
| 316 | current += 2; |
| 317 | continue; |
| 318 | } |
| 319 | if arg == "-N" { |
| 320 | saw_no_command = true; |
| 321 | current += 1; |
| 322 | continue; |
| 323 | } |
| 324 | if arg.starts_with("-o") || matches!(arg, "-f" | "-T" | "-tt") { |
| 325 | current += 1; |
| 326 | continue; |
| 327 | } |
| 328 | if arg.starts_with("-v") { |
| 329 | current += 1; |
| 330 | continue; |
| 331 | } |
| 332 | return None; |
| 333 | } |
| 334 | Some(saw_no_command) |
| 335 | } |
| 336 | |
| 337 | fn outer_ssh_forward_matches(args: &[&str], port: u16, prefix_has_no_command: bool) -> bool { |
| 338 | let Some(forward_args) = args.strip_suffix(&["sandbox"]) else { |
no outgoing calls
no test coverage detected