Versions in this module Expand all Collapse all v0 v0.4.0 Nov 25, 2024 Changes in this version + const DefaultMTU + func TCPForwarder(ctx context.Context, conf *TCPForwarderConfig) func(ipstack *stack.Stack, req *tcp.ForwarderRequest) + type NetTun struct + func CreateNetTUN(localAddresses, dnsServers []netip.Addr, mtu *int) (tun.Device, *NetTun, error) + func (tun *NetTun) BatchSize() int + func (tun *NetTun) Close() error + func (tun *NetTun) DialContext(ctx context.Context, network, address string) (net.Conn, error) + func (tun *NetTun) EnableForwarding(tcpHandler func(*stack.Stack, *tcp.ForwarderRequest), promiscuous bool) error + func (tun *NetTun) Events() <-chan tun.Event + func (tun *NetTun) File() *os.File + func (tun *NetTun) LocalAddresses() []netip.Prefix + func (tun *NetTun) LookupContextHost(ctx context.Context, host string) ([]string, error) + func (tun *NetTun) MTU() (int, error) + func (tun *NetTun) Name() (string, error) + func (tun *NetTun) Read(buf [][]byte, sizes []int, offset int) (int, error) + func (tun *NetTun) Write(buf [][]byte, offset int) (int, error) + func (tun *NetTun) WriteNotify() + type TCPForwarderConfig struct + AllowedDestinations []netip.Prefix + DeniedDestinations []netip.Prefix + Upstream network.Network