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

Function is_host_gateway_alias

crates/openshell-supervisor-network/src/proxy.rs:2253–2258  ·  view source on GitHub ↗

Returns `true` if `host` is one of the well-known driver-injected aliases for the host machine (e.g. `host.openshell.internal`).

(host: &str)

Source from the content-addressed store, hash-verified

2251/// Returns `true` if `host` is one of the well-known driver-injected aliases
2252/// for the host machine (e.g. `host.openshell.internal`).
2253fn is_host_gateway_alias(host: &str) -> bool {
2254 let h = normalize_host_lookup_key(host);
2255 HOST_GATEWAY_ALIASES
2256 .iter()
2257 .any(|alias| alias.eq_ignore_ascii_case(h))
2258}
2259
2260/// Returns `true` if `ip` is a known cloud instance metadata endpoint that
2261/// must never be exempted from SSRF blocking.

Callers 2

handle_tcp_connectionFunction · 0.85
handle_forward_proxyFunction · 0.85

Calls 1

Tested by

no test coverage detected