- tune.quic.fe.stream.rxbuf
- tune.quic.fe.tx.pacing
- tune.quic.fe.tx.udp-gso
+ - tune.quic.interop
- tune.quic.listen
- tune.quic.mem.tx-max
- tune.quic.sec.stateless-reset-rate
be useful to disable it on developers suggestion when suspecting an issue on
emission.
+tune.quic.interop { off | fe } [ EXPERIMENTAL ]
+ Activates support for QUIC interop testing. This is mandatory to be able to
+ use "hq-interop" in ALPN configuration. This must never be activated for
+ normal usage.
+
+ The default value "off" disables QUIC interop testing. The "fe" value is used
+ to run HAProxy as a server in the interop test suite.
+
+ It requires "expose-experimental-directives" to be set.
+
tune.quic.listen { on | off }
Disable QUIC transport protocol on the frontend side. All the QUIC listeners
will still be created, but they won't listen for incoming datagrams. Hence,
bind :443 ssl crt pub.pem alpn h2 # explicitly disable HTTP/1.1
- QUIC supports only h3 and hq-interop as ALPN. h3 is for HTTP/3 and hq-interop
- is used for http/0.9 and QUIC interop runner (see https://interop.seemann.io).
+ Only "h3" is officially supported as a QUIC ALPN for HTTP/3. The "hq-interop"
+ value is reserved for QUIC interop testing (see https://interop.seemann.io).
+ It cannot be used unless the experimental keyword "tune.quic.interop" is set
+ to the proper value.
+
Each "alpn" statement will replace a previous one. In order to remove them,
use "no-alpn".
#define QUIC_TUNE_FB_TX_PACING 0x00000001
#define QUIC_TUNE_FB_TX_UDP_GSO 0x00000002
#define QUIC_TUNE_FB_CC_HYSTART 0x00000004
+#define QUIC_TUNE_FB_INTEROP 0x00000008
struct quic_tune {
struct {
return ret;
}
+static int cfg_parse_quic_tune_interop(char **args, int section_type, struct proxy *curpx,
+ const struct proxy *defpx, const char *file, int line,
+ char **err)
+{
+ int ret = 0;
+
+ if (too_many_args(1, args, err, NULL))
+ return -1;
+
+ if (!experimental_directives_allowed) {
+ memprintf(err, "'%s' is experimental, must be allowed via a global "
+ "'expose-experimental-directives'.", args[0]);
+ return -1;
+ }
+ mark_tainted(TAINTED_CONFIG_EXP_KW_DECLARED);
+
+ if (strcmp(args[1], "fe") == 0) {
+ quic_tune.fe.fb_opts |= QUIC_TUNE_FB_INTEROP;
+ }
+ else if (strcmp(args[1], "off") == 0) {
+ quic_tune.fe.fb_opts &= ~QUIC_TUNE_FB_INTEROP;
+ }
+ else {
+ memprintf(err, "'%s' expects 'fe' or 'off'.", args[0]);
+ return -1;
+ }
+
+ return ret;
+}
+
static struct cfg_kw_list cfg_kws = {ILH, {
+ { CFG_GLOBAL, "tune.quic.interop", cfg_parse_quic_tune_interop },
{ CFG_GLOBAL, "tune.quic.listen", cfg_parse_quic_tune_on_off },
{ CFG_GLOBAL, "tune.quic.mem.tx-max", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.sec.stateless-reset-rate", cfg_parse_quic_tune_setting },
#include <haproxy/listener.h>
#include <haproxy/openssl-compat.h>
#include <haproxy/quic_ssl-t.h>
+#include <haproxy/quic_tune.h>
#include <haproxy/ssl_sock.h>
#include <haproxy/ssl_utils.h>
#include <haproxy/tools.h>
free(conf->alpn_str);
ret = ssl_sock_parse_alpn(args[cur_arg + 1], &conf->alpn_str, &conf->alpn_len, err);
- if (ret)
+ if (ret) {
memprintf(err, "'%s' : %s", args[cur_arg], *err);
- else if (global.tune.options2 & GTUNE2_DISABLE_H2_FE)
- alpn_remove_token(conf->alpn_str, &conf->alpn_len, ist("h2"), 0);
+ }
+ else {
+ if (global.tune.options2 & GTUNE2_DISABLE_H2_FE)
+ alpn_remove_token(conf->alpn_str, &conf->alpn_len, ist("h2"), 0);
+
+#ifdef USE_QUIC
+ if (!(quic_tune.fe.fb_opts & QUIC_TUNE_FB_INTEROP)) {
+ if (alpn_remove_token(conf->alpn_str, &conf->alpn_len, ist("hq-interop"), 1)) {
+ if (!from_cli) {
+ memprintf(err, "'hq-interop' found in ALPN, forbidden unless QUIC interop testing is active.\n");
+ ret |= ERR_ALERT | ERR_FATAL;
+ }
+ }
+ }
+#endif /* USE_QUIC */
+ }
+
return ret;
#else
memprintf(err, "'%s' : library does not support TLS ALPN extension", args[cur_arg]);
if (srv_is_quic(newsrv)) {
/* TODO QUIC is currently incompatible with dynamic
* backends deletion. Please fix this before removing
- * QUIC BE experimental status.
+ * QUIC BE experimental status. When this is done,
+ * ensures "hq-interop" remains gated behind the
+ * experimental status.
*/
if (!experimental_directives_allowed) {
ha_alert("QUIC is experimental for server '%s',"