netstack_exports

package
v1.4.4-alpha1202-diff-... Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exports = map[string]interface{}{
	"CreatePrivilegedDevice":        _createPrivilegedDevice,
	"CreatePrivilegedDeviceWithMTU": _createPrivilegedDeviceWithMTU,
	"NewVMFromDevice":               _newVMFromDevice,
	"NewVMFromDeviceWithContext":    _newVMFromDeviceWithContext,
	"GetSystemRouteManager":         netstackvm.GetSystemRouteManager,
}

Exports provides yaklang bindings for netstack functionality

Functions

This section is empty.

Types

type NetstackVM

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

NetstackVM wraps TunVirtualMachine and provides methods for yaklang

func (*NetstackVM) Close

func (vm *NetstackVM) Close() error

Close closes the VM and all associated resources

func (*NetstackVM) GetTunnelName

func (vm *NetstackVM) GetTunnelName() string

GetTunnelName returns the name of the TUN device (e.g., "utun3")

func (*NetstackVM) StartForwarding

func (vm *NetstackVM) StartForwarding(ch interface{}) error

StartForwarding starts forwarding TCP connections to the provided channel The channel should be created in yaklang script using: connChan = make(chan any) This channel can then be passed to MITM's extraIncomingConn option

func (*NetstackVM) StartForwardingCallbackMode

func (vm *NetstackVM) StartForwardingCallbackMode(handle func(conn net.Conn) error) error

func (*NetstackVM) StartForwardingSafeChannel

func (vm *NetstackVM) StartForwardingSafeChannel(ch *chanx.UnlimitedChan[net.Conn]) error

Jump to

Keyboard shortcuts

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