mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
added gzip parameter for server tunnels
This commit is contained in:
parent
61675c20d8
commit
6d892179c8
8 changed files with 53 additions and 51 deletions
|
@ -313,6 +313,7 @@ namespace client
|
|||
int inPort = section.second.get (I2P_SERVER_TUNNEL_INPORT, 0);
|
||||
std::string accessList = section.second.get (I2P_SERVER_TUNNEL_ACCESS_LIST, "");
|
||||
std::string hostOverride = section.second.get (I2P_SERVER_TUNNEL_HOST_OVERRIDE, "");
|
||||
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
|
||||
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
|
||||
// I2CP
|
||||
std::map<std::string, std::string> options;
|
||||
|
@ -326,13 +327,12 @@ namespace client
|
|||
localDestination = CreateNewLocalDestination (k, true, &options);
|
||||
|
||||
I2PServerTunnel * serverTunnel;
|
||||
if (type == I2P_TUNNELS_SECTION_TYPE_HTTP) {
|
||||
serverTunnel = new I2PServerTunnelHTTP (name, host, port, localDestination, hostOverride, inPort);
|
||||
} else if (type == I2P_TUNNELS_SECTION_TYPE_SERVER) {
|
||||
serverTunnel = new I2PServerTunnel (name, host, port, localDestination, inPort);
|
||||
} else if (type == I2P_TUNNELS_SECTION_TYPE_IRC) {
|
||||
serverTunnel = new I2PServerTunnelIRC (name, host, port, localDestination, inPort);
|
||||
}
|
||||
if (type == I2P_TUNNELS_SECTION_TYPE_HTTP)
|
||||
serverTunnel = new I2PServerTunnelHTTP (name, host, port, localDestination, hostOverride, inPort, gzip);
|
||||
else if (type == I2P_TUNNELS_SECTION_TYPE_IRC)
|
||||
serverTunnel = new I2PServerTunnelIRC (name, host, port, localDestination, inPort, gzip);
|
||||
else // regular server tunnel by default
|
||||
serverTunnel = new I2PServerTunnel (name, host, port, localDestination, inPort, gzip);
|
||||
|
||||
if (accessList.length () > 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue