Documentation ¶
Overview ¶
Package tunnel implements TCP/UDP forwarding over WireGuard.
Index ¶
- func Apoxy4To6Range() netip.Prefix
- func CreateKernelTunnel(ctx context.Context, projectID uuid.UUID, endpoint string) (*kernelTunnel, error)
- func CreateUserspaceTunnel(ctx context.Context, projectID uuid.UUID, endpoint string, 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
func CreateKernelTunnel( ctx context.Context, projectID uuid.UUID, endpoint string, ) (*kernelTunnel, error)
CreateKernelTunnel creates a new kernel tunnel interface (WireGuard).
Types ¶
type Tunnel ¶
type Tunnel interface { io.Closer // 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 // ExternalAddress returns the external address of this end of the tunnel. ExternalAddress() netip.AddrPort // 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 }
Tunnel is a WireGuard tunnel.
Click to show internal directories.
Click to hide internal directories.