Files
devvm/testdata/script/proxy.txtar
T
w3cjandClaude Opus 5.5 3a2c290d3d refactor(msg): messages and comments say network tier and the VM's proxy, not network policy
Every VM runs a proxy and is on one of four tiers, so the proxy's messages
name the VM's proxy, the unenforced ones its network tier, and the
redaction ones say devvm keeps secrets on this machine on every tier.
Message IDs are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 17:16:40 -07:00

49 lines
1.8 KiB
Plaintext

# devvm _proxy: each VM's proxy, hidden. --help lists its one
# flag, -config.
exec devvm _proxy --help
stdout '-config'
! stdout '-auth-file'
! stdout '-init-ca|-login|-redact'
! stderr .
exec devvm --help
! stdout _proxy
# The proxy runs only with its config (proxy.Config), which holds the VM's
# password: none, one others may read, one without a password, and one of
# another version are refused.
! exec devvm _proxy
stderr '^devvm: proxy_failed reason=-config is required$'
! exec devvm _proxy -listen 127.0.0.1:0
stderr '^devvm: proxy_failed reason=flag provided but not defined: -listen$'
chmod 0600 nopw.json
chmod 0600 v2.json
chmod 0644 open.json
! exec devvm _proxy --config open.json
stderr '^devvm: proxy_failed reason=open.json: another user may read or change it$'
! exec devvm _proxy --config nopw.json
stderr '^devvm: proxy_failed reason=nopw.json: no password$'
! exec devvm _proxy -config v2.json
stderr '^devvm: proxy_failed reason=v2.json: version 2, not 1$'
! exec devvm _proxy -nope
stderr '^devvm: proxy_failed reason=flag provided but not defined: -nope$'
# What only the host does (devvm's CA, agents' logins, redaction) runs in
# devvm itself: none of it is reachable from the proxy's arguments.
! exec devvm _proxy -init-ca ca
stderr '^devvm: proxy_failed reason=flag provided but not defined: -init-ca$'
! exists ca
! exec devvm _proxy -login codex -login-file auth.json -login-vm
stderr '^devvm: proxy_failed reason=flag provided but not defined: -login$'
! stdout .
! exec devvm _proxy -redact json
stderr '^devvm: proxy_failed reason=flag provided but not defined: -redact$'
-- open.json --
{"version": 1, "listen": "127.0.0.1:0", "password": "k3y"}
-- nopw.json --
{"version": 1, "listen": "127.0.0.1:0"}
-- v2.json --
{"version": 2, "listen": "127.0.0.1:0", "password": "k3y"}
-- auth.json --
{"OPENAI_API_KEY": "sk-real"}