Files
devvm/testdata/script
w3cjandClaude Opus 5.5 2304f26bf0 feat(netpolicy): config.toml sets the company proxy, and a start warns when its proxy loses one
config.toml's [proxy] table (https, http, no-proxy) is the company proxy that
VMs' proxies and builds go through when devvm's environment sets neither
HTTPS_PROXY nor HTTP_PROXY; the environment's settings win whole, never mixed
with config.toml's. Each value is checked as config.toml is read
(backend.CheckProxyURL, backend.CheckNoProxy), and a URL holding a password is
refused (proxy_password_in_config): config.toml is copied between machines
and kept with dotfiles.

The password is the host-only secret proxy (devvm secret set proxy, in the
Keychain or devvm's secrets folder). A URL that names a user gets
upstream.secret in the proxy's config, and the proxy looks the value up
through IO.Secret as it starts (upstreamPassword), so no file of devvm's holds
it. No VM is ever bound to it: devvm secret use refuses (secret_host_only) and
secrets.Names drops it. A new VM and a VM's proxy refuse to start while it
isn't saved (proxy_password_missing, netpolicy.Proxy.Upstream).

A start whose VM's proxy last ran with an upstream and now has none warns
(upstream_proxy_gone), naming config.toml, with a doc link.

- settings.HostProxy: the environment's, else config.toml's; used by
  netpolicy, Lima's build proxy (buildUpstream) and devvm doctor's CA hint.
- proxy.Upstream.Secret, proxy.UpstreamSecret; secrets.Secret.HostOnly;
  secrets.Token keeps spaces inside the proxy password.
- Messages: proxy_password_in_config, proxy_password_missing,
  upstream_proxy_gone, secret_host_only, proxy_password_howto,
  password_prompt (answered by --stdin).
- Tests: TestHostProxy, TestUpstreamSecret, TestPrepareUpstreamConfig,
  TestBuildUpstreamConfig, config.toml refusals, the warning in
  TestPrepareUpstream, company_proxy.txtar, secret.txtar and ca.txtar cases.
- Docs: troubleshooting's Behind a company proxy, network policy's Behind a
  company proxy and secrets, config.toml's reference, How it works.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 01:10:36 -07:00
..