Documentation
¶
Overview ¶
Package tunnel implements TCP/UDP forwarding over WireGuard.
Index ¶
- func Apoxy4To6Range() netip.Prefix
- func CreateKernelTunnel(addr netip.Prefix, bind conn.Bind, verbose bool) (*kernelTunnel, error)
- func CreateUserspaceTunnel(ctx context.Context, addr netip.Addr, bind conn.Bind, socksPort uint16, ...) (*userspaceTunnel, error)
- func NewApoxy4To6Prefix(orgID uuid.UUID, endpoint string) netip.Prefix
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apoxy4To6Range ¶
Apoxy4To6Range returns the Unique Local Adddres prefix used by Apoxy for IPv4 to IPv6 translation.
func CreateKernelTunnel ¶ added in v0.4.1
CreateKernelTunnel creates a new kernel tunnel interface (TUN).
Types ¶
type Tunnel ¶
type Tunnel interface { io.Closer // Peers returns the public keys of the peers in the tunnel. Peers() ([]wireguard.PeerConfig, error) // AddPeer adds a new peer to the tunnel. AddPeer(peerConf *wireguard.PeerConfig) error // RemovePeer removes a peer from the tunnel. RemovePeer(publicKey string) error // PublicKey returns the public key of this end of the tunnel. PublicKey() string // InternalAddress returns the internal address of this end of the tunnel. InternalAddress() netip.Prefix // ListenPort returns the local listen port of this end of the tunnel. ListenPort() (uint16, error) }
Tunnel is a WireGuard tunnel.
Click to show internal directories.
Click to hide internal directories.