Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer enforces policy before opening outbound connections.
func NewDialer ¶
func NewDialer(cfg DialerConfig) *Dialer
type DialerConfig ¶
type Limits ¶
type Limits struct {
MaxRequests int
MaxBytesSent int64
MaxBytesReceived int64
MaxRuntime time.Duration
}
Limits defines optional per-session network caps.
type Meter ¶
type Meter struct {
// contains filtered or unexported fields
}
Meter tracks and enforces network usage limits.
func NewMeterFromUsage ¶
type Policy ¶
type Policy struct {
Mode Mode
AllowDomains []string
AllowCIDRs []netip.Prefix
AllowPorts map[int]struct{}
DenyPrivateRanges bool
}
Policy defines destination-level networking restrictions.
func DefaultPolicy ¶
func DefaultPolicy() Policy
DefaultPolicy returns a permissive policy for backward compatibility.
Click to show internal directories.
Click to hide internal directories.