| Crates.io | fbi-proxy |
| lib.rs | fbi-proxy |
| version | 1.7.0 |
| created_at | 2025-07-29 17:52:49.172517+00 |
| updated_at | 2025-09-16 08:57:29.361414+00 |
| description | A fast and flexible proxy server for intercepting and modifying HTTP/HTTPS requests |
| homepage | https://github.com/snomiao/fbi-proxy |
| repository | https://github.com/snomiao/fbi-proxy |
| max_upload_size | |
| id | 1772633 |
| size | 302,884 |
FBI-Proxy provides easy HTTPS access to your local services with intelligent domain routing.
3000.fbi.com → localhost:3000)api--3001.fbi.com → api:3001)admin.app.fbi.com → app:80)myserver.fbi.com → myserver:80)# Port forwarding
https://3000.fbi.com → localhost:3000
https://8080.fbi.com → localhost:8080
# Host--Port forwarding
https://api--3001.fbi.com → api:3001
https://db--5432.fbi.com → db:5432
# Subdomain routing (with Host header)
https://admin.app.fbi.com → app:80 (Host: admin)
https://v2.api.fbi.com → api:80 (Host: v2)
# Direct host forwarding
https://myserver.fbi.com → myserver:80
WebSocket connections are supported for all patterns.
# launch
bunx fbi-proxy
# expose to LAN
bunx fbi-proxy --host 0.0.0.0 --port=2432
# run with docker
docker run --rm --name fbi-proxy --network=host snomiao/fbi-proxy
FBI-Proxy focuses on the core proxy functionality. For HTTPS and advanced routing, you can use Caddy as a reverse proxy:
# macOS
brew install caddy
# Ubuntu/Debian
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
# Or download from https://caddyserver.com/download
Create a Caddyfile to route *.fbi.com to FBI-Proxy:
*.fbi.com {
reverse_proxy localhost:2432
tls internal
}
# Terminal 1: Start FBI-Proxy
bunx fbi-proxy
# Terminal 2: Start Caddy
caddy run --config Caddyfile
Now you can access your services via HTTPS at https://*.fbi.com!
# Install dependencies
bun install
# Start development
bun run dev
# Or production
bun run build && bun run start
FBI-Proxy supports the following environment variables for configuration:
| Variable | Description | Default |
|---|---|---|
FBI_PROXY_PORT |
Port for the proxy server to listen on | 2432 |
FBI_PROXY_HOST |
Host/IP address to bind to | 127.0.0.1 |
RUST_LOG |
Log level for the Rust proxy (error, warn, info, debug, trace) | info |
FBIPROXY_PORT |
Internal proxy port (auto-assigned) | Auto |
Command-line arguments take precedence over environment variables.
fbi.com (change with --fbihost)--host or FBI_PROXY_HOST env var--port or FBI_PROXY_PORT env varMIT License - see LICENSE file for details