18 #include <QDataStream>
20 #define SOCKS_VERSION 0x04
21 #define SOCKS_CONNECT 0x01
22 #define SOCKS_FAKE_IP 0x00000001
23 #define SOCKS_RESPONSE_LEN 0x08
24 #define SOCKS_RESPONSE_VERSION 0x00
25 #define SOCKS_CONNECT_STATUS_OK 0x5A
30 quint16 socksPort, QObject *parent)
32 _socksAddr(socksAddr),
36 this, SLOT(
onError(QAbstractSocket::SocketError)));
83 QDataStream sock(
this);
86 sock << (quint16)remotePort;
89 sock.writeRawData(qPrintable(remoteHost), remoteHost.length());
120 disconnectFromHost();