SSH: Implement tunneling.

This is the "direct-tcpip" port forwarding
specified in RFC 4254.

Change-Id: I1ffa2e923b4479c7211b1b4304e66895b565fb64
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Christian Kandeler
2012-06-19 13:03:48 +02:00
parent a57b4cf93e
commit edcf76613b
27 changed files with 1022 additions and 43 deletions

View File

@@ -32,6 +32,8 @@
#include "sftpchannel.h"
#include "sftpchannel_p.h"
#include "sshdirecttcpiptunnel.h"
#include "sshdirecttcpiptunnel_p.h"
#include "sshincomingpacket_p.h"
#include "sshremoteprocess.h"
#include "sshremoteprocess_p.h"
@@ -168,6 +170,15 @@ QSsh::SftpChannel::Ptr SshChannelManager::createSftpChannel()
return sftp;
}
SshDirectTcpIpTunnel::Ptr SshChannelManager::createTunnel(quint16 remotePort,
const SshConnectionInfo &connectionInfo)
{
SshDirectTcpIpTunnel::Ptr tunnel(new SshDirectTcpIpTunnel(m_nextLocalChannelId++, remotePort,
connectionInfo, m_sendFacility));
insertChannel(tunnel->d, tunnel);
return tunnel;
}
void SshChannelManager::insertChannel(AbstractSshChannel *priv,
const QSharedPointer<QObject> &pub)
{