nghttpx: Add configuration to enable ngtcp2 logging (no cmd-line opt yet)
This commit is contained in:
parent
fe4c6e4c56
commit
48bb1ebe01
|
@ -711,6 +711,9 @@ struct QUICConfig {
|
||||||
struct {
|
struct {
|
||||||
ev_tstamp idle;
|
ev_tstamp idle;
|
||||||
} timeout;
|
} timeout;
|
||||||
|
struct {
|
||||||
|
bool log;
|
||||||
|
} debug;
|
||||||
};
|
};
|
||||||
|
|
||||||
// custom error page
|
// custom error page
|
||||||
|
|
|
@ -451,9 +451,14 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto config = get_config();
|
||||||
|
auto &quicconf = config->quic;
|
||||||
|
|
||||||
ngtcp2_settings settings;
|
ngtcp2_settings settings;
|
||||||
ngtcp2_settings_default(&settings);
|
ngtcp2_settings_default(&settings);
|
||||||
settings.log_printf = log_printf;
|
if (quicconf.debug.log) {
|
||||||
|
settings.log_printf = log_printf;
|
||||||
|
}
|
||||||
settings.initial_ts = quic_timestamp();
|
settings.initial_ts = quic_timestamp();
|
||||||
settings.cc_algo = NGTCP2_CC_ALGO_BBR;
|
settings.cc_algo = NGTCP2_CC_ALGO_BBR;
|
||||||
settings.max_window = 6_m;
|
settings.max_window = 6_m;
|
||||||
|
@ -461,9 +466,6 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
|
||||||
settings.max_udp_payload_size = SHRPX_MAX_UDP_PAYLOAD_SIZE;
|
settings.max_udp_payload_size = SHRPX_MAX_UDP_PAYLOAD_SIZE;
|
||||||
settings.rand_ctx.native_handle = &worker->get_randgen();
|
settings.rand_ctx.native_handle = &worker->get_randgen();
|
||||||
|
|
||||||
auto config = get_config();
|
|
||||||
auto &quicconf = config->quic;
|
|
||||||
|
|
||||||
ngtcp2_transport_params params;
|
ngtcp2_transport_params params;
|
||||||
ngtcp2_transport_params_default(¶ms);
|
ngtcp2_transport_params_default(¶ms);
|
||||||
params.initial_max_streams_bidi = 100;
|
params.initial_max_streams_bidi = 100;
|
||||||
|
|
Loading…
Reference in New Issue