Configuration
config.yaml is optional. If absent, the proxy starts with the defaults below.
Default config paths
Section titled “Default config paths”| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/sotatek-proxy/config.yaml |
| Linux | ~/.config/sotatek-proxy/config.yaml ($XDG_CONFIG_HOME respected) |
| Windows | %ProgramData%\SotatekProxy\config.yaml |
Full example
Section titled “Full example”# 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: falseField reference
Section titled “Field reference”| Field | Type | Default | Notes |
|---|---|---|---|
port | int | 3817 | 1–65535. Loopback bind hardcoded. |
upstream_url | string | https://bifrost.sotatek.works | Must start with http:// or https://. http:// triggers a startup warning (API keys would traverse the network in plaintext). |
cache_ttl_seconds | int | 60 | 0 disables the cache. |
log.file | string | OS default | Empty string keeps the default. |
log.max_size_mb | int | 50 | Rotation size threshold. |
log.max_backups | int | 5 | Rotated .gz files to keep. |
log.max_age_days | int | 30 | Delete rotated files older than this. |
log.json | bool | false | JSON line format for log ingest. |
pprof.enable | bool | false | Enables /debug/pprof/*. |
pprof.addr | string | 127.0.0.1:8316 | Must resolve to loopback (validated at startup). |
debug | bool | false | Verbose logs + Gin debug mode. |
Environment overrides
Section titled “Environment overrides”Set the variable, then start the daemon. Env values override the YAML.
| Variable | Field | Example |
|---|---|---|
SOTATEK_PROXY_PORT | port | 3818 |
SOTATEK_PROXY_UPSTREAM | upstream_url | https://bifrost-staging.sotatek.works |
SOTATEK_PROXY_DEBUG | debug | true |
SOTATEK_PROXY_LOG_JSON | log.json | true |
Hot-reload
Section titled “Hot-reload”Edit config.yaml and save — changes apply within ~500ms (fsnotify debounced). No restart needed for:
debugcache_ttl_secondslog.max_size_mb,log.max_backups,log.max_age_dayslog.json
Body size limit
Section titled “Body size limit”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.