netapp

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultDialer

func CreateDefaultDialer(IdleUDPTimeout time.Duration, xConfig *xconn.Config, EnableGRO bool) *client.Dialer

Types

type Context

type Context struct {
	SrcURL, DstURL *url.URL
	XConfig        *xconn.Config
	Dialer         *client.Dialer

	HTTPHandler           map[string]http.HandlerFunc
	TunnelDeviceTable     map[string]*tuntable.PeerTable
	TunnelTracker         TunnelTrackerFunc
	IdleUDPTimeout        time.Duration
	EnableGROOptimization bool

	// For Android library
	Device tun.Device
}

func NewContext

func NewContext(IdleUDPTimeout time.Duration, xConfig *xconn.Config, srcURL, dstURL *url.URL) *Context

func (*Context) Clone

func (c *Context) Clone() *Context

func (*Context) CreateListener

func (tunnelContext *Context) CreateListener(ctx context.Context, listenURL *url.URL) (net.Listener, []url.URL, error)

func (*Context) Serve

func (tunnelContext *Context) Serve(ctx context.Context) error

type TunnelConfig

type TunnelConfig struct {
	MTU               int
	HostName, DevName string
	Gateway           *netip.Addr
	LocalNet          netip.Prefix
}

func ParseTunnelConfig

func ParseTunnelConfig(addr *url.URL) (*TunnelConfig, error)

type TunnelTrackerFunc

type TunnelTrackerFunc func(SourceURL *url.URL, DestinationURLs []*url.URL) io.Closer

Jump to

Keyboard shortcuts

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