forked from qt-creator/qt-creator
Ssh: Implement tcp/ip forward tunneling
Change-Id: I529b3392ea7e4cbae2c736c9f55352ef6b19da98 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "../remoteprocess/argumentscollector.h"
|
||||
#include "tunnel.h"
|
||||
#include "directtunnel.h"
|
||||
#include "forwardtunnel.h"
|
||||
|
||||
#include <ssh/sshconnection.h>
|
||||
|
||||
@@ -44,7 +45,15 @@ int main(int argc, char *argv[])
|
||||
parameters.host = QLatin1String("127.0.0.1");
|
||||
if (!parseSuccess)
|
||||
return EXIT_FAILURE;
|
||||
Tunnel tunnel(parameters);
|
||||
tunnel.run();
|
||||
|
||||
DirectTunnel direct(parameters);
|
||||
|
||||
parameters.host = QLatin1String("127.0.0.2");
|
||||
ForwardTunnel forward(parameters);
|
||||
forward.run();
|
||||
|
||||
QObject::connect(&forward, &ForwardTunnel::finished, &direct, &DirectTunnel::run);
|
||||
QObject::connect(&direct, &DirectTunnel::finished, &app, &QCoreApplication::exit);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user