internal/

directory
v0.4.0-alpha.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0

Directories

Path Synopsis
Package adminapi is the server's management API (ADR 0005): HTTP+JSON over a local unix socket (access is the file permission, full admin) and over the public listener under Prefix (bearer token with admin:* scopes).
Package adminapi is the server's management API (ADR 0005): HTTP+JSON over a local unix socket (access is the file permission, full admin) and over the public listener under Prefix (bearer token with admin:* scopes).
Package auth implements porthole client tokens: `ph_<id>_<secret>`.
Package auth implements porthole client tokens: `ph_<id>_<secret>`.
cli
clientcmd
Package clientcmd implements the command line of the porthole client binary.
Package clientcmd implements the command line of the porthole client binary.
exitcode
Package exitcode defines the process exit statuses of porthole and portholed, and runs a cobra command tree so that every failure ends in one of them (and, with --json, in an error document on stdout).
Package exitcode defines the process exit statuses of porthole and portholed, and runs a cobra command tree so that every failure ends in one of them (and, with --json, in an error document on stdout).
jsonout
Package jsonout implements the --json mode shared by the porthole and portholed command lines.
Package jsonout implements the --json mode shared by the porthole and portholed command lines.
servercmd
Package servercmd provides the `portholed serve` command.
Package servercmd provides the `portholed serve` command.
tokencmd
Package tokencmd implements "portholed token create|list|revoke".
Package tokencmd implements "portholed token create|list|revoke".
Package client implements the porthole client: one outbound session to the server, tunnel registration, forwarding of data streams to local targets, and reconnection with exponential backoff.
Package client implements the porthole client: one outbound session to the server, tunnel registration, forwarding of data streams to local targets, and reconnection with exponential backoff.
Package clientconfig loads and validates the client tunnels file (tunnels.yaml): a list of named tunnels that the porthole client daemon (or `porthole start`) keeps up.
Package clientconfig loads and validates the client tunnels file (tunnels.yaml): a list of named tunnels that the porthole client daemon (or `porthole start`) keeps up.
Package config loads and validates the portholed server configuration (DESIGN.md §3.9).
Package config loads and validates the portholed server configuration (DESIGN.md §3.9).
Package daemon is the porthole client daemon: one long-lived session to the server carrying a mutable set of tunnels, controlled over the local API (internal/localapi) and by the tunnels file (internal/clientconfig).
Package daemon is the porthole client daemon: one long-lived session to the server carrying a mutable set of tunnels, controlled over the local API (internal/localapi) and by the tunnels file (internal/clientconfig).
Package localapi is the local control API of the porthole client daemon: HTTP/1.1 + JSON over a unix domain socket (see docs/adr/0002-client-daemon-and-tunnels-file.md).
Package localapi is the local control API of the porthole client daemon: HTTP/1.1 + JSON over a unix domain socket (see docs/adr/0002-client-daemon-and-tunnels-file.md).
mcp
client
Package client is the MCP server of an agent on a client machine (ADR 0005, surface B): `porthole mcp` serves tools that open and close tunnels through the local daemon.
Package client is the MCP server of an agent on a client machine (ADR 0005, surface B): `porthole mcp` serves tools that open and close tunnels through the local daemon.
server
Package server is the operator MCP server (ADR 0005, surface A): the tools an agent uses to look after a porthole server.
Package server is the operator MCP server (ADR 0005, surface A): the tools an agent uses to look after a porthole server.
Package metrics holds the Prometheus instrumentation of portholed and the HTTP handler that serves it together with the Go profiler.
Package metrics holds the Prometheus instrumentation of portholed and the HTTP handler that serves it together with the Go profiler.
Package proto implements the porthole control protocol described in docs/protocol.md: length-prefixed JSON frames exchanged on the control stream and at the start of data streams.
Package proto implements the porthole control protocol described in docs/protocol.md: length-prefixed JSON frames exchanged on the control stream and at the start of data streams.
Package server implements portholed: it accepts client sessions over WebSocket+yamux (docs/protocol.md), keeps the registry of tunnels and routes public HTTP and TCP traffic into them (DESIGN.md §3.5).
Package server implements portholed: it accepts client sessions over WebSocket+yamux (docs/protocol.md), keeps the registry of tunnels and routes public HTTP and TCP traffic into them (DESIGN.md §3.5).
Package service installs and controls the porthole client daemon as an operating system service: a systemd unit on Linux, a launchd job on macOS and a Windows service (SCM) on Windows (ADR 0006).
Package service installs and controls the porthole client daemon as an operating system service: a systemd unit on Linux, a launchd job on macOS and a Windows service (SCM) on Windows (ADR 0006).
Package store persists server state: client tokens (v0.1) and port reservations (v0.2).
Package store persists server state: client tokens (v0.1) and port reservations (v0.2).
Package traffic keeps the in-memory journal of proxied HTTP requests and tunnel connections (ADR 0005).
Package traffic keeps the in-memory journal of proxied HTTP requests and tunnel connections (ADR 0005).
Package transport provides the multiplexed session between a porthole client and server.
Package transport provides the multiplexed session between a porthole client and server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL