Added SOCKS5 proxy type command line parameter

- Auto-detect by default, based on the port number
- Don't run TOR-specific code if it's not the TOR proxy
This commit is contained in:
SChernykh
2026-02-10 21:15:30 +01:00
parent cf1c88b907
commit 6d6c12c1e8
13 changed files with 99 additions and 21 deletions
+2 -1
View File
@@ -23,7 +23,7 @@ static thread_local const char* log_category_prefix = "TCPServer ";
namespace p2pool {
TCPServer::TCPServer(int default_backlog, allocate_client_callback allocate_new_client, const std::string& socks5Proxy)
TCPServer::TCPServer(int default_backlog, allocate_client_callback allocate_new_client, const std::string& socks5Proxy, Params::ProxyType socks5ProxyType)
: m_allocateNewClient(allocate_new_client)
, m_defaultBacklog(default_backlog)
, m_loopThread{}
@@ -32,6 +32,7 @@ TCPServer::TCPServer(int default_backlog, allocate_client_callback allocate_new_
, m_portMapping(0)
#endif
, m_socks5Proxy(socks5Proxy)
, m_socks5ProxyType(socks5ProxyType)
, m_socks5ProxyV6(false)
, m_socks5ProxyIP{}
, m_socks5ProxyPort(-1)