Overview
The connections API uses three main TypeScript types to represent network data:Listener, Connection, and ConnectionsData. These types are defined in lib/connections.ts and are used throughout the API responses.
Listener
Represents a process that is listening on a network port.Fields
Process ID of the listening process. May be
0 if the process information is not available.Name of the process (e.g., “node”, “redis-server”, “postgres”). Extracted from
/proc/{pid}/comm. Will be "?" if the process name cannot be determined.Human-readable service label for display purposes:
- Shows the container name for Docker-published ports
- Shows “psys” for the psys application itself
- Shows “6379 (typical: Redis)” format for recognized services when process name is ”?”
- Shows ” (unknown)” for unrecognized services
undefinedwhen the process name is known and not a Docker container
Docker container name if this port is published by a Docker container. Used to display Docker icon in the UI.
Suggested icon type for UI display. Possible values:
"node"- Node.js processes"next"- Next.js applications"redis"- Redis server"mongo"- MongoDB"postgres"- PostgreSQL"mysql"- MySQL/MariaDB"apache"- Apache HTTP Server"ssh"- SSH server"psys"- The psys application itself"generic"- Generic/unknown service
IP address the service is listening on. Common values:
"0.0.0.0"- All IPv4 interfaces"127.0.0.1"- Localhost only (IPv4)"::"- All IPv6 interfaces"::1"- Localhost only (IPv6)- Specific IP addresses for individual interfaces
Human-readable description of what the address means:
"Listening on all IPv4 interfaces""Localhost only (IPv4)""Localhost or all IPv6""systemd-resolved (local DNS)""Local network (IPv4)""IPv6 address""Other interface"
Port number the service is listening on (0-65535).
Full command line of the process, extracted from
/proc/{pid}/cmdline. Truncated to 80 characters. Null bytes are replaced with spaces.Connection
Represents an established TCP connection between processes.Fields
Process ID that initiated the connection.
Name of the process that initiated the connection. Extracted from
/proc/{pid}/comm.Source IP address of the connection. Normalized for consistent display (e.g., loopback addresses standardized).
Source port number (ephemeral port typically assigned by the OS).
Destination IP address the connection is going to.
Destination port number (the service port the connection is targeting).
Optional label identifying the destination service:
- Docker container name if the destination is a Docker-published port
- Known service name for common ports (“MongoDB”, “Redis”, “PostgreSQL”, “MySQL”, “Elasticsearch”, “RabbitMQ”)
- Process name if the destination is another local process
undefinedif the destination cannot be identified
ConnectionsData
The top-level response type returned by the/api/connections endpoint.
Fields
Array of all listening ports on the system. Gathered from
ss -tlnp command output.Array of all established TCP connections. Gathered from
ss -tnp command output.