Build a WebSocket-only tracker from the official Node image and a locked bittorrent-tracker 11.2.3, run via compose.tracker.yaml and the tracker:up/tracker:down/test:tracker scripts. A small wrapper disables scrape and stats and bounds input: frame validation, per-IP connection and message limits (IPv6 grouped per /64), origin checks, a fixed peer ID and at most four swarms per socket (tracked synchronously, so pipelined frames cannot bypass it), swarm and peer caps, idle-socket timeout and explicit expiry of stale swarm memberships. Forwarded addresses are taken from the rightmost X-Forwarded-For entry and only from trusted proxies. Integration tests use only Node built-ins. Document the planned tracker reconnect design; the app still uses manual connection codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
790 B
YAML
29 lines
790 B
YAML
# Our tracker image, built from the official Node base and pinned upstream npm package.
|
|
# Independent of coturn and its development secrets; usable alone on the VPS.
|
|
name: hellcon-tracker
|
|
services:
|
|
tracker:
|
|
build:
|
|
context: ./tracker
|
|
target: runtime
|
|
image: hellcon-tracker:local
|
|
init: true
|
|
restart: "no"
|
|
ports:
|
|
- "127.0.0.1:${TRACKER_PORT:-8000}:8000"
|
|
environment:
|
|
ANNOUNCE_INTERVAL_SECONDS: "5"
|
|
ALLOWED_ORIGINS: "${TRACKER_ALLOWED_ORIGINS:-}"
|
|
TRUSTED_PROXY_IPS: "${TRACKER_TRUSTED_PROXY_IPS:-}"
|
|
read_only: true
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
mem_limit: 256m
|
|
cpus: 0.5
|
|
pids_limit: 64
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "5m"
|
|
max-file: "2"
|