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

Function is_gateway_host_byte

crates/openshell-core/src/forward.rs:837–841  ·  view source on GitHub ↗
(b: u8)

Source from the content-addressed store, hash-verified

835}
836
837fn is_gateway_host_byte(b: u8) -> bool {
838 // DNS hostname (alphanumeric + `.-`), IPv4, or bracketed IPv6 (`[::1]`).
839 // Rejects Unicode — callers must Punycode-encode IDN hosts before emitting.
840 b.is_ascii_alphanumeric() || matches!(b, b'.' | b'-' | b':' | b'[' | b']')
841}
842
843fn is_fingerprint_byte(b: u8) -> bool {
844 b.is_ascii_alphanumeric() || matches!(b, b':' | b'+' | b'/' | b'=' | b'-')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected