This repository was archived by the owner on Apr 5, 2018. It is now read-only.
Add support for remote port forwarding#32
Open
tlrobinson wants to merge 4 commits intorvagg:masterfrom
Open
Conversation
…on fault. Fixes #31
Not particularly useful since calling asynchronously causes it to crash due to the message being deallocated too soon.
Owner
|
Lots of libssh is still magic to me so these kinds of problems still throw me, perhaps you could have a look at the current libssh, if upgrading our dep helps then great, or perhaps a bug report to the libssh developers to get something manageable would help. Happy to take this PR whenever you think it's ready. Will also add you as a collaborator if you're keen to keep contributing. |
Owner
|
I'd love to merge this if anybody has time to figure out how to make it more solid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for remote port forwarding, e.x.
ssh -R :REMOTE_PORT:localhost:LOCAL_PORT me@myserverIt mostly works, except for communicating the port back to the client with
replyGlobalMessageSuccessdoesn't work asynchronously, and in fact will often segfault. This is due to the message being deallocated by libssh before we get a chance to send the response. Also, I believe libssh sends a success reply if you don't send one right away.I'd love suggestions on how to fix this. I've tried a few things with little success.
Here's an example server (CoffeeScript):