Skip to content

Configuration

config.yaml is optional. If absent, the proxy starts with the defaults below.

OSPath
macOS~/Library/Application Support/sotatek-proxy/config.yaml
Linux~/.config/sotatek-proxy/config.yaml ($XDG_CONFIG_HOME respected)
Windows%ProgramData%\SotatekProxy\config.yaml
# Local listener port. Loopback bind is hardcoded — `host` is not configurable.
port: 3817
# Upstream Bifrost gateway. Path is forwarded 1:1 (no strip).
upstream_url: 'https://bifrost.sotatek.works'
# TTL (seconds) for the {pid → git-remote} cache. 0 disables.
cache_ttl_seconds: 60
# Logging — rotation via lumberjack, tee'd to stdout.
log:
# file: <per-OS default — leave empty>
max_size_mb: 50 # rotate when current file exceeds this size
max_backups: 5 # keep N rotated (.gz) files
max_age_days: 30 # delete rotated files older than this
json: false # set true to emit JSON logs (Loki/ELK ingest)
# Optional profiling endpoint. Disabled by default. Loopback-only enforced at startup.
pprof:
enable: false
addr: '127.0.0.1:8316'
# Verbose logging (gin debug mode + logrus debug level).
debug: false
FieldTypeDefaultNotes
portint38171–65535. Loopback bind hardcoded.
upstream_urlstringhttps://bifrost.sotatek.worksMust start with http:// or https://. http:// triggers a startup warning (API keys would traverse the network in plaintext).
cache_ttl_secondsint600 disables the cache.
log.filestringOS defaultEmpty string keeps the default.
log.max_size_mbint50Rotation size threshold.
log.max_backupsint5Rotated .gz files to keep.
log.max_age_daysint30Delete rotated files older than this.
log.jsonboolfalseJSON line format for log ingest.
pprof.enableboolfalseEnables /debug/pprof/*.
pprof.addrstring127.0.0.1:8316Must resolve to loopback (validated at startup).
debugboolfalseVerbose logs + Gin debug mode.

Set the variable, then start the daemon. Env values override the YAML.

VariableFieldExample
SOTATEK_PROXY_PORTport3818
SOTATEK_PROXY_UPSTREAMupstream_urlhttps://bifrost-staging.sotatek.works
SOTATEK_PROXY_DEBUGdebugtrue
SOTATEK_PROXY_LOG_JSONlog.jsontrue

Edit config.yaml and save — changes apply within ~500ms (fsnotify debounced). No restart needed for:

  • debug
  • cache_ttl_seconds
  • log.max_size_mb, log.max_backups, log.max_age_days
  • log.json

Inbound request bodies are capped at 100 MiB to defend against runaway local clients. SSE / streaming responses are unaffected. The cap is currently a compile-time constant.