Account proxy and VPN routes
Each Claude or Codex account profile can select its own upstream network route. Open Accounts, select the account row, and press n (or click Account proxy / VPN route) in either the native application or web application. The same React editor serves both applications. Account display-name editing uses Shift+N, keeping it separate from the network route shortcut. A selected session row uses its own n rename action.
The editor discovers installed network adapters. Choose Edit route, choose an adapter, enter a label and a credential-free endpoint, then enter the proxy username and password. Both credential fields are masked. Leaving both fields blank preserves previously saved credentials. Clear saved proxy credentials removes the saved authentication value; Clear route selects direct egress for future provider processes and removes the controller's saved credentials. Use Test route and select an owned, running workspace to test the provider's TLS endpoint. Arrow keys select an item, Enter continues/applies, and Esc closes.
Available adapter packages:
| Package | Adapter ID | Endpoint | Behavior |
|---|---|---|---|
@devctl/provider-network-http |
http-proxy |
http://proxy.example:8080 or https://proxy.example:8443 |
HTTP CONNECT, with optional Basic authentication; HTTPS verifies the proxy certificate. |
@devctl/provider-network-socks |
socks5-proxy |
socks5://proxy.example:1080 |
SOCKS5 CONNECT, optional username/password authentication, destination IPv4 pinned by the policy gateway. |
@devctl/provider-network-vpn-gateway |
vpn-gateway |
An existing HTTP(S) CONNECT endpoint | Uses an already provisioned gateway whose outbound connection traverses its own isolated VPN. |
The VPN adapter does not install WireGuard/OpenVPN, accept configuration archives,
create a TUN device, grant NET_ADMIN, or change host/project/global routing.
Provision the isolated VPN gateway separately. Its availability and VPN tunnel
state remain the gateway operator's responsibility. A failed gateway connection
does not trigger a direct fallback.
Enforcement and process changes
Account routing requires the isolated workspace policy gateway described in Workspace Internet access, with rootful Docker Engine 28+ or Rootless Docker 29.9.1+ and the controlled internal network. A configured upstream cannot run in an unrestricted or legacy workspace: explicitly rebuild that workspace with the restricted policy first. Direct accounts continue to work in existing legacy or explicitly unrestricted workspaces.
An older restricted gateway also retains its deployed code and static proxy behavior while provider processes are running. Direct launches and existing attachments keep working, with their process route reported as unverified. New upstream routes require account capability support and the selected adapter in the deployed gateway bundle. If either is missing, launch/probe requests fail before writing route credentials or reporting an applied generation. Explicitly stop the Project, then start/recreate it to upgrade the gateway; a host update or background policy reconciliation never performs that transition.
The account CLI receives an ephemeral capability for devctl-egress:3128, not
the upstream endpoint or upstream password. The trusted gateway resolves and
checks every destination against the workspace allowlist, public IPv4 checks,
port 80/443 limits, and TLS SNI. Only then does the installed adapter establish
the upstream connection to the pinned destination IP. HTTP proxy authentication
is stripped before the destination request. Official provider API/auth/WebSocket hosts require an
account capability; removing proxy authentication cannot obtain an anonymous
direct route. The mandatory installer host downloads.claude.ai also remains available to
workspace toolchain operations without an account capability; a managed CLI
with a capability still chains its download requests. Ordinary additional
allowed hosts retain their workspace policy.
Routes are account-specific even when accounts share the same Project container. Shared subscription account aliases have their own network configuration and capabilities. The controller checks account/workspace ownership before supplying route material to a host. One tenant cannot test or obtain another tenant's account route through the same execution host.
Every edit advances a route generation. A working provider process retains its immutable generation; saving or clearing a route never kills or restarts it. The Accounts view reports the applied route and pending restart when the saved generation differs. Explicitly stop and resume the session to apply the new route. Missing observations are shown as process route unverified. CLI account verification and usage probes expose the generation supplied to that probe; a fresh probe may use the newly saved route while a working session continues using its previous one. Stale test results cannot mark a newer route healthy. Old runtime generations are retained until explicit workspace/project deletion so running processes can continue making connections with their original route.
The protected proxy environment reaches the complete managed CLI process, including initial authentication, token/API requests, provider WebSocket connections, resumed conversations, detached tmux sessions, and autonomous managed-session launches. Official Claude browser-login/status/usage helpers and Codex app-server account/rate-limit probes receive the same account route. Claude status-line quota telemetry records its process's applied route generation. A client or CLI transport that ignores the proxy is blocked by the isolated network; routing does not grant a direct network escape.
Browser sign-in pages opened on the user's own device use that browser's network. Their associated CLI token exchange uses the account route. Host-agent bootstrap/Git/build work, host-side MCP brokers, cloud execution performed by a provider, operator compute commands, and manually started unmanaged CLIs are outside this account routing feature. Workspace allowlist rules still apply to CLI plugins/MCP traffic. No claim is made that devctl controls a remote proxy's own implementation or provider-side execution.
Credentials and provider extensions
The controller saves credentials as AES-256-GCM encrypted secret values. Account records, state snapshots, durable commands, labels, UI, and audits contain only credential-free endpoint metadata and a configured flag. Reserved account network secrets cannot be granted to Project containers.
The authenticated host obtains transient material for one owned account and
workspace. Its host-private egress/<workspace-sha256>/account-routes.json is
mode 0400, owned by the sidecar's unprivileged UID, and mounted only into that
trusted sidecar. Project containers and account homes do not mount this path.
Session capability state files are mode 0600. Upstream credentials are not
included in provider environment variables, process arguments, container image
configuration, or project/session files. Shared repository launches whitelist
environment names through a Node wrapper; credential values are not placed in
env -i arguments visible through process listings.
Standard Docker image commit/export omits these host bind mounts. Controller transfer explicitly exports the controller database and private keys, retaining encrypted controller credential storage; it does not archive the host's egress directory. Any operator-created full host backup must protect/exclude that runtime directory itself. Clearing controller credentials does not revoke the old immutable runtime route of an already-working process.
Adapters are optional packages discovered through @devctl/provider-registry
with manifest kind: "accountNetwork", API version 1. Each exports a manifest
with id, displayName, and protocols, and createProvider(), whose connect
method receives transient upstream material and a gateway-checked {host,port}
target and returns a connected net.Socket. @devctl/network-provider-kit
provides common endpoint parsing and bounded protocol reads. The core gateway
does not contain HTTP/SOCKS/VPN-specific dispatch branches.
API and fixture shape
Authenticated account owners can use:
| Method | Route | Purpose |
|---|---|---|
| GET | /v1/accounts/network/providers |
Discover installed adapters. |
| PUT | /v1/accounts/:accountId/network |
Save endpoint/profile and optional credentials. |
| DELETE | /v1/accounts/:accountId/network |
Save direct mode for future processes. |
| POST | /v1/accounts/:accountId/network/test |
Queue a test with { "workspaceId": "..." }. |
Example save body (send credentials in the authenticated request body, never in the URL or command arguments):
{
"providerId": "http-proxy",
"endpoint": "https://proxy.example:8443/",
"label": "Europe",
"credentials": { "username": "example-user", "password": "example-password" }
}
Omit credentials to retain the saved value, or send null to clear it. Public
AccountProfile.networkRoute metadata has providerId, endpoint, label,
generation, credentialsConfigured, updatedAt, and optional health with
host/workspace/generation/status/time/message. networkRouteGeneration advances
for direct mode too. Session.accountNetworkGeneration and
Session.accountNetworkRoute record the process's applied metadata;
AccountPresence.accountNetworkGeneration and UsageSnapshot.accountNetworkGeneration
identify the collector's route. No fixture should add passwords or runtime
capability tokens to these public objects.
Host-only material uses
GET /v1/agents/:id/workspaces/:workspaceId/accounts/:accountId/network.
Hosts report applied metadata using
POST /v1/agents/:id/workspaces/:workspaceId/sessions/:sessionName/network.
Both validate the authenticated execution host and owned resource identities.
Verification and provider references
Run the local protocol and UI/controller/runtime fixtures:
pnpm --filter @devctl/controller exec vitest run src/account-network.test.ts
pnpm --filter @devctl/runtime exec vitest run src/account-network.test.ts src/account-login.test.ts src/terminal-reattach.test.ts
pnpm --filter @devctl/tui exec vitest run src/account-network.test.tsx src/account-network-dom.test.tsx
node --test docker/account-network-proxy.test.mjs docker/workspace-egress-proxy.test.mjs packages/provider-network-http/index.test.mjs packages/provider-network-socks/index.test.mjs
Fixtures use local HTTP/SOCKS upstreams, a generated local TLS certificate, real Node 24 environment-proxy fetch, OAuth/API/usage paths, a TLS WebSocket upgrade, authentication failure, upstream unavailability, SNI mismatch, and the existing allowlist/DNS denial tests. They also verify encryption, tenant ownership, credential masking, generation changes, secret-free process arguments, and unchanged live sessions. They make no paid or production provider calls. These fixtures establish devctl's transport/probe integration; the actual installed Claude/Codex version must still use its configured HTTP proxy for each supported transport. The workspace boundary blocks transports that attempt direct egress.
Claude network configuration documents HTTP(S) proxies, Basic authentication, startup environment behavior, and the lack of native SOCKS support. The SOCKS adapter converts the account's trusted HTTP gateway connection to SOCKS upstream. Official Codex configuration and CLI reference describe native configuration and app-server/login boundaries. This feature is a network proxy chain, and leaves subscription authentication and official provider endpoints intact.