Skip to main content

normalize_addr

Function normalize_addr 

Source
pub fn normalize_addr(addr: &str, default_host: &str) -> Result<String, String>
Expand description

Expand a proxy address to incus’ proto:host:port form.

Accepts 5173, HOST:5173, 5173/udp, tcp:5173, and full tcp:HOST:PORT / udp:HOST:PORT / unix:PATH. The protocol defaults to tcp and the host to default_host. IPv6 hosts go in brackets ([::1]:5173). The port may be a range or list as incus allows (8000-8010, 80,443).