Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
6931cb9d
Commit
6931cb9d
authored
Aug 27, 2021
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Add --quic-idle-timeout option
parent
c1bcf0f1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
gennghttpxfun.py
gennghttpxfun.py
+1
-0
src/shrpx.cc
src/shrpx.cc
+9
-0
src/shrpx_config.cc
src/shrpx_config.cc
+9
-0
src/shrpx_config.h
src/shrpx_config.h
+3
-0
No files found.
gennghttpxfun.py
View file @
6931cb9d
...
...
@@ -181,6 +181,7 @@ OPTIONS = [
"no-bpf"
,
"http2-altsvc"
,
"frontend-http3-read-timeout"
,
"quic-idle-timeout"
,
]
LOGVARS
=
[
...
...
src/shrpx.cc
View file @
6931cb9d
...
...
@@ -2883,6 +2883,10 @@ Scripting:
#ifdef ENABLE_HTTP3
out
<<
R"(
QUIC:
--quic-idle-timeout=<DURATION>
Specify an idle timeout for QUIC connection.
Default: )"
<<
config
->
quic
.
timeout
.
idle
<<
R"(
--bpf-program-file=<PATH>
Specify a path to eBPF program file reuseport_kern.o to
direct an incoming QUIC UDP datagram to a correct
...
...
@@ -3598,6 +3602,7 @@ int main(int argc, char **argv) {
{
SHRPX_OPT_HTTP2_ALTSVC
.
c_str
(),
required_argument
,
&
flag
,
171
},
{
SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT
.
c_str
(),
required_argument
,
&
flag
,
172
},
{
SHRPX_OPT_QUIC_IDLE_TIMEOUT
.
c_str
(),
required_argument
,
&
flag
,
173
},
{
nullptr
,
0
,
nullptr
,
0
}};
int
option_index
=
0
;
...
...
@@ -4418,6 +4423,10 @@ int main(int argc, char **argv) {
cmdcfgs
.
emplace_back
(
SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT
,
StringRef
{
optarg
});
break
;
case
173
:
// --quic-idle-timeout
cmdcfgs
.
emplace_back
(
SHRPX_OPT_QUIC_IDLE_TIMEOUT
,
StringRef
{
optarg
});
break
;
default:
break
;
}
...
...
src/shrpx_config.cc
View file @
6931cb9d
...
...
@@ -2092,6 +2092,9 @@ int option_lookup_token(const char *name, size_t namelen) {
if
(
util
::
strieq_l
(
"dns-cache-timeou"
,
name
,
16
))
{
return
SHRPX_OPTID_DNS_CACHE_TIMEOUT
;
}
if
(
util
::
strieq_l
(
"quic-idle-timeou"
,
name
,
16
))
{
return
SHRPX_OPTID_QUIC_IDLE_TIMEOUT
;
}
if
(
util
::
strieq_l
(
"worker-read-burs"
,
name
,
16
))
{
return
SHRPX_OPTID_WORKER_READ_BURST
;
}
...
...
@@ -3879,6 +3882,12 @@ int parse_config(Config *config, int optid, const StringRef &opt,
case
SHRPX_OPTID_FRONTEND_HTTP3_READ_TIMEOUT
:
return
parse_duration
(
&
config
->
conn
.
upstream
.
timeout
.
http3_read
,
opt
,
optarg
);
case
SHRPX_OPTID_QUIC_IDLE_TIMEOUT
:
#ifdef ENABLE_HTTP3
return
parse_duration
(
&
config
->
quic
.
timeout
.
idle
,
opt
,
optarg
);
#else // !ENABLE_HTTP3
return
0
;
#endif // !ENABLE_HTTP3
case
SHRPX_OPTID_CONF
:
LOG
(
WARN
)
<<
"conf: ignored"
;
...
...
src/shrpx_config.h
View file @
6931cb9d
...
...
@@ -369,6 +369,8 @@ constexpr auto SHRPX_OPT_NO_BPF = StringRef::from_lit("no-bpf");
constexpr
auto
SHRPX_OPT_HTTP2_ALTSVC
=
StringRef
::
from_lit
(
"http2-altsvc"
);
constexpr
auto
SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT
=
StringRef
::
from_lit
(
"frontend-http3-read-timeout"
);
constexpr
auto
SHRPX_OPT_QUIC_IDLE_TIMEOUT
=
StringRef
::
from_lit
(
"quic-idle-timeout"
);
constexpr
size_t
SHRPX_OBFUSCATED_NODE_LENGTH
=
8
;
...
...
@@ -1207,6 +1209,7 @@ enum {
SHRPX_OPTID_PRIVATE_KEY_FILE
,
SHRPX_OPTID_PRIVATE_KEY_PASSWD_FILE
,
SHRPX_OPTID_PSK_SECRETS
,
SHRPX_OPTID_QUIC_IDLE_TIMEOUT
,
SHRPX_OPTID_READ_BURST
,
SHRPX_OPTID_READ_RATE
,
SHRPX_OPTID_REDIRECT_HTTPS_PORT
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment