Qt 4.8
|
#include "qsocks5socketengine_p.h"
#include "qtcpsocket.h"
#include "qudpsocket.h"
#include "qtcpserver.h"
#include "qdebug.h"
#include "qhash.h"
#include "qqueue.h"
#include "qelapsedtimer.h"
#include "qmutex.h"
#include "qthread.h"
#include "qcoreapplication.h"
#include "qurl.h"
#include "qauthenticator.h"
#include <qendian.h>
#include <qnetworkinterface.h>
Go to the source code of this file.
Classes | |
struct | QSocks5BindData |
class | QSocks5BindStore |
struct | QSocks5ConnectData |
struct | QSocks5Data |
struct | QSocks5RevivedDatagram |
struct | QSocks5UdpAssociateData |
Macros | |
#define | MAX_DATA_DUMP 256 |
#define | Q_INIT_CHECK(returnValue) |
#define | QSOCKS5_D_DEBUG if (0) qDebug() |
#define | QSOCKS5_DEBUG if (0) qDebug() |
#define | QSOCKS5_Q_DEBUG if (0) qDebug() |
#define | S5_AUTHMETHOD_NONE 0x00 |
#define | S5_AUTHMETHOD_NOTACCEPTABLE 0xFF |
#define | S5_AUTHMETHOD_PASSWORD 0x02 |
#define | S5_BIND 0x02 |
#define | S5_CONNECT 0x01 |
#define | S5_DOMAINNAME 0x03 |
#define | S5_IP_V4 0x01 |
#define | S5_IP_V6 0x04 |
#define | S5_PASSWORDAUTH_VERSION 0x01 |
#define | S5_R_ERROR_ADD_TYPE_NOT_SUPORTED 0x08 |
#define | S5_R_ERROR_CMD_NOT_SUPPORTED 0x07 |
#define | S5_R_ERROR_CON_NOT_ALLOWED 0x02 |
#define | S5_R_ERROR_CONN_REFUSED 0x05 |
#define | S5_R_ERROR_HOST_UNREACH 0x04 |
#define | S5_R_ERROR_NET_UNREACH 0x03 |
#define | S5_R_ERROR_SOCKS_FAILURE 0x01 |
#define | S5_R_ERROR_TTL 0x06 |
#define | S5_SUCCESS 0x00 |
#define | S5_UDP_ASSOCIATE 0x03 |
#define | S5_VERSION_5 0x05 |
#define | SOCKS5_BLOCKING_BIND_TIMEOUT 10000 |
Functions | |
static QString | dump (const QByteArray &) |
static bool | qt_socks5_get_host_address_and_port (const QByteArray &buf, QHostAddress *pAddress, quint16 *pPort, int *pPos) |
static bool | qt_socks5_set_host_address_and_port (const QHostAddress &address, quint16 port, QByteArray *pBuf) |
static bool | qt_socks5_set_host_name_and_port (const QString &hostname, quint16 port, QByteArray *pBuf) |
static int | qt_timeout_value (int msecs, int elapsed) |
Variables | |
static QBasicAtomicInt | descriptorCounter = Q_BASIC_ATOMIC_INITIALIZER(1) |
static const int | MaxWriteBufferSize = 128*1024 |
static QString | s5StateToString (QSocks5SocketEnginePrivate::Socks5State) |
#define MAX_DATA_DUMP 256 |
Definition at line 71 of file qsocks5socketengine.cpp.
#define Q_INIT_CHECK | ( | returnValue | ) |
Definition at line 78 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEngine::hasPendingDatagrams().
Definition at line 149 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::_q_controlSocketDisconnected(), QSocks5SocketEnginePrivate::_q_controlSocketError(), QSocks5SocketEnginePrivate::_q_controlSocketReadNotification(), QSocks5SocketEnginePrivate::_q_controlSocketStateChanged(), QSocks5SocketEnginePrivate::_q_emitPendingConnectionNotification(), QSocks5SocketEnginePrivate::_q_emitPendingReadNotification(), QSocks5SocketEnginePrivate::_q_emitPendingWriteNotification(), QSocks5SocketEnginePrivate::_q_udpSocketReadNotification(), QSocks5SocketEnginePrivate::emitConnectionNotification(), QSocks5SocketEnginePrivate::emitReadNotification(), QSocks5SocketEnginePrivate::emitWriteNotification(), QSocks5SocketEnginePrivate::initialize(), and QSocks5SocketEnginePrivate::parseAuthenticationMethodReply().
Definition at line 147 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::_q_controlSocketBytesWritten(), QSocks5SocketEnginePrivate::_q_controlSocketConnected(), QSocks5SocketEnginePrivate::_q_controlSocketReadNotification(), QSocks5SocketEnginePrivate::_q_udpSocketReadNotification(), QSocks5SocketEngine::bind(), QSocks5SocketEngine::connectToHost(), QSocks5SocketEngineHandler::createSocketEngine(), QSocks5SocketEnginePrivate::parseRequestMethodReply(), qt_socks5_get_host_address_and_port(), qt_socks5_set_host_address_and_port(), qt_socks5_set_host_name_and_port(), QSocks5SocketEngine::read(), QSocks5SocketEnginePrivate::reauthenticate(), QSocks5BindStore::retrieve(), QSocks5SocketEnginePrivate::sendRequestMethod(), QSocks5BindStore::timerEvent(), QSocks5SocketEngine::waitForRead(), QSocks5SocketEngine::waitForWrite(), and QSocks5SocketEngine::writeDatagram().
Definition at line 148 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEngine::accept(), QSocks5SocketEngine::bind(), QSocks5SocketEngine::close(), QSocks5SocketEngine::initialize(), QSocks5SocketEngine::listen(), QSocks5SocketEngine::read(), QSocks5SocketEngine::setReadNotificationEnabled(), and QSocks5SocketEngine::write().
#define S5_AUTHMETHOD_NONE 0x00 |
Definition at line 100 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::parseAuthenticationMethodReply().
#define S5_AUTHMETHOD_NOTACCEPTABLE 0xFF |
Definition at line 102 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::parseAuthenticationMethodReply().
#define S5_AUTHMETHOD_PASSWORD 0x02 |
Definition at line 101 of file qsocks5socketengine.cpp.
#define S5_BIND 0x02 |
Definition at line 85 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::sendRequestMethod().
#define S5_CONNECT 0x01 |
Definition at line 84 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::sendRequestMethod().
#define S5_DOMAINNAME 0x03 |
Definition at line 88 of file qsocks5socketengine.cpp.
Referenced by qt_socks5_get_host_address_and_port(), and qt_socks5_set_host_name_and_port().
#define S5_IP_V4 0x01 |
Definition at line 87 of file qsocks5socketengine.cpp.
Referenced by qt_socks5_get_host_address_and_port(), and qt_socks5_set_host_address_and_port().
#define S5_IP_V6 0x04 |
Definition at line 89 of file qsocks5socketengine.cpp.
Referenced by qt_socks5_get_host_address_and_port(), and qt_socks5_set_host_address_and_port().
#define S5_PASSWORDAUTH_VERSION 0x01 |
Definition at line 104 of file qsocks5socketengine.cpp.
Referenced by QSocks5PasswordAuthenticator::beginAuthenticate(), and QSocks5PasswordAuthenticator::continueAuthenticate().
#define S5_R_ERROR_ADD_TYPE_NOT_SUPORTED 0x08 |
Definition at line 98 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_CMD_NOT_SUPPORTED 0x07 |
Definition at line 97 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_CON_NOT_ALLOWED 0x02 |
Definition at line 92 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_CONN_REFUSED 0x05 |
Definition at line 95 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_HOST_UNREACH 0x04 |
Definition at line 94 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_NET_UNREACH 0x03 |
Definition at line 93 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_SOCKS_FAILURE 0x01 |
Definition at line 91 of file qsocks5socketengine.cpp.
#define S5_R_ERROR_TTL 0x06 |
Definition at line 96 of file qsocks5socketengine.cpp.
#define S5_SUCCESS 0x00 |
Definition at line 90 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::parseRequestMethodReply().
#define S5_UDP_ASSOCIATE 0x03 |
Definition at line 86 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::sendRequestMethod().
#define S5_VERSION_5 0x05 |
#define SOCKS5_BLOCKING_BIND_TIMEOUT 10000 |
Definition at line 75 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEngine::bind().
|
inlinestatic |
Definition at line 152 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::_q_controlSocketReadNotification(), QSocks5SocketEnginePrivate::_q_udpSocketReadNotification(), QGraphicsLinearLayout::addStretch(), QRegExpEngine::captureCount(), QRegExpEngine::Box::clear(), QHashData::destroyAndFree(), QMap< int, QFrameInfo >::empty(), QHash< QExplicitlySharedDataPointer, QHash >::empty(), QRegExpCharClass::firstOccurrence(), QGridLayoutItem::layoutItem(), QMapData::node_delete(), QContiguousCache< T >::normalizeIndexes(), QSocks5SocketEnginePrivate::parseRequestMethodReply(), QGridLayoutBox::QGridLayoutBox(), QGridLayoutRowInfo::QGridLayoutRowInfo(), QSocks5SocketEngine::read(), QGridLayoutEngine::removeRows(), QFormLayout::resetLabelAlignment(), QSocks5SocketEnginePrivate::sendRequestMethod(), AnchorData::updateChildrenSizes(), QSocks5SocketEngine::write(), and QSocks5SocketEngine::writeDatagram().
|
static |
Definition at line 222 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::_q_udpSocketReadNotification(), and QSocks5SocketEnginePrivate::parseRequestMethodReply().
|
static |
Definition at line 159 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::sendRequestMethod(), and QSocks5SocketEngine::writeDatagram().
|
static |
Definition at line 192 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::sendRequestMethod().
|
static |
Definition at line 286 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEngine::bind(), QSocks5SocketEngine::close(), QSocks5SocketEnginePrivate::waitForConnected(), QSocks5SocketEngine::waitForRead(), and QSocks5SocketEngine::waitForWrite().
|
static |
Definition at line 1011 of file qsocks5socketengine.cpp.
|
static |
Definition at line 66 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::_q_controlSocketBytesWritten(), QSocks5SocketEngine::waitForWrite(), and QSocks5SocketEngine::write().
|
inlinestatic |
Definition at line 151 of file qsocks5socketengine.cpp.
Referenced by QSocks5SocketEnginePrivate::_q_controlSocketReadNotification().