Skip to content

util/proxy: allow overriding LG_PROXY from the environment config#1899

Open
saschahauer wants to merge 1 commit into
labgrid-project:masterfrom
saschahauer:lg-proxy
Open

util/proxy: allow overriding LG_PROXY from the environment config#1899
saschahauer wants to merge 1 commit into
labgrid-project:masterfrom
saschahauer:lg-proxy

Conversation

@saschahauer

Copy link
Copy Markdown
Contributor

The coordinator_address can already be set in the environment config, overriding the LG_COORDINATOR environment variable. But LG_COORDINATOR is only one part of the connection settings needed to reach a coordinator: the LG_PROXY variable, used to tunnel that connection over SSH, had no config counterpart and could only be set from the environment or the --proxy command line argument.

Add a 'proxy' option to the environment config that overrides LG_PROXY, mirroring coordinator_address. The precedence is --proxy command line argument > 'proxy' config option > LG_PROXY environment variable.

A present but empty/false 'proxy' option forces a direct connection without a proxy, even when LG_PROXY is set, which previously was not possible at all.

Assisted-by: Claude Opus 4.8

Description

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

The coordinator_address can already be set in the environment config,
overriding the LG_COORDINATOR environment variable. But LG_COORDINATOR
is only one part of the connection settings needed to reach a
coordinator: the LG_PROXY variable, used to tunnel that connection over
SSH, had no config counterpart and could only be set from the
environment or the --proxy command line argument.

Add a 'proxy' option to the environment config that overrides LG_PROXY,
mirroring coordinator_address. The precedence is --proxy command line
argument > 'proxy' config option > LG_PROXY environment variable.

A present but empty/false 'proxy' option forces a direct connection
without a proxy, even when LG_PROXY is set, which previously was not
possible at all.

Assisted-by: Claude Opus 4.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant