Enumeration
OnionPortTarget
Where an onion service should forward inbound connections.
enum OnionPortTarget
Overview
Corresponds to the Target field of an ADD_ONION port mapping in control-spec.txt §3.27. Two target shapes are modelled: a TCP host:port tuple on the local machine, or a Unix domain socket path. Pick the TCP form for typical web-server integration; the Unix form when forwarding into a socket-only backend (nginx FastCGI, Prometheus exporters, etc.).
Note
Conformance is Sendable + Hashable. Hashability is safe here — both payloads are public configuration, not secrets.
Important
Tor does not validate the target at registration time. Bad hosts / missing Unix paths surface as connection refusals when a client dials the .onion address.
Topics
Cases