Structure
OnionPortMapping
A single virtual-port → target mapping advertised by an onion service.
struct OnionPortMapping
Mentioned In
Overview
Corresponds to one Port=<virtualPort>,<target> entry in an ADD_ONION command (control-spec.txt §3.27). One OnionService can carry multiple mappings — e.g. port 80 to a web server, port 443 to the same server for TLS termination — by passing an array of these to addOnion(key:ports:detach:).
Note
Conformance is Sendable + Hashable so collections of mappings can be deduplicated and compared verbatim.
Important
The virtual port lives in the .onion namespace (what clients dial); the target lives in the process’s kernel address space. They are independent and do not need to match.
Topics
Creating
Inspection