feat: configure the upstream proxy once for all compute drivers

Offen
#5,933 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust

Rechercherichtung

Start by reading the supervisor network config definition behind [openshell.supervisor.network] and the precedent set by additional_ca_bundle, which moved there already. Then grep for https_proxy, no_proxy and proxy_auth_file to find where each driver table parses and validates its own copy, and trace how the gateway fills the Configure message sent to launched drivers. Work out where the shared block is validated once and where per-driver aliases get mapped with a deprecation warning plus a conflict error, then wire the same path into config preflight. Done means the four acceptance criteria hold for the VM, Podman and Docker drivers, including the both-locations-disagree failure.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Rust
Sterne
21.5k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NVIDIA/OpenShell

Alle Issues in NVIDIA/OpenShell

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.