added gzip parameter for server tunnels

This commit is contained in:
orignal 2016-02-29 14:44:15 -05:00
parent 61675c20d8
commit 6d892179c8
8 changed files with 53 additions and 51 deletions

View file

@ -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)
{