Ticket #157 (closed enhancement: fixed)

Opened 8 years ago

Last modified 7 years ago

Port Forwarding

Reported by: flxkid Owned by:
Priority: normal Milestone:
Component: examples Version: 1.2.3
Keywords: Cc: flxkid
Blocked By: Blocks:

Description

I need to use libssh2 for port forwarding, but I'm having some trouble understanding various pieces of the puzzle. For instance, using PuTTY plink, There is the remote port to listen on, but also the local port that traffic should be sent to. Is it the developers responsibility to do this part? Can an example be developed of this? Also, for the opposite, where a remote port is brought to a local port, do I use libssh2_channel_direct_tcpip_ex? What about an example of this? I really need to do this exact thing on a project right now. How hard would it be to develop a couple of samples of this? I'm willing to put up a bounty if need be to get a couple of working examples of this.

Change History

comment:1 Changed 7 years ago by stuge

  • Component set to examples
  • Resolution set to fixed
  • Status changed from new to closed
  • Version set to 1.2.3

Remember that this is a issue tracker and not a support forum - it's best to use the mailing list for discussion. Thanks!

Yes, the application side of forwarded-tcpip and direct-tcpip channels is handled completely within the application. It can do whatever it wants.

Have a look at examples/direct_tcpip.c for a demonstration of how direct-tcpip channels can be used to implement local port forwarding.

Feel free to send me that bounty kthx. :)

Note: See TracTickets for help on using tickets.