Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate PowerShell Script for Stable and Fast Communication with Windows OpenSSH ssh-agent from WSL2 #54

Merged
merged 21 commits into from
Oct 5, 2024

Conversation

masahide
Copy link
Owner

@masahide masahide commented Aug 25, 2024

The primary focus of this pull request is the integration of a PowerShell script to enable stable and fast communication between the WSL2 environment and the Windows OpenSSH ssh-agent. This significant change has led to several other related updates and improvements:

  1. PowerShell Script Integration:

    • Introduced a new PowerShell script pwsh.ps1, embedded within the Go script, which handles packet reading, writing, and interaction with the named pipe client stream for communication with the Windows OpenSSH ssh-agent. This integration is crucial for ensuring reliable and efficient communication from WSL2.
  2. New Go Script:

    • Added a new Go script main.go under cmd/wsl2-ssh-agent-proxy/. This script manages the core logic for the WSL2 SSH Agent Proxy, including socket handling, packet multiplexing, and the integrated PowerShell script execution.
  3. GitHub Actions Workflow:

    • Updated the GitHub Actions workflow to use the latest versions of various actions, such as actions/upload-artifact@v4, actions/checkout@v4, actions/setup-go@v5, and actions/download-artifact@v4.
    • Added a new job build-wsl2-ssh-agent-proxy to build the WSL2 SSH Agent Proxy. This job compiles the Go code for the WSL2 SSH Agent Proxy and compresses the output for later use.
  4. Release Process:

    • Updated the release process to include artifacts generated by the new build job build-wsl2-ssh-agent-proxy.

These changes collectively enhance the project’s ability to facilitate a more robust and high-performance communication channel between WSL2 and the Windows OpenSSH ssh-agent, improving the overall user experience in such environments.

@masahide
Copy link
Owner Author

This change is to address issue #52.

@masahide
Copy link
Owner Author

The wsl2-ssh-agent-proxy is an alternative to socat and omni-socat, serving as an ssh-agent proxy that runs persistently on the WSL2 side.

@masahide masahide marked this pull request as draft August 25, 2024 13:55
@masahide masahide marked this pull request as ready for review September 7, 2024 11:55
@masahide masahide merged commit 244cd1a into main Oct 5, 2024
4 checks passed
@masahide masahide deleted the wsl2-ssh-agent-proxy branch October 5, 2024 12:28
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