fbi-proxy-1.9.1 is not a library.
fbi-proxy
FBI-Proxy provides easy HTTPS access to your local services with intelligent domain routing.
Features
Current Features ✅
- Intelligent Domain Routing: Multiple routing patterns for flexible service access
- Port-based routing (e.g.,
3000.fbi.com→localhost:3000) - Host--Port routing (e.g.,
api--3001.fbi.com→api:3001) - Subdomain routing with Host headers (e.g.,
admin.app.fbi.com→app:80) - Direct host forwarding (e.g.,
myserver.fbi.com→myserver:80)
- Port-based routing (e.g.,
- WebSocket Support: Full WebSocket connection support for all routing patterns
- High Performance: Built with Rust for optimal performance and low resource usage
- Easy Setup: Simple one-command installation and startup
- Docker Support: Available as a Docker image for containerized deployments
- Flexible Configuration: Environment variables and CLI options for customization
- Cross-Platform: Works on macOS, Linux, and Windows
- Integration Ready: Compatible with reverse proxies like Caddy for HTTPS
Roadmap
Next Up 🚧
- Configuration File Support - YAML/JSON config for persistent routing rules
- Access Control - Domain filtering, host/port whitelisting
- Request Logging - Basic access logs for debugging
- Health Checks - Simple upstream service availability monitoring
Future Improvements 🔮
- Load Balancing - Round-robin between multiple upstream targets
- Metrics - Basic statistics (requests, response times, errors)
- Hot Reload - Update configuration without restart
- Custom Headers - Add/modify headers for specific routes
Routing Examples
# Port forwarding
# Host--Port forwarding
# Subdomain routing (with Host header)
)
)
# Direct host forwarding
WebSocket connections are supported for all patterns.
Usage
# launch
# expose to LAN
# run with docker
Using with Caddy (Optional)
FBI-Proxy focuses on the core proxy functionality. For HTTPS and advanced routing, you can use Caddy as a reverse proxy:
Install Caddy
# macOS
# Ubuntu/Debian
|
|
# Or download from https://caddyserver.com/download
Caddyfile Example
Create a Caddyfile to route *.fbi.com to FBI-Proxy:
*.fbi.com {
reverse_proxy localhost:2432
tls internal
}
Run Both Services
# Terminal 1: Start FBI-Proxy
# Terminal 2: Start Caddy
Now you can access your services via HTTPS at https://*.fbi.com!
Development
# Install dependencies
# Start development
# Or production
&&
Prerequisites
- Bun: https://bun.sh/
- Rust: https://rustup.rs/
Configuration
Environment Variables
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.
CLI Options
- Default domain:
fbi.com(change with--fbihost) - Host binding:
--hostorFBI_PROXY_HOSTenv var - Port binding:
--portorFBI_PROXY_PORTenv var
License
MIT License - see LICENSE file for details