Added http/3 and port reuse support (#238)

* Added http/3 and port reuse support

* eslint fixes

* updated locale translations

* euhm no one saw this

* Did requested changes

* fixed eslint

* note to self tab is 4 spaces not 2

* Did requested changes

* added coma

* i forgot to ctrl + s

* did requested changes

* removed trailing comma

* it should be reverted now

* :PanSpoonSad: intensifies

* Im bad at this
This commit is contained in:
J3fftw
2021-03-29 21:35:55 +02:00
committed by GitHub
parent 89e847b62f
commit 8b7cf80733
14 changed files with 146 additions and 0 deletions

View File

@@ -62,11 +62,23 @@ const httpsListen = domain => {
// HTTPS
config.push(['listen', `${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443 ssl${domain.https.http2.computed ? ' http2' : ''}`]);
// HTTP/3
if (domain.https.http3.computed)
config.push(['listen',
`${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443 http3`
+ `${domain.https.portReuse.computed ? ' reuseport' : ''}`,
]);
// v6
if (domain.server.listenIpv6.computed)
config.push(['listen',
`[${domain.server.listenIpv6.computed}]:443 ssl${domain.https.http2.computed ? ' http2' : ''}`]);
// v6 HTTP/3
if (domain.server.listenIpv6.computed && domain.https.http3.computed)
config.push(['listen',
`[${domain.server.listenIpv6.computed}]:443 http3${domain.https.portReuse.computed ? ' reuseport' : ''}`,
]);
return config;
};