utils

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SHELL = "/bin/sh"

Variables

This section is empty.

Functions

func Exec

func Exec(cmds ...string) (e error)

func RemoveRoute

func RemoveRoute(endpoint string, fwmark uint32) (er error)

func SetInterface

func SetInterface(name string, ips ...string) (er error)

func SetRouteTable

func SetRouteTable(name, endpoint string, fwmark uint32, dests ...netip.Prefix) (er error)

Types

type Bind added in v1.0.8

type Bind struct {
	conn.Bind
	// contains filtered or unexported fields
}

func NewResevedBind added in v1.0.8

func NewResevedBind(bind conn.Bind, reserved [3]byte) *Bind

func (*Bind) NewReceiveFunc added in v1.0.8

func (b *Bind) NewReceiveFunc(fn conn.ReceiveFunc) conn.ReceiveFunc

func (*Bind) Open added in v1.0.8

func (b *Bind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort uint16, err error)

func (*Bind) Send added in v1.0.8

func (b *Bind) Send(buf []byte, ep conn.Endpoint) error

func (*Bind) SetReseved added in v1.0.8

func (b *Bind) SetReseved(reserved [3]byte)

Jump to

Keyboard shortcuts

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