Initial SOCKS5 implementation.
This commit is contained in:
parent
dfaca04167
commit
1e2d011705
11 changed files with 339 additions and 17 deletions
|
@ -4,10 +4,10 @@
|
|||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2019 Howard Chu <https://github.com/hyc>
|
||||
* 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
|
||||
|
@ -42,6 +42,7 @@ namespace xmrig {
|
|||
|
||||
static const char kStratumTcp[] = "stratum+tcp://";
|
||||
static const char kStratumSsl[] = "stratum+ssl://";
|
||||
static const char kSOCKS5[] = "socks5://";
|
||||
|
||||
#ifdef XMRIG_FEATURE_HTTP
|
||||
static const char kDaemonHttp[] = "daemon+http://";
|
||||
|
@ -97,6 +98,10 @@ bool xmrig::Url::parse(const char *url)
|
|||
m_scheme = STRATUM;
|
||||
m_tls = true;
|
||||
}
|
||||
else if (strncasecmp(url, kSOCKS5, sizeof(kSOCKS5) - 1) == 0) {
|
||||
m_scheme = SOCKS5;
|
||||
m_tls = false;
|
||||
}
|
||||
# ifdef XMRIG_FEATURE_HTTP
|
||||
else if (strncasecmp(url, kDaemonHttps, sizeof(kDaemonHttps) - 1) == 0) {
|
||||
m_scheme = DAEMON;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue