nghttpx: Add --frontend-quic-debug-log option
This commit is contained in:
parent
c9b11e9fbf
commit
5aeae7444f
|
@ -182,6 +182,7 @@ OPTIONS = [
|
||||||
"http2-altsvc",
|
"http2-altsvc",
|
||||||
"frontend-http3-read-timeout",
|
"frontend-http3-read-timeout",
|
||||||
"frontend-quic-idle-timeout",
|
"frontend-quic-idle-timeout",
|
||||||
|
"frontend-quic-debug-log",
|
||||||
]
|
]
|
||||||
|
|
||||||
LOGVARS = [
|
LOGVARS = [
|
||||||
|
|
|
@ -2892,6 +2892,8 @@ QUIC:
|
||||||
Specify an idle timeout for QUIC connection.
|
Specify an idle timeout for QUIC connection.
|
||||||
Default: )"
|
Default: )"
|
||||||
<< config->quic.upstream.timeout.idle << R"(
|
<< config->quic.upstream.timeout.idle << R"(
|
||||||
|
--frontend-quic-debug-log
|
||||||
|
Output QUIC debug log to /dev/stderr.
|
||||||
--bpf-program-file=<PATH>
|
--bpf-program-file=<PATH>
|
||||||
Specify a path to eBPF program file reuseport_kern.o to
|
Specify a path to eBPF program file reuseport_kern.o to
|
||||||
direct an incoming QUIC UDP datagram to a correct
|
direct an incoming QUIC UDP datagram to a correct
|
||||||
|
@ -3609,6 +3611,7 @@ int main(int argc, char **argv) {
|
||||||
&flag, 172},
|
&flag, 172},
|
||||||
{SHRPX_OPT_FRONTEND_QUIC_IDLE_TIMEOUT.c_str(), required_argument, &flag,
|
{SHRPX_OPT_FRONTEND_QUIC_IDLE_TIMEOUT.c_str(), required_argument, &flag,
|
||||||
173},
|
173},
|
||||||
|
{SHRPX_OPT_FRONTEND_QUIC_DEBUG_LOG.c_str(), no_argument, &flag, 174},
|
||||||
{nullptr, 0, nullptr, 0}};
|
{nullptr, 0, nullptr, 0}};
|
||||||
|
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
|
@ -4434,6 +4437,11 @@ int main(int argc, char **argv) {
|
||||||
cmdcfgs.emplace_back(SHRPX_OPT_FRONTEND_QUIC_IDLE_TIMEOUT,
|
cmdcfgs.emplace_back(SHRPX_OPT_FRONTEND_QUIC_IDLE_TIMEOUT,
|
||||||
StringRef{optarg});
|
StringRef{optarg});
|
||||||
break;
|
break;
|
||||||
|
case 174:
|
||||||
|
// --frontend-quic-debug-log
|
||||||
|
cmdcfgs.emplace_back(SHRPX_OPT_FRONTEND_QUIC_DEBUG_LOG,
|
||||||
|
StringRef::from_lit("yes"));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2275,6 +2275,11 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||||
return SHRPX_OPTID_PRIVATE_KEY_PASSWD_FILE;
|
return SHRPX_OPTID_PRIVATE_KEY_PASSWD_FILE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'g':
|
||||||
|
if (util::strieq_l("frontend-quic-debug-lo", name, 22)) {
|
||||||
|
return SHRPX_OPTID_FRONTEND_QUIC_DEBUG_LOG;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
if (util::strieq_l("backend-response-buffe", name, 22)) {
|
if (util::strieq_l("backend-response-buffe", name, 22)) {
|
||||||
return SHRPX_OPTID_BACKEND_RESPONSE_BUFFER;
|
return SHRPX_OPTID_BACKEND_RESPONSE_BUFFER;
|
||||||
|
@ -3892,6 +3897,12 @@ int parse_config(Config *config, int optid, const StringRef &opt,
|
||||||
#else // !ENABLE_HTTP3
|
#else // !ENABLE_HTTP3
|
||||||
return 0;
|
return 0;
|
||||||
#endif // !ENABLE_HTTP3
|
#endif // !ENABLE_HTTP3
|
||||||
|
case SHRPX_OPTID_FRONTEND_QUIC_DEBUG_LOG:
|
||||||
|
#ifdef ENABLE_HTTP3
|
||||||
|
config->quic.upstream.debug.log = util::strieq_l("yes", optarg);
|
||||||
|
#endif // ENABLE_HTTP3
|
||||||
|
|
||||||
|
return 0;
|
||||||
case SHRPX_OPTID_CONF:
|
case SHRPX_OPTID_CONF:
|
||||||
LOG(WARN) << "conf: ignored";
|
LOG(WARN) << "conf: ignored";
|
||||||
|
|
||||||
|
|
|
@ -371,6 +371,8 @@ constexpr auto SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT =
|
||||||
StringRef::from_lit("frontend-http3-read-timeout");
|
StringRef::from_lit("frontend-http3-read-timeout");
|
||||||
constexpr auto SHRPX_OPT_FRONTEND_QUIC_IDLE_TIMEOUT =
|
constexpr auto SHRPX_OPT_FRONTEND_QUIC_IDLE_TIMEOUT =
|
||||||
StringRef::from_lit("frontend-quic-idle-timeout");
|
StringRef::from_lit("frontend-quic-idle-timeout");
|
||||||
|
constexpr auto SHRPX_OPT_FRONTEND_QUIC_DEBUG_LOG =
|
||||||
|
StringRef::from_lit("frontend-quic-debug-log");
|
||||||
|
|
||||||
constexpr size_t SHRPX_OBFUSCATED_NODE_LENGTH = 8;
|
constexpr size_t SHRPX_OBFUSCATED_NODE_LENGTH = 8;
|
||||||
|
|
||||||
|
@ -1171,6 +1173,7 @@ enum {
|
||||||
SHRPX_OPTID_FRONTEND_KEEP_ALIVE_TIMEOUT,
|
SHRPX_OPTID_FRONTEND_KEEP_ALIVE_TIMEOUT,
|
||||||
SHRPX_OPTID_FRONTEND_MAX_REQUESTS,
|
SHRPX_OPTID_FRONTEND_MAX_REQUESTS,
|
||||||
SHRPX_OPTID_FRONTEND_NO_TLS,
|
SHRPX_OPTID_FRONTEND_NO_TLS,
|
||||||
|
SHRPX_OPTID_FRONTEND_QUIC_DEBUG_LOG,
|
||||||
SHRPX_OPTID_FRONTEND_QUIC_IDLE_TIMEOUT,
|
SHRPX_OPTID_FRONTEND_QUIC_IDLE_TIMEOUT,
|
||||||
SHRPX_OPTID_FRONTEND_READ_TIMEOUT,
|
SHRPX_OPTID_FRONTEND_READ_TIMEOUT,
|
||||||
SHRPX_OPTID_FRONTEND_WRITE_TIMEOUT,
|
SHRPX_OPTID_FRONTEND_WRITE_TIMEOUT,
|
||||||
|
|
Loading…
Reference in New Issue