Documentation ¶
Overview ¶
Package l4postgres allows the L4 multiplexing of Postgres connections
With thanks to docs and code published at these links: ref: https://github.com/divyam234/caddy-l4/blob/master/modules/l4ssh/matcher.go ref: https://github.com/rueian/pgbroker/blob/master/message/startup_message.go ref: https://github.com/traefik/traefik/blob/master/pkg/server/router/tcp/postgres.go ref: https://ivdl.co.za/2024/03/02/pretending-to-be-postgresql-part-one-1/ ref: https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-STARTUPMESSAGE ref: https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-SSLREQUEST
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchPostgres ¶
type MatchPostgres struct{}
MatchPostgres is able to match Postgres connections.
func (*MatchPostgres) CaddyModule ¶
func (*MatchPostgres) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*MatchPostgres) Match ¶
func (m *MatchPostgres) Match(cx *layer4.Connection) (bool, error)
Match returns true if the connection looks like the Postgres protocol.
func (*MatchPostgres) UnmarshalCaddyfile ¶
func (m *MatchPostgres) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile sets up the MatchPostgres from Caddyfile tokens. Syntax:
postgres