Documentation ¶
Index ¶
- func ResolvePeers(ctx context.Context, router adapter.Router, peers []PeerConfig) error
- type ClientBind
- func (c *ClientBind) BatchSize() int
- func (c *ClientBind) Close() error
- func (c *ClientBind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort uint16, err error)
- func (c *ClientBind) ParseEndpoint(s string) (conn.Endpoint, error)
- func (c *ClientBind) Reset()
- func (c *ClientBind) Send(bufs [][]byte, ep conn.Endpoint) error
- func (c *ClientBind) SetMark(mark uint32) error
- func (c *ClientBind) SetReservedForEndpoint(destination netip.AddrPort, reserved [3]byte)
- type Device
- type Endpoint
- type PeerConfig
- type SystemDevice
- func (w *SystemDevice) BatchSize() int
- func (w *SystemDevice) Close() error
- func (w *SystemDevice) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)
- func (w *SystemDevice) Events() <-chan wgTun.Event
- func (w *SystemDevice) File() *os.File
- func (w *SystemDevice) Flush() error
- func (w *SystemDevice) Inet4Address() netip.Addr
- func (w *SystemDevice) Inet6Address() netip.Addr
- func (w *SystemDevice) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
- func (w *SystemDevice) MTU() (int, error)
- func (w *SystemDevice) Name() (string, error)
- func (w *SystemDevice) Read(bufs [][]byte, sizes []int, offset int) (count int, err error)
- func (w *SystemDevice) Start() error
- func (w *SystemDevice) Write(bufs [][]byte, offset int) (count int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolvePeers ¶ added in v1.8.0
Types ¶
type ClientBind ¶
type ClientBind struct {
// contains filtered or unexported fields
}
func NewClientBind ¶
func (*ClientBind) BatchSize ¶ added in v1.3.0
func (c *ClientBind) BatchSize() int
func (*ClientBind) Close ¶
func (c *ClientBind) Close() error
func (*ClientBind) Open ¶
func (c *ClientBind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort uint16, err error)
func (*ClientBind) ParseEndpoint ¶
func (c *ClientBind) ParseEndpoint(s string) (conn.Endpoint, error)
func (*ClientBind) Reset ¶
func (c *ClientBind) Reset()
func (*ClientBind) SetMark ¶
func (c *ClientBind) SetMark(mark uint32) error
func (*ClientBind) SetReservedForEndpoint ¶ added in v1.3.0
func (c *ClientBind) SetReservedForEndpoint(destination netip.AddrPort, reserved [3]byte)
type Endpoint ¶
func (Endpoint) DstToBytes ¶
func (Endpoint) DstToString ¶
func (Endpoint) SrcToString ¶
type PeerConfig ¶ added in v1.8.0
type PeerConfig struct { Endpoint netip.AddrPort PublicKey string AllowedIPs []string Reserved [3]uint8 // contains filtered or unexported fields }
func ParsePeers ¶ added in v1.8.0
func ParsePeers(options option.WireGuardOutboundOptions) ([]PeerConfig, error)
func (PeerConfig) GenerateIpcLines ¶ added in v1.8.0
func (c PeerConfig) GenerateIpcLines() string
type SystemDevice ¶
type SystemDevice struct {
// contains filtered or unexported fields
}
func NewSystemDevice ¶
func (*SystemDevice) BatchSize ¶ added in v1.3.0
func (w *SystemDevice) BatchSize() int
func (*SystemDevice) Close ¶
func (w *SystemDevice) Close() error
func (*SystemDevice) DialContext ¶
func (*SystemDevice) Events ¶
func (w *SystemDevice) Events() <-chan wgTun.Event
func (*SystemDevice) File ¶
func (w *SystemDevice) File() *os.File
func (*SystemDevice) Flush ¶
func (w *SystemDevice) Flush() error
func (*SystemDevice) Inet4Address ¶ added in v1.3.0
func (w *SystemDevice) Inet4Address() netip.Addr
func (*SystemDevice) Inet6Address ¶ added in v1.3.0
func (w *SystemDevice) Inet6Address() netip.Addr
func (*SystemDevice) ListenPacket ¶
func (w *SystemDevice) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
func (*SystemDevice) MTU ¶
func (w *SystemDevice) MTU() (int, error)
func (*SystemDevice) Name ¶
func (w *SystemDevice) Name() (string, error)
func (*SystemDevice) Start ¶
func (w *SystemDevice) Start() error
Click to show internal directories.
Click to hide internal directories.