Skip to content

feat: configure the upstream proxy once for all compute drivers #5933

Backlog

Description

@elezar

User Story

I run OpenShell sandboxes behind a corporate proxy with more than one compute driver. I want to set the proxy once, so that switching drivers or relying on auto-detection doesn't mean copying proxy settings between driver tables.

Problem Statement

The upstream proxy settings (https_proxy, no_proxy, proxy_auth_file, proxy_auth_allow_insecure, proxy_connect_by_hostname, proxy_ca_bundle) are repeated in each [openshell.drivers.<name>] table. They describe how every sandbox supervisor reaches the outside, regardless of backend, yet each driver owns its own copy of the keys and its own validation.

Impact / Why This Matters

An operator who may end up on Podman, Docker, or the VM driver, for example through auto-detection, must keep three tables in sync. A missed copy silently leaves one backend without the proxy. The settings also differ from the destination CA, which is already configured once.

Proposed Design

Add a proxy block under [openshell.supervisor.network], next to the additional destination CA. The gateway validates it once and sends it to launched drivers in Configure, the same way it sends destination trust. The per-driver keys keep working as deprecated aliases: the gateway maps them onto the shared block with a warning, and reports a clear error when both locations are set and disagree. Drivers stop validating proxy settings themselves.

Suggested UX (if applicable)

[openshell.supervisor.network]
https_proxy = "http://proxy.corp.example:3128"
no_proxy    = "10.0.0.0/8,*.svc.cluster.local"

[openshell.drivers.podman]
# https_proxy = "..."   # deprecated: warns and is mapped to the block above

Acceptance Criteria

  • A proxy configured once under [openshell.supervisor.network] applies to the VM, Podman, and Docker drivers.
  • Existing per-driver proxy keys keep working and log a deprecation warning.
  • Setting different values in both places fails startup and config preflight with an error naming both keys.
  • config preflight validates the shared block without starting a driver.

Alternatives Considered

Keep the keys per driver, which is the current behavior and requires repeating them. A gateway-wide environment variable avoids the repetition but loses the validation and the documented config surface. Compare how additional_ca_bundle moved to [openshell.supervisor.network]; this follows the same path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions