Documentation
¶
Overview ¶
Package tunneltype names what a peer carries over its tunnel.
The hub serves HTTP and HTTPS today: both are an http.Handler on the peer, HTTPS meaning the payload is TLS end to end (the peer runs a TLS server inside the tunnel and the hub dials it with a matching client config), so it stays encrypted even where the outer hop is terminated at a proxy.
TCP and TLS name raw byte streams. The hub does not carry them yet; they exist here so a peer asking for one is refused by name rather than attaching and failing later in a way nobody can read.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type string
Type is what travels through a tunnel.
const ( // HTTP is an http.Handler on the peer, plaintext inside the tunnel. HTTP Type = "http" // HTTPS is the same, with the payload encrypted end to end. HTTPS Type = "https" // TCP is a raw byte stream. Reserved: not carried yet. TCP Type = "tcp" // TLS is a raw byte stream carrying TLS. Reserved: not carried yet. TLS Type = "tls" )
func FromProto ¶
func FromProto(t holtv1.TunnelType) Type
FromProto reads the wire enum. A peer older than the field sends UNSPECIFIED, which is HTTP: that is all any of them could carry.