Simple api proxy
277
docker run -d \
--name=apiproxy \
-v=apiproxy_config:/opt/proxy/config \
-v=apiporxy_logs:/opt/proxy/logs \
-p=8080:8080 \
xpyctee/apiproxy
/opt/proxy/config/config.yaml):urls:
steam: # Prefix
url: 'https://steamcommunity.com' # Base redirect url
rate_limit: 30 # (Optional) Queries per minute
http://[::1]:8080/PREFIX/..endpoint..
STAEMID=12345678....
curl 'http://127.0.0.1:8080/steam/inventory/$STEAMID/730/2?l=english&count=100'
This redirects to
https://steamcommunity.com/inventory/$STEAMID/730/2?l=english&count=100, proxying the request with headers and query arguments using GET or POST.
| Variable | Description | Example Value | Default |
|---|---|---|---|
APIPROXY_URL_* | APIPROXY_URL_steam - url for prefix steam | "https://steamcommunity.com" | None |
APIPROXY_RATE_* | APIPROXY_RATE_steam - Rate limit for prefix steam | "30" | "0" |
MEMCACHE_PATH | Path to socket for the Memcached server. | "/tmp/memcached.sock" | "/tmp/memcached.sock" |
CACHE_SIZE | Cache size in megabytes. | "1024" | "1024" |
GUNICORN_WORKERS | Number of Gunicorn workers for handling requests. | "4" | "4" |
GUNICORN_LOG_LEVEL | Log level for Gunicorn (e.g., debug, info, warning). | "info" | "info" |
GUNICORN_ADDR | Address for Gunicorn to bind to. | "[::]" | "[::]" |
GUNICORN_PORT | Port for Gunicorn to listen on. | "8080" | "8080" |
docker run -d \
--name=apiproxy \
-e=APIPROXY_URL_steam=https://steamcommunity.com \
-e=APIPROXY_RATE_steam=30 \
-e=APIPROXY_URL_test=http://localhost:8081 \
-p=8080:8080 \
xpyctee/apiproxy
Content type
Image
Digest
sha256:d245a5963…
Size
90 MB
Last updated
about 1 year ago
docker pull xpyctee/apiproxy:beta