Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add support for the proxyjump key#5805

Merged
swissspidy merged 3 commits into
wp-cli:mainwp-cli/wp-cli:mainfrom
Mike-Hermans:alias-add-proxyjump-supportMike-Hermans/wp-cli:alias-add-proxyjump-supportCopy head branch name to clipboard
Aug 30, 2023
Merged

Add support for the proxyjump key#5805
swissspidy merged 3 commits into
wp-cli:mainwp-cli/wp-cli:mainfrom
Mike-Hermans:alias-add-proxyjump-supportMike-Hermans/wp-cli:alias-add-proxyjump-supportCopy head branch name to clipboard

Conversation

@NielsdeBlaauw

Copy link
Copy Markdown
Contributor

SSH has the capability to route traffic through a proxy. This is done using the -J xxx argument. The ProxyJump can be used for security purposes by limiting access to remote servers to specific IP addresses.

Previously it had to use wp-cli with a proxy in between. The only somewhat practical way was adding it to your personal ~/.ssh/config:

Host production
  HostName xxx.xxx.xxx.xxx
  ProxyCommand ssh -q -W %h:22 vagrant

But this is technical and has to be done on every single machine in a team of multiple contributors.

This PR adds an option proxyjump to the alias specification so the wp-cli.yml config file can specify a comon proxy for all traffic to go through.

The change also includes a fix for the key attribute. It was part of the options for vagrant but did not seem possible for regular SSH commands, even though is can be usefull.

@NielsdeBlaauw NielsdeBlaauw requested a review from a team as a code owner June 8, 2023 12:57
Comment thread php/WP_CLI/Runner.php Outdated
Co-authored-by: Niels de Blaauw <niels.de.blaauw@gmail.com>
@schlessera schlessera added this to the 2.9.0 milestone Jun 8, 2023
@Mike-Hermans

Copy link
Copy Markdown
Contributor

HI @schlessera, I've updated the tests so they work with the escaped shell args we use.

@swissspidy swissspidy merged commit b6ab667 into wp-cli:main Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.