Hi everyone,

Here is my third version of TCP forwarding. The server side is more or
less ready, but nothing is on the client side yet.

I process the following messages:

SSH_MSG_GLOBAL_REQUEST - "tcpip-forward", upon receipt of this message, I
add an entry to the tcp_forwards list of ssh_connection, and open a
listening fd. The list contains instances of forwarded_tcpip class.

SSH_MSG_GLOBAL_REQUEST - "cancel-tcpip-forward", delete an entry from the
above list, and close the listening fd.

When a new connection is accepted from the above listening fd's, it is
opened, but the client is not notified yet. (do_tcpip_accepted()) Here we
should open a new channel to the client side. (server side is ok)

A new channel type "direct-tcp" is supported, when such is opened lshd
connects to the given host, and forwards traffic between the channel and
the connection. This should be quite complete.

What needs to be done:
- client side
- accepted connection should open a channel
- I am not sure I have error handling all right at all places.

--- Bazsi

tcpforward-0.3.diff.gz

Reply via email to