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

High level local forward API #256

Closed
tmds opened this issue Nov 29, 2024 · 0 comments · Fixed by #258
Closed

High level local forward API #256

tmds opened this issue Nov 29, 2024 · 0 comments · Fixed by #258

Comments

@tmds
Copy link
Owner

tmds commented Nov 29, 2024

API proposal:

class SshClient
{
    // Starts a local server that accepts connections on bindEndpoint and forwards through the SSH connection to 'host:port'.
    // The forward is stopped if the connection is closed, or the returned instance gets Disposed.
    // BindEndpoint can be an IPEndPoint or a UnixDomainSocketEndPoint.
    Task<LocalForward> StartForwardTcpAsync(EndPoint bindEndpoint, string remoteHost, int remotePort, CancellationToken cancellationToken);
    Task<LocalForward> StartForwardUnixAsync(EndPoint bindEndpoint, string remotePath, CancellationToken cancellationToken);
}
class LocalForward : IDisposable
{
    EndPoint ServerEndPoint { get; }
}
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 a pull request may close this issue.

1 participant