Configuration
Eosrift uses a YAML config file with ngrok-like structure.
Default config path
Eosrift resolves the default path as follows:
- If
XDG_CONFIG_HOMEis set:$XDG_CONFIG_HOME/eosrift/eosrift.yml - Otherwise
os.UserConfigDir():- Linux: typically
~/.config/eosrift/eosrift.yml - macOS: typically
~/Library/Application Support/eosrift/eosrift.yml
- Linux: typically
- Fallback:
~/.config/eosrift/eosrift.yml
You can override path with:
- global flag:
--config <path> - env:
EOSRIFT_CONFIG=<path>
Top-level schema
yaml
version: 1
authtoken: eos_...
server_addr: https://eosrift.com
host_header: preserve
inspect: true
inspect_addr: 127.0.0.1:4040
tunnels:
web:
proto: http
addr: 3000
db:
proto: tcp
addr: 5432Top-level keys:
version(optional, written as1byeosrift config ...commands)authtokenserver_addrhost_header(preserve,rewrite, or literal host value)inspect(default inspector behavior)inspect_addr(starting address for local inspector bind)tunnels(map of named tunnels)
Value precedence
General rule: flag > environment > config > built-in default.
Server (--server)
--serverEOSRIFT_SERVER_ADDREOSRIFT_CONTROL_URL(legacy)server_addr- built-in default:
https://eosrift.com
Authtoken (--authtoken)
--authtokenEOSRIFT_AUTHTOKENEOSRIFT_AUTH_TOKEN(compatibility fallback)authtoken
Inspector (http and start)
inspect:--inspectflag- then config
inspect - then default
true
inspect_addr:--inspect-addrflag- then
EOSRIFT_INSPECT_ADDR - then config
inspect_addr - then default
127.0.0.1:4040
Host header (http)
--host-headerhost_header- built-in default
preserve
For start, per-tunnel host_header overrides top-level host_header.
Config commands
eosrift config supports:
add-authtokenset-serverset-host-headercheck
Examples:
bash
eosrift config add-authtoken eos_...
eosrift config set-server https://eosrift.com
eosrift config set-host-header rewrite
eosrift config checkeosrift config check verifies file readability and validates top-level host_header. It also warns if authtoken or server_addr is empty.