Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxInFlight = 1024
MaxInFlight bounds the number of datagrams handled concurrently per entrypoint so a flood of packets cannot spawn unbounded goroutines.
View Source
var MaxPacketSize = 65535
MaxPacketSize is the read buffer size for a single datagram.
65535 is the maximum theoretical UDP payload size.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler processes a single datagram. It may write a response back to the peer through conn.WriteTo(resp, addr). Returning an error stops the chain and drops the packet.
type Middleware ¶
type UDP ¶
type UDP struct {
Routers map[string]Router `cfg:"routers"`
Middlewares map[string]UDPMiddleware `cfg:"middlewares"`
}
type UDPMiddleware ¶
type UDPMiddleware struct {
DNSMiddleware *dns.DNS `cfg:"dns"`
RedirectMiddleware *redirect.Redirect `cfg:"redirect"`
IPAllowListMiddleware *ipallowlist.IPAllowList `cfg:"ip_allow_list"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
middleware
|
|
|
dns
Package dns is a UDP middleware that answers DNS queries from a set of statically configured records, falling back to upstream resolvers for names it does not own.
|
Package dns is a UDP middleware that answers DNS queries from a set of statically configured records, falling back to upstream resolvers for names it does not own. |
Click to show internal directories.
Click to hide internal directories.