PortZero Turns Port 0 Into Subdomain Routing
A developer recently spent hours troubleshooting a local development environment only to discover that the browser front‑end was pointing to the wrong backend version. The frustration sparked the creation of **PortZero**, a GPLv3‑licensed tool that replaces the traditional numeric port system with a name‑based routing scheme. By assigning each process a unique subdomain, PortZero eliminates the need to remember or manage port numbers.
PortZero monitors running processes and Docker containers that expose a `PZ_TUNNEL` environment variable, such as `PZ_TUNNEL=myapp‑branch`. When it detects such a process, it creates a virtual network interface, assigns a virtual IP address, and generates a DNS record that maps the specified subdomain to that IP. The tool then listens on the standard port (e.g., 80 for HTTP, 443 for HTTPS, 5432 for PostgreSQL) and forwards incoming traffic to the actual, OS‑assigned random port on which the process is listening. Additional features include automatic HTTPS support via a local certificate authority and optional cloud tunnels for remote access.
PortZero offers a streamlined, conflict‑free approach to local development networking, allowing multiple services to share the same standard ports while being addressed by distinct subdomains. The project is open source and available at [portzero.net](https://portzero.net) and on GitHub under the PortZeroNetwork organization.