A high-performance HTTP/HTTPS reverse proxy written in Go. This proxy forwards requests to a backend service specified by the BACKEND_URL
environment variable and handles X-Forwarded-*
headers correctly.
- High-performance seven-layer proxy
- Proper handling of
X-Forwarded-For
,X-Forwarded-Proto
, andX-Forwarded-Host
headers - Configurable backend URL via environment variable
- Configurable port (defaults to 8080)
You can deploy this proxy to Railway with one click:
Or, you can deploy it manually by setting the BACKEND_URL
environment variable in your Railway project.
BACKEND_URL
(required): The URL of the backend service to proxy requests to.PORT
(optional): The port on which the proxy server will listen. Defaults to8080
.
-
Set the
BACKEND_URL
environment variable:export BACKEND_URL=https://your-backend-service.com
-
Run the proxy:
go run main.go
The proxy will start on port 8080 (or the port specified by the
PORT
environment variable).