Start work on own tls termination and http3 support
Some checks are pending
/ docker (push) Waiting to run

This commit is contained in:
Melody Becker 2025-05-26 17:10:46 +02:00
parent 4a2462e24e
commit 68d7a5e8c3
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
10 changed files with 634 additions and 698 deletions

View file

@ -11,7 +11,7 @@ import (
)
type ConfigSSL struct {
HandleSSL bool `toml:"handle_ssl"` // Whether Linstrom should handle SSL encryption itself
HandleSSL bool `toml:"handle_ssl"` // Whether Linstrom should handle SSL encryption itself in case of http1/2
// If Linstrom is to handle SSL, whether it should use LetsEncrypt for certificates
UseLetsEncrypt *bool `toml:"use_lets_encrypt"`
// Path to the certificate if Linstrom is to handle SSL while not using LetsEncrypt
@ -30,9 +30,6 @@ type ConfigGeneral struct {
PrivatePort int `toml:"private_port"`
// The port under which the public can reach the server (useful if running behind a reverse proxy)
PublicPort *int `toml:"public_port"`
// File to write structured logs to (structured being formatted as json)
// If not set, Linstrom won't write structured logs
StructuredLogFile *string `toml:"structured_log_file"`
}
type ConfigWebAuthn struct {
@ -138,6 +135,10 @@ type ConfigExperimental struct {
// Changing this option will only affect new ID generations, not update existing ones
// As of now, even that doesn't work due to implementation details
IdGenerator string `toml:"id_generator"`
// Whether to enable http3 support or not
// Experimental because HTTP3 requires TLS and does not work without it
// If enabled, the ssl config will be used for tls
Http3Support bool `toml:"http3_support"`
}
type Config struct {
@ -156,12 +157,11 @@ var GlobalConfig Config
var defaultConfig Config = Config{
General: ConfigGeneral{
Protocol: "http",
Subdomain: nil,
Domain: "localhost",
PrivatePort: 8080,
PublicPort: nil,
StructuredLogFile: nil,
Protocol: "http",
Subdomain: nil,
Domain: "localhost",
PrivatePort: 8080,
PublicPort: nil,
},
SSL: ConfigSSL{
HandleSSL: false,
@ -222,6 +222,7 @@ var defaultConfig Config = Config{
UseEd25519Keys: false,
AuthFetchForServerActor: false,
IdGenerator: "xid",
Http3Support: false,
},
}