mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-14 05:00:19 +02:00
Add root-level inbound_mtls_profiles combining optional system CAs with PEM CA files, and entrypoint.inbound_mtls_profile to require client certificates on every HTTPS connection. Route-level inbound_mtls_profile is allowed only without a global profile; per-handshake TLS picks ClientCAs from SNI, and requests fail with 421 when Host and SNI would select different mTLS routes. Compile pools at init (SetInboundMTLSProfiles from state.initEntrypoint) and reject unknown profile refs or mixed global-plus-route configuration. Extend config.example.yml and package READMEs; add entrypoint and config tests for TLS mutation, handshakes, and validation.
19 lines
661 B
Go
19 lines
661 B
Go
package entrypoint
|
|
|
|
import (
|
|
"github.com/yusing/godoxy/internal/logging/accesslog"
|
|
"github.com/yusing/godoxy/internal/route/rules"
|
|
)
|
|
|
|
// Config defines the entrypoint configuration for proxy handling,
|
|
// including proxy protocol support, routing rules, middlewares, and access logging.
|
|
type Config struct {
|
|
SupportProxyProtocol bool `json:"support_proxy_protocol"`
|
|
InboundMTLSProfile string `json:"inbound_mtls_profile,omitempty"`
|
|
Rules struct {
|
|
NotFound rules.Rules `json:"not_found"`
|
|
} `json:"rules"`
|
|
Middlewares []map[string]any `json:"middlewares"`
|
|
AccessLog *accesslog.RequestLoggerConfig `json:"access_log"`
|
|
}
|