Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProxyClosed = stderrors.New("tcpee: proxy closed")
ErrProxyClosed will be returned upon proxy close.
Functions ¶
This section is empty.
Types ¶
type TCPProxy ¶
type TCPProxy struct {
// Name is the name of this proxy server, used when
// logging to codeberg.org/gruf/go-logger/v4/log.Logger{}
Name string
// ProxyProto determines whether to write proxy protocol headers
// for each proxied TCP connection. The header is proxy protocol
// v1 compatible, and more information can be found here:
// https://www.haproxy.org/download/2.6/doc/proxy-protocol.txt
ProxyProto bool
// DialTimeout is the maximum time a dial
// will wait for a connection to complete.
DialTimeout time.Duration
// ClientTimeout is the maximum time a client conn may idle before
// being forcibly closed. Note that longer timeout periods
// will be more efficient as they require less-frequent checks.
ClientTimeout time.Duration
// ServerTimeout is the maximum time a server conn may idle before
// being forcibly closed. Note that longer timeout periods
// will be more efficient as they require less-frequent checks.
ServerTimeout time.Duration
// ClientKeepAlive specifies the keep-alive period for conns from
// the client. If zero, keep-alives are enabled with a default
// value. If negative, keep-alives are disabled.
ClientKeepAlive time.Duration
// ServerKeepAlive specifies the keep-alive period for conns to
// the server. If zero, keep-alives are enabled with a default
// value. If negative, keep-alives are disabled.
ServerKeepAlive time.Duration
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.