WithProxy. Proxy protocols are mutually exclusive.
See Proxy for routing behavior, security considerations, and limits.
Outbound proxies are local-only. Cloud sandbox creation rejects this setting.
Typical flow
Functions
m.WithProxy()
Parameters
proxy*OutboundProxyProtocol-specific outbound proxy configuration.
m.SOCKS4Proxy()
IP:port for WithProxy. Pass SOCKS4ProxyOptions{UserID: "sandbox"} to include the optional SOCKS4 user ID. It must contain 1–255 bytes and no null byte; it is an identifier, not a password.
m.SOCKS5Proxy()
IP:port for WithProxy.
(*OutboundProxy).Credentials()
SOCKS5Proxy and pass SecretSourceEnv("SOCKS5_PASSWORD") as password.
The host environment variable is read once each time the sandbox starts. Changing it affects the next start, not a sandbox that is already running. ConfigJSON() and the database contain the source reference but never the resolved password. The username and resolved password must each contain 1–255 bytes.
m.SecretSourceEnv()
OutboundProxy
Opaque outbound proxy configuration constructed with a protocol-specific function. Pass it toWithProxy.
SecretSource
Opaque host-side secret source constructed withSecretSourceEnv. Durable configuration contains this source reference, not the resolved password.