A lightweight FastAPI service that implements FRP’s HTTP plugin for authentication. Define users and per-proxy policies in YAML, reload on the fly, and keep credentials on your own infrastructure.
auth.yml with global deny-lists for proxy types, ports, and domains.Login and NewProxy.linux/amd64 and linux/arm64.docker run --rm \
-p 7005:7005 \
-v "$(pwd)/auth.yml:/app/auth.yml:ro" \
-e FRP_AUTH_LISTEN_HOST=0.0.0.0 \
-e FRP_AUTH_CONFIG=/app/auth.yml \
spaleks/frp-simple-auth:latest
7005GET /healthPOST /reloadFRP_AUTH_CONFIG if you mount the config somewhere else.services:
frp-auth:
image: spaleks/frp-simple-auth:latest
container_name: frp-simple-auth
restart: unless-stopped
environment:
- FRP_AUTH_LISTEN_HOST=0.0.0.0
- FRP_AUTH_LISTEN_PORT=7005
- FRP_AUTH_CONFIG=/app/auth.yml
volumes:
- ./auth.yml:/app/auth.yml:ro
ports:
- "7005:7005"
frps.yaml)httpPlugins:
- name: auth
addr: 127.0.0.1:7005
path: /handler
ops:
- Login
- NewProxy
Ensure your FRP server can reach the container (same host or network route).
| Variable | Default | Description |
|---|---|---|
FRP_AUTH_CONFIG | ./auth.yml | Path to the YAML policy file |
FRP_AUTH_LISTEN_HOST | 127.0.0.1 | Bind address |
FRP_AUTH_LISTEN_PORT | 7005 | Service port |
LOGLEVEL | INFO | Python logging level |
.env files are honored thanks to python-dotenv.
auth.yml)globalDeny:
proxyTypes: ["udp"]
remotePorts: ["1-1023"]
domains:
- "*.blocked.example"
users:
- user: "alice"
password: "s3cret"
allow:
proxyTypes: ["http", "https"]
remotePorts: ["2000-2100", "5432"]
domains:
- "example.com"
- "*.internal.example.com"
Changes to auth.yml trigger an automatic reload (inotify + SIGHUP).
The image bundles the PyInstaller-built binary at /usr/local/bin/frp-simple-auth. GitHub Releases also publish standalone Linux binaries (amd64 & arm64) if you prefer running without Docker.
Content type
Image
Digest
sha256:103587f9d…
Size
45.7 MB
Last updated
6 months ago
docker pull spaleks/frp-simple-auth