mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
Compression is disabled by default
This commit is contained in:
@@ -12,7 +12,8 @@
|
|||||||
container. This can be disabled at compile time using --disable-linux-namespaces.
|
container. This can be disabled at compile time using --disable-linux-namespaces.
|
||||||
- Configuration option 'use-seccomp' was replaced by 'isolate-workers',
|
- Configuration option 'use-seccomp' was replaced by 'isolate-workers',
|
||||||
which in addition to seccomp it enables the Linux namespaces restrictions.
|
which in addition to seccomp it enables the Linux namespaces restrictions.
|
||||||
- Added support for stateless compression using LZ4 and LZS.
|
- Added support for stateless compression using LZ4 and LZS. This
|
||||||
|
is disabled by default.
|
||||||
|
|
||||||
|
|
||||||
* Version 0.8.9 (released 2014-12-10)
|
* Version 0.8.9 (released 2014-12-10)
|
||||||
|
|||||||
+2
-2
@@ -139,8 +139,8 @@ server-key = ../tests/server-key.pem
|
|||||||
# The revocation list of the certificates issued by the 'ca-cert' above.
|
# The revocation list of the certificates issued by the 'ca-cert' above.
|
||||||
#crl = /path/to/crl.pem
|
#crl = /path/to/crl.pem
|
||||||
|
|
||||||
# Uncomment this to disable compression negotiation.
|
# Uncomment this to enable compression negotiation.
|
||||||
#disable-compression = true
|
#compression = true
|
||||||
|
|
||||||
# Set the minimum size under which a packet will not be compressed.
|
# Set the minimum size under which a packet will not be compressed.
|
||||||
# That is to allow low-latency for VoIP packets. The default size
|
# That is to allow low-latency for VoIP packets. The default size
|
||||||
|
|||||||
+4
-2
@@ -64,7 +64,7 @@ static struct cfg_options available_options[] = {
|
|||||||
{ .name = "split-dns", .type = OPTION_MULTI_LINE, .mandatory = 0 },
|
{ .name = "split-dns", .type = OPTION_MULTI_LINE, .mandatory = 0 },
|
||||||
{ .name = "listen-host", .type = OPTION_STRING, .mandatory = 0 },
|
{ .name = "listen-host", .type = OPTION_STRING, .mandatory = 0 },
|
||||||
{ .name = "listen-host-is-dyndns", .type = OPTION_BOOLEAN, .mandatory = 0 },
|
{ .name = "listen-host-is-dyndns", .type = OPTION_BOOLEAN, .mandatory = 0 },
|
||||||
{ .name = "disable-compression", .type = OPTION_BOOLEAN, .mandatory = 0 },
|
{ .name = "compression", .type = OPTION_BOOLEAN, .mandatory = 0 },
|
||||||
{ .name = "no-compress-limit", .type = OPTION_NUMERIC, .mandatory = 0 },
|
{ .name = "no-compress-limit", .type = OPTION_NUMERIC, .mandatory = 0 },
|
||||||
{ .name = "tcp-port", .type = OPTION_NUMERIC, .mandatory = 0 },
|
{ .name = "tcp-port", .type = OPTION_NUMERIC, .mandatory = 0 },
|
||||||
{ .name = "udp-port", .type = OPTION_NUMERIC, .mandatory = 0 },
|
{ .name = "udp-port", .type = OPTION_NUMERIC, .mandatory = 0 },
|
||||||
@@ -572,8 +572,10 @@ unsigned force_cert_auth;
|
|||||||
config->cisco_client_compat = 1;
|
config->cisco_client_compat = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
READ_TF("disable-compression", config->disable_compression, 0);
|
READ_TF("compression", config->enable_compression, 0);
|
||||||
READ_NUMERIC("no-compress-limit", config->no_compress_limit);
|
READ_NUMERIC("no-compress-limit", config->no_compress_limit);
|
||||||
|
if (config->no_compress_limit == 0)
|
||||||
|
config->no_compress_limit = DEFAULT_NO_COMPRESS_LIMIT;
|
||||||
if (config->no_compress_limit < MIN_NO_COMPRESS_LIMIT)
|
if (config->no_compress_limit < MIN_NO_COMPRESS_LIMIT)
|
||||||
config->no_compress_limit = MIN_NO_COMPRESS_LIMIT;
|
config->no_compress_limit = MIN_NO_COMPRESS_LIMIT;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -226,8 +226,8 @@ server-key = /path/to/key.pem
|
|||||||
# See the manual to generate an empty CRL initially.
|
# See the manual to generate an empty CRL initially.
|
||||||
#crl = /path/to/crl.pem
|
#crl = /path/to/crl.pem
|
||||||
|
|
||||||
# Uncomment this to disable compression negotiation.
|
# Uncomment this to enable compression negotiation (LZS, LZ4).
|
||||||
#disable-compression = true
|
#compression = true
|
||||||
|
|
||||||
# Set the minimum size under which a packet will not be compressed.
|
# Set the minimum size under which a packet will not be compressed.
|
||||||
# That is to allow low-latency for VoIP packets. The default size
|
# That is to allow low-latency for VoIP packets. The default size
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ typedef enum {
|
|||||||
OC_COMP_LZS,
|
OC_COMP_LZS,
|
||||||
} comp_type_t;
|
} comp_type_t;
|
||||||
|
|
||||||
#define MIN_NO_COMPRESS_LIMIT 256
|
#define MIN_NO_COMPRESS_LIMIT 64
|
||||||
|
#define DEFAULT_NO_COMPRESS_LIMIT 256
|
||||||
|
|
||||||
#define DEBUG_BASIC 1
|
#define DEBUG_BASIC 1
|
||||||
#define DEBUG_HTTP 2
|
#define DEBUG_HTTP 2
|
||||||
@@ -220,7 +221,7 @@ struct cfg_st {
|
|||||||
char *auth_additional; /* the additional string specified in the auth methode */
|
char *auth_additional; /* the additional string specified in the auth methode */
|
||||||
gnutls_certificate_request_t cert_req;
|
gnutls_certificate_request_t cert_req;
|
||||||
char *priorities;
|
char *priorities;
|
||||||
unsigned disable_compression;
|
unsigned enable_compression;
|
||||||
unsigned no_compress_limit; /* under this size (in bytes) of data there will be no compression */
|
unsigned no_compress_limit; /* under this size (in bytes) of data there will be no compression */
|
||||||
char *chroot_dir; /* where the xml files are served from */
|
char *chroot_dir; /* where the xml files are served from */
|
||||||
char *banner;
|
char *banner;
|
||||||
|
|||||||
+2
-2
@@ -439,7 +439,7 @@ void header_value_check(struct worker_st *ws, struct http_req_st *req)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HEADER_DTLS_ENCODING:
|
case HEADER_DTLS_ENCODING:
|
||||||
if (ws->config->disable_compression)
|
if (ws->config->enable_compression == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ws->dtls_selected_comp = NULL;
|
ws->dtls_selected_comp = NULL;
|
||||||
@@ -465,7 +465,7 @@ void header_value_check(struct worker_st *ws, struct http_req_st *req)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HEADER_CSTP_ENCODING:
|
case HEADER_CSTP_ENCODING:
|
||||||
if (ws->config->disable_compression)
|
if (ws->config->enable_compression == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ws->cstp_selected_comp = NULL;
|
ws->cstp_selected_comp = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user