Via Syntax

© R.A.Sol

A via string identifies a transport endpoint.

Grammar

Full form:

scheme+host[:port]

Bare form (auto-negotiate transport):

host[:port]

Hostless form (used in HELLO Transport headers where host is already known):

scheme[:port]

Unix domain socket:

unix+<absolute-path>

Schemes

Scheme Default port Transport
tcp 4777 TCP plaintext
quib 4776 QUIB encrypted (033)
ws 4778 WebSocket
udp 4777 UDP datagram (stateless)
auto 4777 Auto-negotiate (equivalent to bare form)

Host

Host is a hostname, IPv4 address, or bracketed IPv6 address.

IPv6 bracket form: [::1] or [::1]:port.

Port

Port is optional. When omitted, the scheme default applies. Bare form defaults to 4777.

Hostless Resolution

Hostless forms appear in HELLO Transport headers. The client fills in the host from its existing connection. Examples:

Display Form

The canonical display form is:

Examples

Input Scheme Host Port
tcp+10.0.0.1 tcp 10.0.0.1 4777
tcp+10.0.0.1:9000 tcp 10.0.0.1 9000
quib+1.1.1.1:4776 quib 1.1.1.1 4776
udp+10.0.0.1 udp 10.0.0.1 4777
ws+example.com ws example.com 4778
auto+example.com auto example.com 4777
example.com auto example.com 4777
example.com:9000 auto example.com 9000
tcp:4777 tcp (from context) 4777
udp udp (from context) 4777
unix+/tmp/hppr.sock