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

Method access_url

crates/openshell-core/src/forward.rs:588–595  ·  view source on GitHub ↗

A human-readable URL for the forwarded port.

(&self)

Source from the content-addressed store, hash-verified

586
587 /// A human-readable URL for the forwarded port.
588 pub fn access_url(&self) -> String {
589 let host = if self.bind_addr == "0.0.0.0" || self.bind_addr == "::" {
590 "localhost"
591 } else {
592 &self.bind_addr
593 };
594 format!("http://{host}:{}/", self.port)
595 }
596}
597
598impl std::fmt::Display for ForwardSpec {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected