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/devrelayCreate 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: 8080 # Port where proxy listens
listen_tls: true # Required for .dev domains in Chrome
backend: "localhost"
backend_port: 3000 # Port where your dev server runs
- host: "myapi.com"
port: 8080
backend: "localhost"
backend_port: 5000
- host: "myfrontend.com"
port: 443
listen_tls: true # Accept HTTPS connections (default: false)
backend: "localhost"
backend_port: 6000
backend_tls: true # Connect to backend over HTTPS (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:
devrelayIf you built from source, run ./target/release/devrelay.
That's it! 🎉
On first run, DevRelay will automatically:
- ✅ Generate CA and server certificates
- ✅ Install the CA certificate to your macOS System Keychain (prompts for password)
- ✅ Add your custom domains to
/etc/hosts(prompts for password)
Then just restart your browser and access https://myapp.dev!
https://myapp.dev:8080→ proxies tohttp://localhost:3000http://myapi.com→ proxies tohttp://localhost:5000https://myfrontend.com→ proxies tohttps://localhost:6000
devrelay --config config.example.yamlIf you want to install manually:
devrelay --skip-installTo force reinstall the CA cert and hosts entries:
devrelay --force-install
To remove the CA certificate from your macOS Keychain and clean up /etc/hosts entries:
devrelay --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 (for certificate installation commands; Linux support coming soon)
MIT