MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / parse_ssh_prefix_before_proxy

Function parse_ssh_prefix_before_proxy

crates/openshell-core/src/forward.rs:310–335  ·  view source on GitHub ↗
(args: &[&str], proxy_index: usize)

Source from the content-addressed store, hash-verified

308}
309
310fn 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
337fn outer_ssh_forward_matches(args: &[&str], port: u16, prefix_has_no_command: bool) -> bool {
338 let Some(forward_args) = args.strip_suffix(&["sandbox"]) else {

Callers 1

find_proxy_command_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected