Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateInterfaceName ¶
func KernelTunSupported ¶
Types ¶
type Handler ¶
type Handler struct {
HandlerSettings
// contains filtered or unexported fields
}
Handler is an outbound connection that silently swallow the entire payload.
func New ¶
func New(settings HandlerSettings) (*Handler, error)
New creates a new wireguard handler.
func (*Handler) HandleFlow ¶
func (h *Handler) HandleFlow(ctx context.Context, destination net.Destination, rw buf.ReaderWriter) error
Process implements OutboundHandler.Dispatch().
func (*Handler) HandlePacketConn ¶
func (h *Handler) HandlePacketConn(ctx context.Context, dst net.Destination, pc udp.PacketReaderWriter) error
type HandlerSettings ¶
type HandlerSettings struct {
Name string
Conf *wireguard.DeviceConfig
// used to resolve request addresses
DnsForRequestAddress i.IPResolver
DnsForEndpoint i.IPResolver
// control how to resolve peer's endpoint
Strategy domain.DomainStrategy
Dialer i.Dialer
}
Click to show internal directories.
Click to hide internal directories.