mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
* add websocks
* enable socks, websocks and httpproxy as client tunnels * remove old websocks config
This commit is contained in:
parent
43c1a87c48
commit
c5d3c0c6f8
8 changed files with 408 additions and 341 deletions
11
Daemon.cpp
11
Daemon.cpp
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "Event.h"
|
||||
#include "Websocket.h"
|
||||
#include "WebSocks.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
|
@ -44,7 +43,6 @@ namespace i2p
|
|||
std::unique_ptr<i2p::transport::UPnP> UPnP;
|
||||
#ifdef WITH_EVENTS
|
||||
std::unique_ptr<i2p::event::WebsocketServer> m_WebsocketServer;
|
||||
std::unique_ptr<i2p::client::WebSocks> m_WebSocksServer;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -309,15 +307,6 @@ namespace i2p
|
|||
d.m_WebsocketServer->Start();
|
||||
i2p::event::core.SetListener(d.m_WebsocketServer->ToListener());
|
||||
}
|
||||
bool websocks; i2p::config::GetOption("websocks.enabled", websocks);
|
||||
if (websocks) {
|
||||
std::string websocksAddr; i2p::config::GetOption("websocks.address", websocksAddr);
|
||||
uint16_t websocksPort; i2p::config::GetOption("websocks.port", websocksPort);
|
||||
LogPrint(eLogInfo, "Daemon: starting up WebSOCKS server at ", websocksAddr, ":", websocksPort);
|
||||
d.m_WebSocksServer = std::unique_ptr<i2p::client::WebSocks>(new i2p::client::WebSocks(websocksAddr, websocksPort));
|
||||
d.m_WebSocksServer->Start();
|
||||
}
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue