Documentation
¶
Overview ¶
Package forward directly forwards WireGuard UDP packets between local and target endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidConfig = errors.New("invalid forward configuration")
ErrInvalidConfig indicates a missing or invalid forwarding endpoint.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Listen netip.AddrPort
Target target.Endpoint
Reserved wgpacket.Reserved
Resolver target.Resolver
TargetListenConfig net.ListenConfig
Logger *slog.Logger
}
Config defines one local listener and upstream WireGuard target.
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder owns one direct bidirectional WireGuard UDP forwarding path.
func (*Forwarder) Close ¶
Close stops forwarding and waits for target preparation and both UDP directions to exit.