3#include <QLoggingCategory> 
    6#include "ChannelSSHTunnelForward.h" 
    7#include "SSHTunnelThread.h" 
    9static Q_LOGGING_CATEGORY(log, 
"SSH.Tunnel.Thread")
 
   15    m_pParameter(parameter),
 
   18    qDebug(log) << 
"CSSHTunnelThread::CSSHTunnelThread";
 
   20    check = connect(
this, SIGNAL(finished()), 
this, SLOT(deleteLater()));
 
   24CSSHTunnelThread::~CSSHTunnelThread()
 
   26    qDebug(log) << 
"CSSHTunnelThread::~CSSHTunnelThread";
 
   29void CSSHTunnelThread::Exit()
 
   34void CSSHTunnelThread::run()
 
   37    qDebug(log) << 
"CSSHTunnelThread run";
 
   39        m_pParameter, m_pRemoteNet, m_pBackend);
 
   44        bool check = connect(p, SIGNAL(
sigServer(QString, quint16)),
 
   45                             this, SIGNAL(
sigServer(QString, quint16)));
 
   47        check = connect(p, SIGNAL(
sigServer(QString)),
 
   50        check = connect(p, SIGNAL(sigError(
int,QString)), 
this,
 
   51                        SIGNAL(sigError(
int,QString)));
 
   54        if(!p->
open(QIODevice::ReadWrite)) {
 
   56                tr(
"Error"), p->errorString(), QMessageBox::Critical);
 
   60        while (!m_bExit && nRet >= 0) {
 
   63                qCritical(log) << 
"Process fail" << p->errorString();
 
   72        emit sigError(nRet, p->errorString());
 
   77    qDebug(log) << 
"CSSHTunnelThread end";
 
void sigShowMessageBox(const QString &szTitle, const QString &szMessage, const QMessageBox::Icon &icon=QMessageBox::Information)
Trigger the display of a message dialog (QMessageBox) in the main thread from a background thread wit...
Includes SSH tunneling and a local socket service for forwarding data.
virtual bool open(OpenMode mode) override
Basic network parameters.
Data is forwarded over a local socket and SSH tunnel.
void sigServer(QString szHost, quint16 nPort)
It is triggered when the socket service establishes a listener and is used to notify other local sock...