18#include "private/qiodevice_p.h"
19#include "private/qringbuffer_p.h"
33#define MAX_DATA_DUMP 256
34#define SOCKS5_BLOCKING_BIND_TIMEOUT 5000
36#define Q_INIT_CHECK(returnValue) do { \
41#define S5_VERSION_5 0x05
42#define S5_CONNECT 0x01
44#define S5_UDP_ASSOCIATE 0x03
46#define S5_DOMAINNAME 0x03
48#define S5_SUCCESS 0x00
49#define S5_R_ERROR_SOCKS_FAILURE 0x01
50#define S5_R_ERROR_CON_NOT_ALLOWED 0x02
51#define S5_R_ERROR_NET_UNREACH 0x03
52#define S5_R_ERROR_HOST_UNREACH 0x04
53#define S5_R_ERROR_CONN_REFUSED 0x05
54#define S5_R_ERROR_TTL 0x06
55#define S5_R_ERROR_CMD_NOT_SUPPORTED 0x07
56#define S5_R_ERROR_ADD_TYPE_NOT_SUPORTED 0x08
58#define S5_AUTHMETHOD_NONE 0x00
59#define S5_AUTHMETHOD_PASSWORD 0x02
60#define S5_AUTHMETHOD_NOTACCEPTABLE 0xFF
62#define S5_PASSWORDAUTH_VERSION 0x01
64#ifdef QSOCKS5SOCKETLAYER_DEBUG
65# define QSOCKS5_Q_DEBUG qDebug() << this
66# define QSOCKS5_D_DEBUG qDebug() << q_ptr
67# define QSOCKS5_DEBUG qDebug() << "[QSocks5]"
86 return "unknown state"_L1;
105# define QSOCKS5_DEBUG if (0) qDebug()
106# define QSOCKS5_Q_DEBUG if (0) qDebug()
107# define QSOCKS5_D_DEBUG if (0) qDebug()
130 data.ipv4 = qToBigEndian<quint32>(
address.toIPv4Address());
142 data.port = qToBigEndian<quint16>(
port);
157 if (encodedHostName.
size() > 255)
169 data.port = qToBigEndian<quint16>(
port);
185 const unsigned char *pBuf =
reinterpret_cast<const unsigned char*
>(
buf.constData());
189 if (
buf.size() -
pos < 1) {
195 if (
buf.size() -
pos < 4) {
199 address.setAddress(qFromBigEndian<quint32>(&pBuf[
pos]));
204 if (
buf.size() -
pos < 16) {
209 for (
int i = 0;
i < 16; ++
i)
224 if (
buf.size() -
pos < 2) {
228 port = qFromBigEndian<quint16>(&pBuf[
pos]);
269#ifndef QT_NO_UDPSOCKET
321 using namespace std::chrono_literals;
343 qWarning(
"Cannot access socks5 bind data from different thread");
363 if (
it.value()->timeStamp.hasExpired(350000)) {
419 this->userName = userName;
420 this->password = password;
465 return "Socks5 user name or password incorrect"_L1;
472 , readNotificationEnabled(
false)
473 , writeNotificationEnabled(
false)
474 , exceptNotificationEnabled(
false)
475 , socketDescriptor(-1)
478#ifndef QT_NO_UDPSOCKET
482 , readNotificationActivated(
false)
483 , writeNotificationActivated(
false)
484 , readNotificationPending(
false)
485 , writeNotificationPending(
false)
486 , connectionNotificationPending(
false)
503#ifndef QT_NO_UDPSOCKET
563 switch (controlSocketError) {
566 QSocks5SocketEngine::tr(
"Connection to proxy refused"));
570 QSocks5SocketEngine::tr(
"Connection to proxy closed prematurely"));
574 QSocks5SocketEngine::tr(
"Proxy host not found"));
579 QSocks5SocketEngine::tr(
"Connection to proxy timed out"));
584 q->setError(controlSocketError,
data->controlSocket->errorString());
588 q->setError(controlSocketError,
data->controlSocket->errorString());
596 QSocks5SocketEngine::tr(
"Proxy authentication failed") :
597 QSocks5SocketEngine::tr(
"Proxy authentication failed: %1").arg(extraMessage));
606 QSocks5SocketEngine::tr(
"SOCKS version 5 protocol error"));
611 QAbstractSocket::tr(
"Host not found"));
622 switch (socks5error) {
625 QSocks5SocketEngine::tr(
"General SOCKSv5 server failure"));
629 QSocks5SocketEngine::tr(
"Connection not allowed by SOCKSv5 server"));
633 QAbstractSocket::tr(
"Network unreachable"));
637 QAbstractSocket::tr(
"Host not found"));
641 QAbstractSocket::tr(
"Connection refused"));
645 QSocks5SocketEngine::tr(
"TTL expired"));
649 QSocks5SocketEngine::tr(
"SOCKSv5 command not supported"));
653 QSocks5SocketEngine::tr(
"Address type not supported"));
658 QSocks5SocketEngine::tr(
"Unknown SOCKSv5 proxy error code 0x%1").
arg(
int(socks5error), 16));
671 q->proxyAuthenticationRequired(
proxyInfo, &auth);
675 QSOCKS5_DEBUG <<
"authentication failure: retrying connection";
678 delete data->authenticator;
685 data->controlSocket->abort();
692 data->controlSocket->close();
700 if (
data->controlSocket->bytesAvailable() < 2)
707 data->controlSocket->close();
712 bool authComplete =
false;
718 }
else if (
buf.at(1) !=
data->authenticator->methodId()
719 || !
data->authenticator->beginAuthenticate(
data->controlSocket, &authComplete)) {
734 bool authComplete =
false;
735 if (!
data->authenticator->continueAuthenticate(
data->controlSocket, &authComplete)) {
757#ifndef QT_NO_UDPSOCKET
780 if (!
data->authenticator->seal(
buf, &sealedBuf)) {
783 data->controlSocket->write(sealedBuf);
784 data->controlSocket->flush();
794 if (!
data->authenticator->unSeal(
data->controlSocket, &inBuf)) {
803 if (inBuf.
size() < 3) {
804 QSOCKS5_DEBUG <<
"need more data for request reply header .. put this data somewhere";
832 }
else if (err == 0) {
838 for (
int i = inBuf.
size() - 1;
i >= 0 ; --
i)
839 data->controlSocket->ungetChar(inBuf.
at(
i));
868 data->controlSocket->close();
880 q->readNotification();
909 q->writeNotification();
929 q->connectionNotification();
950 delete d->data->authenticator;
951 delete d->data->controlSocket;
954 delete d->connectData;
955#ifndef QT_NO_UDPSOCKET
957 delete d->udpData->udpSocket;
968 return 1 +
counter.fetchAndAddRelaxed(1);
977 d->socketType =
type;
1002 d->data =
d->connectData;
1006 d->data->controlSocket->setParent(
this);
1007 d->socketProtocol =
d->data->controlSocket->localAddress().protocol();
1014 d->inboundStreamCount =
d->outboundStreamCount = 1;
1033 if (
d->data->controlSocket->bytesAvailable() != 0)
1034 d->_q_controlSocketReadNotification();
1043 d->proxyInfo = networkProxy;
1049 return d->socketDescriptor;
1069#ifndef QT_NO_UDPSOCKET
1080 qFatal(
"QSocks5SocketEngine::connectToHost: in QTcpServer mode");
1091 d->data->controlSocket->setReadBufferSize(65536);
1094 d->data->controlSocket->connectToHost(
d->proxyInfo.hostName(),
d->proxyInfo.port());
1107 d->peerName.clear();
1118 d->peerName = hostname;
1129 buf[2] =
data->authenticator->methodId();
1130 data->controlSocket->write(
buf);
1137 <<
"bytes available" <<
data->controlSocket->bytesAvailable();
1139 if (
data->controlSocket->bytesAvailable() == 0) {
1140 QSOCKS5_D_DEBUG <<
"########## bogus read why do we get these ... on windows only";
1158 if (!
data->authenticator->unSeal(
data->controlSocket, &
buf)) {
1177 qWarning(
"QSocks5SocketEnginePrivate::_q_controlSocketReadNotification: "
1178 "Unexpectedly received data while in state=%d and mode=%d",
1190 &&
data->controlSocket->bytesToWrite()))
1212 data->controlSocket->close();
1220 data->controlSocket->close();
1223 q_func()->setError(
data->controlSocket->error(),
data->controlSocket->errorString());
1239#ifndef QT_NO_UDPSOCKET
1255 if (!
data->authenticator->unSeal(sealedBuf, &inBuf)) {
1262 if (inBuf.
size() < 4) {
1301#ifndef QT_NO_UDPSOCKET
1311#ifndef QT_NO_UDPSOCKET
1315 setError(
d->udpData->udpSocket->error(),
d->udpData->udpSocket->errorString());
1318 d->localAddress =
d->udpData->udpSocket->localAddress();
1319 d->localPort =
d->udpData->udpSocket->localPort();
1324 d->localPort =
port;
1333 d->data->controlSocket->connectToHost(
d->proxyInfo.hostName(),
d->proxyInfo.port());
1334 if (!
d->waitForConnected(msecs,
nullptr) ||
1337 QSOCKS5_Q_DEBUG <<
"waitForConnected to proxy server" <<
d->data->controlSocket->errorString();
1343#ifndef QT_NO_UDPSOCKET
1346 d->udpData->associateAddress =
d->localAddress;
1348 d->udpData->associatePort =
d->localPort;
1377 d->emitReadNotification();
1392 switch (
d->socks5State) {
1394 QSOCKS5_Q_DEBUG <<
"BindSuccess adding" <<
d->socketDescriptor <<
"to the bind store";
1395 d->data->controlSocket->disconnect();
1396 d->data->controlSocket->setParent(
nullptr);
1397 d->bindData->localAddress =
d->localAddress;
1398 d->bindData->localPort =
d->localPort;
1399 sd =
d->socketDescriptor;
1400 socks5BindStore()->add(sd,
d->bindData);
1402 d->bindData =
nullptr;
1403 d->socketDescriptor = 0;
1423 if (
d->data &&
d->data->controlSocket) {
1428 while (!
d->data->controlSocket->bytesToWrite()) {
1433 d->data->controlSocket->close();
1435 d->inboundStreamCount =
d->outboundStreamCount = 0;
1436#ifndef QT_NO_UDPSOCKET
1437 if (
d->udpData &&
d->udpData->udpSocket)
1438 d->udpData->udpSocket->close();
1446 return d->connectData->readBuffer.size();
1447#ifndef QT_NO_UDPSOCKET
1449 && !
d->udpData->pendingDatagrams.isEmpty())
1450 return d->udpData->pendingDatagrams.first().data.size();
1460 if (
d->connectData->readBuffer.isEmpty()) {
1465 "Remote host closed connection###"_L1);
1475#ifndef QT_NO_UDPSOCKET
1496 if (!
d->data->authenticator->seal(
buf, &sealedBuf)) {
1509 d->data->controlSocket->waitForBytesWritten(0);
1512#ifndef QT_NO_UDPSOCKET
1522#ifndef QT_NO_UDPSOCKET
1523#ifndef QT_NO_NETWORKINTERFACE
1528 "Operation on socket is not supported"_L1);
1536 "Operation on socket is not supported"_L1);
1549 "Operation on socket is not supported"_L1);
1559 return !
d->udpData->pendingDatagrams.isEmpty();
1566 if (!
d->udpData->pendingDatagrams.isEmpty())
1567 return d->udpData->pendingDatagrams.head().data.size();
1574#ifndef QT_NO_UDPSOCKET
1577 if (
d->udpData->pendingDatagrams.isEmpty())
1581 int copyLen = qMin<int>(maxlen, datagram.
data.
size());
1598#ifndef QT_NO_UDPSOCKET
1616 <<
header.destinationPort;
1623 if (!
d->data->authenticator->seal(outBuf, &sealedBuf)) {
1628 if (
d->udpData->udpSocket->writeDatagram(sealedBuf,
d->udpData->associateAddress,
d->udpData->associatePort) != sealedBuf.
size()) {
1631 setError(
d->udpData->udpSocket->error(),
d->udpData->udpSocket->errorString());
1648 if (
d->data &&
d->data->controlSocket) {
1649 return d->data->controlSocket->bytesToWrite();
1658 if (
d->data &&
d->data->controlSocket) {
1671 if (
d->data &&
d->data->controlSocket) {
1715 d->readNotificationActivated =
false;
1721 if (!
d->waitForConnected(msecs, timedOut))
1734 while (!
d->readNotificationActivated) {
1739 setError(
d->data->controlSocket->error(),
d->data->controlSocket->errorString());
1745#ifndef QT_NO_UDPSOCKET
1747 while (!
d->readNotificationActivated) {
1749 setError(
d->udpData->udpSocket->error(),
d->udpData->udpSocket->errorString());
1759 bool ret =
d->readNotificationActivated;
1760 d->readNotificationActivated =
false;
1776 if (!
d->waitForConnected(msecs, timedOut))
1784 if (
d->data->controlSocket->bytesToWrite())
1786 while ((msecs == -1 || stopWatch.
elapsed() < msecs)
1794 bool checkRead,
bool checkWrite,
1795 int msecs,
bool *timedOut)
1801 *readyToRead = canRead;
1807 *readyToWrite = canWrite;
1814 return d->readNotificationEnabled;
1823 bool emitSignal =
false;
1824 if (!
d->readNotificationEnabled
1827 emitSignal = !
d->connectData->readBuffer.isEmpty();
1828#ifndef QT_NO_UDPSOCKET
1830 emitSignal = !
d->udpData->pendingDatagrams.isEmpty();
1838 d->readNotificationEnabled =
enable;
1841 d->emitReadNotification();
1847 return d->writeNotificationEnabled;
1853 d->writeNotificationEnabled =
enable;
1857 d->emitWriteNotification();
1858 d->writeNotificationActivated =
false;
1865 return d->exceptNotificationEnabled;
1871 d->exceptNotificationEnabled =
enable;
1885 auto engine = std::make_unique<QSocks5SocketEngine>(
parent);
1893 if (socks5BindStore()->
contains(socketDescriptor)) {
1902#include "moc_qsocks5socketengine_p.cpp"
QHostAddress localAddress
QAbstractSocket::SocketError socketError
QAbstractSocket::NetworkLayerProtocol protocol() const
void setPeerPort(quint16 port)
void setPeerAddress(const QHostAddress &address)
void setState(QAbstractSocket::SocketState state)
QAbstractSocket::SocketType socketType() const
void setError(QAbstractSocket::SocketError error, const QString &errorString) const
SocketState
This enum describes the different states in which a socket can be.
static constexpr auto IPv4Protocol
qint64 bytesAvailable() const override
Returns the number of incoming bytes that are waiting to be read.
void setProxy(const QNetworkProxy &networkProxy)
static constexpr auto AnyIPProtocol
void close() override
Closes the I/O device for the socket and calls disconnectFromHost() to close the socket's connection.
SocketError
This enum describes the socket errors that can occur.
@ ProxyConnectionClosedError
@ ProxyConnectionRefusedError
@ ProxyConnectionTimeoutError
@ UnsupportedSocketOperationError
@ UnfinishedSocketOperationError
@ ProxyAuthenticationRequiredError
static constexpr auto IPv6Protocol
SocketType
This enum describes the transport layer protocol.
The QAuthenticator class provides an authentication object.
QString user() const
Returns the user used for authentication.
QString password() const
Returns the password used for authentication.
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
QByteArray & prepend(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
void reserve(qsizetype size)
Attempts to allocate memory for at least size bytes.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
char at(qsizetype i) const
Returns the byte at index position i in the byte array.
void clear()
Clears the contents of the byte array and makes it null.
QByteArray & remove(qsizetype index, qsizetype len)
Removes len bytes from the array, starting at index position pos, and returns a reference to the arra...
QByteArray & append(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
qint64 elapsed() const noexcept
Returns the number of milliseconds since this QElapsedTimer was last started.
void start() noexcept
Starts this timer.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
const_iterator constFind(const Key &key) const noexcept
iterator erase(const_iterator it)
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
const_iterator cend() const noexcept
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
The QHostAddress class provides an IP address.
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read.
The QNetworkInterface class provides a listing of the host's IP addresses and network interfaces.
The QNetworkProxy class provides a network layer proxy.
QString user() const
Returns the user name used for authentication.
void setUser(const QString &userName)
Sets the user name for proxy authentication to be user.
QNetworkProxy::ProxyType type() const
Returns the proxy type for this instance.
QString password() const
Returns the password used for authentication.
QString hostName() const
Returns the host name of the proxy host.
void setPassword(const QString &password)
Sets the password for proxy authentication to be password.
quint16 port() const
Returns the port of the proxy host.
int startTimer(int interval, Qt::TimerType timerType=Qt::CoarseTimer)
This is an overloaded function that will start a timer of type timerType and a timeout of interval mi...
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QThread * thread() const
Returns the thread in which the object lives.
void killTimer(int id)
Kills the timer with timer identifier, id.
void enqueue(const T &t)
Adds value t to the tail of the queue.
Q_CORE_EXPORT void append(const char *data, qint64 size)
Q_CORE_EXPORT void clear()
Exception-safe wrapper around QObject::blockSignals().
virtual bool beginAuthenticate(QTcpSocket *socket, bool *completed)
virtual bool continueAuthenticate(QTcpSocket *socket, bool *completed)
bool seal(const QByteArray &buf, QByteArray *sealedBuf)
virtual ~QSocks5Authenticator()
bool unSeal(const QByteArray &sealedBuf, QByteArray *buf)
void add(qintptr socketDescriptor, QSocks5BindData *bindData)
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
QSocks5BindData * retrieve(qintptr socketDescriptor)
bool contains(qintptr socketDescriptor)
QHash< qintptr, QSocks5BindData * > store
bool beginAuthenticate(QTcpSocket *socket, bool *completed) override
bool continueAuthenticate(QTcpSocket *socket, bool *completed) override
QSocks5PasswordAuthenticator(const QString &userName, const QString &password)
QString errorString() override
virtual QAbstractSocketEngine * createSocketEngine(QAbstractSocket::SocketType socketType, const QNetworkProxy &, QObject *parent) override
QSocks5UdpAssociateData * udpData
void parseRequestMethodReply()
void _q_controlSocketReadNotification()
void setErrorState(Socks5State state, const QString &extraMessage=QString())
void _q_controlSocketStateChanged(QAbstractSocket::SocketState)
bool readNotificationActivated
@ AddressTypeNotSupported
bool writeNotificationEnabled
void _q_controlSocketDisconnected()
void emitReadNotification()
void _q_emitPendingReadNotification()
@ AuthenticationMethodsSent
bool waitForConnected(int msecs, bool *timedOut)
void _q_emitPendingWriteNotification()
~QSocks5SocketEnginePrivate()
QSocks5ConnectData * connectData
void parseAuthenticatingReply()
void _q_controlSocketErrorOccurred(QAbstractSocket::SocketError)
bool readNotificationEnabled
QSocks5SocketEnginePrivate()
bool connectionNotificationPending
bool writeNotificationActivated
QByteArray receivedHeaderFragment
QSocks5BindData * bindData
bool readNotificationPending
void _q_controlSocketConnected()
bool writeNotificationPending
void emitConnectionNotification()
void emitWriteNotification()
void _q_emitPendingConnectionNotification()
void parseAuthenticationMethodReply()
void _q_controlSocketBytesWritten()
void _q_udpSocketReadNotification()
void initialize(Socks5Mode socks5Mode)
qint64 pendingDatagramSize() const override
bool isExceptionNotificationEnabled() const override
void setExceptionNotificationEnabled(bool enable) override
bool setOption(SocketOption option, int value) override
bool joinMulticastGroup(const QHostAddress &groupAddress, const QNetworkInterface &interface) override
bool listen(int backlog) override
bool isReadNotificationEnabled() const override
qintptr socketDescriptor() const override
qint64 readDatagram(char *data, qint64 maxlen, QIpPacketHeader *=nullptr, PacketHeaderOptions=WantNone) override
bool waitForWrite(int msecs=30000, bool *timedOut=nullptr) override
bool waitForRead(int msecs=30000, bool *timedOut=nullptr) override
bool isWriteNotificationEnabled() const override
bool waitForReadOrWrite(bool *readyToRead, bool *readyToWrite, bool checkRead, bool checkWrite, int msecs=30000, bool *timedOut=nullptr) override
qintptr accept() override
void setProxy(const QNetworkProxy &networkProxy)
bool isValid() const override
bool leaveMulticastGroup(const QHostAddress &groupAddress, const QNetworkInterface &interface) override
bool connectToHostByName(const QString &name, quint16 port) override
QNetworkInterface multicastInterface() const override
int option(SocketOption option) const override
qint64 bytesToWrite() const override
bool hasPendingDatagrams() const override
qint64 bytesAvailable() const override
QSocks5SocketEngine(QObject *parent=nullptr)
void setReadNotificationEnabled(bool enable) override
qint64 read(char *data, qint64 maxlen) override
bool setMulticastInterface(const QNetworkInterface &iface) override
bool connectToHost(const QHostAddress &address, quint16 port) override
qint64 write(const char *data, qint64 len) override
bool bind(const QHostAddress &address, quint16 port) override
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol=QAbstractSocket::IPv4Protocol) override
void setWriteNotificationEnabled(bool enable) override
qint64 writeDatagram(const char *data, qint64 len, const QIpPacketHeader &) override
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QTcpSocket class provides a TCP socket.
static QThread * currentThread()
bool hasPendingDatagrams() const
Returns true if at least one datagram is waiting to be read; otherwise returns false.
qint64 readDatagram(char *data, qint64 maxlen, QHostAddress *host=nullptr, quint16 *port=nullptr)
Receives a datagram no larger than maxSize bytes and stores it in data.
qint64 pendingDatagramSize() const
Returns the size of the first pending UDP datagram.
static QByteArray toAce(const QString &domain, AceProcessingOptions options={})
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
DBusConnection const char DBusError * error
static QString header(const QString &name)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static QT_BEGIN_NAMESPACE const char * socketType(QSocketNotifier::Type type)
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
int qt_subtract_from_timeout(int timeout, int elapsed)
static ControlElement< T > * ptr(QWidget *widget)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLenum GLsizei GLuint GLint * bytesWritten
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint64EXT address
GLdouble GLdouble GLdouble GLdouble q
static void add(QPainterPath &path, const QWingedEdge &list, int edge, QPathEdge::Traversal traversal)
static int qt_socks5_get_host_address_and_port(const QByteArray &buf, QHostAddress *pAddress, quint16 *pPort, int *pPos)
#define S5_AUTHMETHOD_NONE
static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, quint16 port, QByteArray *pBuf)
static QString s5StateToString(QSocks5SocketEnginePrivate::Socks5State)
static QString dump(const QByteArray &)
#define S5_PASSWORDAUTH_VERSION
#define Q_INIT_CHECK(returnValue)
#define S5_AUTHMETHOD_NOTACCEPTABLE
static const int MaxWriteBufferSize
#define SOCKS5_BLOCKING_BIND_TIMEOUT
static int nextDescriptor()
static bool qt_socks5_set_host_name_and_port(const QString &hostname, quint16 port, QByteArray *pBuf)
#define QT_TRANSLATE_NOOP(scope, x)
myObject moveToThread(QApplication::instance() ->thread())
[6]
QApplication app(argc, argv)
[0]
socketLayer waitForWrite()
QHostAddress localAddress
QTcpSocket * controlSocket
QSocks5Authenticator * authenticator
QHostAddress associateAddress
QQueue< QSocks5RevivedDatagram > pendingDatagrams
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent