A simple, lightweight reverse proxy with URL parameter or header authentication.
- 🚀 Simple reverse proxy for any web service
- 🔒 Optional authentication via URL parameter or header
- 📦 Zero configuration files needed
- ⚡ Static binary, minimal dependencies
- 🎯 Cross-platform: ARM64, AMD64
Install with a single command using our installation script:
curl -fsSL https://raw.githubusercontent.com/talkincode/apxy/main/install.sh | bashThis will automatically detect your OS and architecture, download the latest release, and install it to /usr/local/bin.
cargo install apxy# Linux/macOS ARM64
curl -L https://github.com/talkincode/apxy/releases/latest/download/apxy-aarch64-unknown-linux-musl -o apxy
chmod +x apxy
sudo mv apxy /usr/local/bin/
# Linux AMD64
curl -L https://github.com/talkincode/apxy/releases/latest/download/apxy-x86_64-unknown-linux-musl -o apxy
chmod +x apxy
sudo mv apxy /usr/local/bin/
# macOS ARM64
curl -L https://github.com/talkincode/apxy/releases/latest/download/apxy-aarch64-apple-darwin -o apxy
chmod +x apxy
sudo mv apxy /usr/local/bin/
# macOS AMD64
curl -L https://github.com/talkincode/apxy/releases/latest/download/apxy-x86_64-apple-darwin -o apxy
chmod +x apxy
sudo mv apxy /usr/local/bin/# Full URL format
apxy --target http://localhost:3000
# Shorthand: just port number
apxy --target 3000
# Shorthand: with colon
apxy --target :3000
# Shorthand: localhost with port
apxy --target localhost:3000All the above commands will proxy to http://localhost:3000. This will start a proxy on port 8080 that forwards all requests.
apxy --target http://localhost:3000 --auth-token mysecrettokenNow clients must provide the token either as:
URL Parameter:
curl http://localhost:8080/api/data?token=mysecrettokenHeader:
curl -H "X-Auth-Token: mysecrettoken" http://localhost:8080/api/dataapxy --port 9000 --target http://localhost:3000apxy \
--port 8080 \
--target http://localhost:3000 \
--auth-token supersecret123Options:
-p, --port <PORT> Port to listen on [default: 8080]
-t, --target <TARGET> Target URL to proxy to (supports shorthand: port, :port, localhost:port, or full URL)
-a, --auth-token <AUTH_TOKEN> Authentication token
-h, --help Print help
-V, --version Print version
The --target parameter supports various formats for convenience:
- Port only:
3000→http://localhost:3000 - With colon:
:3000→http://localhost:3000 - Host:port:
localhost:3000→http://localhost:3000 - Full URL:
http://localhost:3000→http://localhost:3000 - Remote:
example.com:8080→http://example.com:8080 - HTTPS:
https://api.example.com→https://api.example.com
- Add authentication layer to existing services
- Quick reverse proxy for development
- Expose local services securely
- Simple API gateway
git clone https://github.com/talkincode/apxy
cd apxy
cargo build --releaseThe binary will be at target/release/apxy.
MIT