Skip to main content

Module tunnel

Module tunnel 

Source
Expand description

Reachability: making a local server reachable from the internet.

shell-tunnel binds a local port, so behind NAT it is unreachable without port forwarding, a VPN, or a tunnel. This module owns the tunnel side of that problem: it supervises an external tunnel client and reports the public URL it allocates.

Failures here are never silent. A requested tunnel that cannot be established is an error, not a quiet fallback to local-only listening — the caller asked to be reachable, and pretending otherwise is the worst outcome.

Re-exports§

pub use spawned::Cloudflared;
pub use spawned::CustomCommand;
pub use spawned::TunnelProvider;

Modules§

spawned
Tunnel providers that run as an external process.

Structs§

TunnelHandle
A running tunnel process and the public URL it allocated.

Constants§

URL_TIMEOUT
How long to wait for a provider to report its public URL before giving up.

Functions§

start
Start provider against local and wait for it to publish a URL.