netstack_provider

package
v0.0.0-...-c97221a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const AppTopicConfigShaper = "config:shaper"

Variables

This section is empty.

Functions

func InitUserspaceShaper

func InitUserspaceShaper(eventBus eventbus.EventBus)

func New

func New() (*client, error)

New create new WireGuard client in full userspace environment using netstack.

Types

type Net

type Net netTun

func CreateNetTUN

func CreateNetTUN(localAddresses []netip.Addr, dnsPort, mtu int) (tun.Device, *Net, error)

func CreateNetTUNWithStack

func CreateNetTUNWithStack(localAddresses []netip.Addr, dnsPort, mtu int) (tun.Device, *Net, *stack.Stack, error)

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader, limiter *rate.Limiter) *Reader

NewReader returns a reader that implements io.Reader with rate limiting.

func NewReaderWithContext

func NewReaderWithContext(r io.Reader, ctx context.Context) *Reader

NewReaderWithContext returns a reader that implements io.Reader with rate limiting.

func (*Reader) Read

func (s *Reader) Read(p []byte) (int, error)

Read reads bytes into p.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL