Skip to content

Maxiviper117/dev-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text for screen readers

DevProxy

Stable HTTPS .local domains for local development

npm status license node pnpm typescript

DevProxy is a cross-platform CLI for stable HTTPS .local domains that proxy to local development services on Windows, macOS, and Linux. On Windows, it also works well with apps running in WSL, Docker, or native Windows processes as long as the service is reachable through loopback.

Documentation

Full documentation is hosted at https://maxiviper117.github.io/dev-proxy/.

Quick Start

  1. Install Caddy and trust its CA:

    scoop install caddy
    caddy trust

    On macOS, brew install caddy is the common install path. On Linux, use the official packages for your distribution. See the docs for the full Windows, macOS, and Linux setup guide.

  2. Install DevProxy:

    npm install -g @maxiviper117/devproxy
  3. Run your local project on a port (for example, 8000).

Important

Elevated permissions required: This next step (4) modifies your system hosts file, so you must run it in an administrator / elevated terminal session (Windows: run Terminal/PowerShell as Administrator; macOS/Linux: use sudo).

  1. Register the service:

    Option A — Quick registration (can be run from anywhere):

    devproxy add api.myapp --port 8000

    Option B — Project-scoped registration (run inside your project directory):

    devproxy init --name api.myapp --port 8000

    init does two things:

    1. Registers the service globally (same as add) — adds the domain to DevProxy's registry, updates your hosts file, and reloads Caddy.
    2. Creates .devproxy/config.json in your current directory, saving the service name and port.

    Because the config lives in your project, you can re-run devproxy init later without remembering the original flags. Commit .devproxy/config.json to version control so your team can run the same command to set up the project locally.

  2. Open your domain:

    https://api.myapp.local
    

Tip

If you registered with init, you can also run devproxy open from your project root (where .devproxy/config.json exists) and it will open the domain directly in your browser.

  1. Optionally open the local dashboard:

    devproxy ui

    The dashboard opens in your default browser on 127.0.0.1:3579 by default. Use devproxy ui --port <port> to choose another preferred port, or devproxy ui --no-open to start the dashboard without launching a browser.

Commands

Command Description
devproxy init --name <name> --port <port> Register a service and create project config in one step
devproxy add <name> --port <port> Register a new service
devproxy update <name> [--name <name>] [--port <port>] Rename a service or change its port
devproxy open [name] Open a service in your browser
devproxy ui [--port <port>] [--no-open] Open the local browser dashboard
devproxy list List all registered services
devproxy status Report Caddy state and upstream health
devproxy remove <name> Remove a registered service
devproxy doctor Check setup and diagnostics
devproxy sync-hosts Align DevProxy hosts entries with the registry
devproxy certs Print Caddy root CA certificate information
devproxy trust Trust the Caddy local root CA certificate
devproxy start Start or reload Caddy
devproxy stop Stop Caddy

Requirements

  • Windows, macOS, or Linux
  • Node.js 22 or newer
  • Caddy installed and available on PATH
  • Local services reachable from the host running DevProxy

License

MIT

About

DevProxy is a cross-platform CLI for stable HTTPS .local domains that proxy to local development services on Windows, macOS, and Linux. On Windows, it also works well with apps running in WSL, Docker, or native Windows processes as long as the service is reachable through loopback.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors