pub struct Port {
pub port: u16,
pub name: Option<String>,
pub http: bool,
pub tls: bool,
pub publish: Option<u16>,
pub fixed: bool,
pub dormant: bool,
pub protocol: Protocol,
}Expand description
A port a machine answers on.
Fields§
§port: u16The port the machine listens on (what the other machines and the checks connect to).
name: Option<String>A name for the port (web, api): how outputs and messages refer to it. Default:
its port.
http: boolIt speaks HTTP: derived checks request a page instead of only connecting.
tls: boolIt speaks TLS (HTTPS for an http port): probes and checks use TLS, certificates
unchecked (lab services sign their own).
publish: Option<u16>Reachable from the user’s machine on this port (loopback only), besides the environment’s own networks.
fixed: boolKeep publish as the host port on local Docker too (normally a free one is picked, so
labs never collide): for apps whose pages call localhost:<that port> themselves. The
environment can’t start while another holds that port.
dormant: boolOnly answers later, once something wakes it (the bind shell an exploit opens): declared,
published and opened by reach like any port, but nothing waits for it (healthcheck,
readiness probe, depends_on, up --wait) and no derived check expects it to answer.
protocol: Protocoltcp (default) or udp (DNS, SNMP, TFTP, syslog): published, forwarded and opened as
UDP. UDP has no handshake, so nothing waits for it (healthcheck, readiness probe,
depends_on) and no derived check probes it: a check of your own says how (exec: dig).
A port served over both is two entries, one per protocol.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Port
impl<'de> Deserialize<'de> for Port
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Port
impl JsonSchema for Port
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more