Initial SOCKS5 implementation.

This commit is contained in:
XMRig 2020-02-18 02:16:21 +07:00
parent dfaca04167
commit 1e2d011705
No known key found for this signature in database
GPG key ID: 446A53638BE94409
11 changed files with 339 additions and 17 deletions

View file

@ -5,9 +5,9 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2019 jtgrassie <https://github.com/jtgrassie>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -88,6 +88,7 @@ protected:
inline void onLine(char *line, size_t size) override { parse(line, size); }
private:
class Socks5;
class Tls;
bool close();
@ -128,6 +129,7 @@ private:
const char *m_agent;
Dns *m_dns;
RecvBuf<kInputBufferSize> m_recvBuf;
Socks5 *m_socks5 = nullptr;
std::bitset<EXT_MAX> m_extensions;
std::vector<char> m_sendBuf;
String m_rpcId;