A local development reverse proxy with automatic HTTPS using Cloudflare Pingora.
- 🔀 Route custom domains to local development servers
- 🔒 Automatic HTTPS with self-signed certificates
- ⚡ Built on Cloudflare's high-performance Pingora framework
- 📝 Simple YAML configuration
Via npm (macOS and Linux):
npm install -g @devrelay/cli
# or run without installing
npx @devrelay/cliFrom source (requires Rust 1.70+):
cargo build --release
./target/release/devrelay startCreate a config.yaml file (or copy from config.example.yaml):
# Proxy routes - each route maps a custom domain to a backend
routes:
- host: "myapp.dev"
port: 443 # Port where proxy listens
listen_tls: true # Required for .dev domains in Chrome
backend: "localhost"
backend_port: 3000 # Port where your dev server runs
backend_tls: false # true for https://localhost (default = false)
# TLS/SSL Configuration
tls:
enabled: true
cert_dir: "./certs" # Directory to store generated certificates
ca_name: "DevRelay CA" # Name for the Certificate AuthorityIf you installed via npm, run:
devrelay startIf you built from source, run ./target/release/devrelay start.
That's it! 🎉
On first run, DevRelay will automatically:
- ✅ Generate CA and server certificates
- ✅ Install the CA certificate to your system trust store (macOS Keychain or Linux
ca-certificates; prompts for password) - ✅ Add your custom domains to
/etc/hosts(prompts for password)
Then just restart your browser and access https://myapp.dev!
devrelay start --config config.example.yamlIf you want to install manually:
devrelay start --skip-installTo force reinstall the CA cert and hosts entries:
devrelay start --force-installSuppress per-request proxying log lines:
devrelay start --quietTo remove the CA certificate from your system trust store and clean up /etc/hosts entries:
devrelay start --uninstall- Routing: Reads the
Hostheader from incoming requests and matches it against configured routes - Port Mapping: Each route specifies both the listening port and backend port independently
- TLS: Generates a local CA certificate and signs server certificates for each configured domain
- Proxy: Uses Pingora's high-performance reverse proxy to forward requests to your local dev servers
- Rust 1.70+
- macOS or Linux (for automatic CA cert and
/etc/hostssetup). On Linux, Debian/Ubuntu (ca-certificates) or RHEL/Fedora (ca-certificates) must be installed.
MIT