TunnelInfo class

A user-facing view of an active TCP tunnel held by the Hub, as returned by the list API and relayed to the owning client.

A tunnel publishes an internal targetHost:targetPort (reachable by the exposer — a node or the client's own machine) on a public publicPort the Hub listens on. External TCP connections to publicHost:publicPort are bridged to the target over the exposer's multiplexed connection.

Annotations
  • @immutable

Constructors

TunnelInfo({required String tunnelId, required String nodeId, required String ownerUserId, required String targetHost, required int targetPort, required String publicHost, required int publicPort, required DateTime createdAt})
Creates a tunnel view.
const

Properties

createdAt DateTime
When the tunnel was opened.
final
hashCode int
The hash code for this object.
no setterinherited
nodeId String
The node that exposes the target, or @local when the owning client exposes its own machine.
final
ownerUserId String
The authenticated principal that owns the tunnel.
final
publicHost String
The host the Hub advertises for the public listener (may be empty/wildcard, in which case clients substitute the Hub's own hostname).
final
publicPort int
The public TCP port the Hub listens on for this tunnel.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortId String
A short, display-only handle derived from tunnelId. Close accepts any unambiguous prefix of tunnelId (the short id being one such).
no setter
targetHost String
The internal host the exposer dials for each connection.
final
targetPort int
The internal TCP port the exposer dials for each connection.
final
tunnelId String
The full, cryptographically-secure tunnel id.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Encodes this info to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, dynamic> d) TunnelInfo
Decodes a TunnelInfo from a JSON map.