mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-28 06:40:01 +08:00
caddytls: Encrypted ClientHello (ECH) (#6862)
* caddytls: Initial commit of Encrypted ClientHello (ECH) * WIP Caddyfile * Fill out Caddyfile support * Enhance godoc comments * Augment, don't overwrite, HTTPS records * WIP * WIP: publication history * Fix republication logic * Apply global DNS module to ACME challenges This allows DNS challenges to be enabled without locally-configured DNS modules * Ignore false positive from prealloc linter * ci: Use only latest Go version (1.24 currently) We no longer support older Go versions, for security benefits. * Remove old commented code Static ECH keys for now * Implement SendAsRetry
This commit is contained in:
12
context.go
12
context.go
@ -385,6 +385,17 @@ func (ctx Context) LoadModuleByID(id string, rawMsg json.RawMessage) (any, error
|
||||
return nil, fmt.Errorf("module value cannot be null")
|
||||
}
|
||||
|
||||
// if this is an app module, keep a reference to it,
|
||||
// since submodules may need to reference it during
|
||||
// provisioning (even though the parent app module
|
||||
// may not be fully provisioned yet; this is the case
|
||||
// with the tls app's automation policies, which may
|
||||
// refer to the tls app to check if a global DNS
|
||||
// module has been configured for DNS challenges)
|
||||
if appModule, ok := val.(App); ok {
|
||||
ctx.cfg.apps[id] = appModule
|
||||
}
|
||||
|
||||
ctx.ancestry = append(ctx.ancestry, val)
|
||||
|
||||
if prov, ok := val.(Provisioner); ok {
|
||||
@ -471,7 +482,6 @@ func (ctx Context) App(name string) (any, error) {
|
||||
if appRaw != nil {
|
||||
ctx.cfg.AppsRaw[name] = nil // allow GC to deallocate
|
||||
}
|
||||
ctx.cfg.apps[name] = modVal.(App)
|
||||
return modVal, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user