Documentation
¶
Overview ¶
Package gateway implements bounded explicit application gateways.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Protocol string
Listen string
Upstream string
// Empty permits loopback clients only, even on a wildcard listener.
AllowedClients []netip.Prefix
MaxConnections int
IdleTimeout time.Duration
IOTimeout time.Duration
SessionTimeout time.Duration
// UDP DNS responses are also limited to three times the query length.
MaxDNSResponseBytes int
// TLSCert/TLSKey enable implicit TLS; Postgres/MySQL use SSLRequest negotiation.
TLSCert, TLSKey string
// UpstreamTLS verifies the pinned destination against this name and CA pool.
UpstreamTLS bool
UpstreamServerName, UpstreamCA string
UpstreamCert, UpstreamKey string
// ClientCA requires and verifies listener client certificates when set.
ClientCA string
MaxMessageBytes int
MaxSessionMessages int
MaxStateEntries int
}
type Evaluator ¶
Evaluator is implemented by policy.Compiled. Implementations must be concurrency safe.
type Gateway ¶
type Gateway struct {
Operations *runtimeobs.Monitor
// contains filtered or unexported fields
}
func (*Gateway) Serve ¶
Serve owns and closes l. Cancellation closes active connections and waits for all handlers. Each client has at most one upstream connection and outstanding ADU.
func (*Gateway) ServePacket ¶
ServePacket owns pc. Single-question IN queries may carry one bounded EDNS0 OPT.