enum proto_proxy_mode mode;
enum proto_proxy_side side;
const struct mux_ops *mux;
+ const char *alpn; /* Default alpn to set by default when the mux protocol is forced (optional, in binary form) */
struct list list;
};
static struct mux_proto_list mux_proto_h1 =
{ .token = IST("h1"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &mux_h1_ops };
static struct mux_proto_list mux_proto_http =
- { .token = IST(""), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &mux_http_ops };
+ { .token = IST(""), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &mux_http_ops, .alpn = "\010http/1.1" };
INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_h1);
INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_http);
};
static struct mux_proto_list mux_proto_h2 =
- { .token = IST("h2"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &h2_ops };
+ { .token = IST("h2"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &h2_ops, .alpn = "\002h2" };
INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_h2);