sys

package
v0.0.0-...-84c4fc0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(config *NetConfig) (string, error)

Types

type NetConfig

type NetConfig struct {
	IgnoreCidr []string `json:"ignoreCidr"`
	LanCidr    string   `json:"lanCidr"`
	PoxyPort   int      `json:"poxyPort"`
	ProxyMark  int      `json:"proxyMark"`
}

type NetworkManger

type NetworkManger struct {
	Rule *NetConfig
}

func NewNetworkManger

func NewNetworkManger(config *NetConfig) *NetworkManger

func (*NetworkManger) AddViaRoute

func (net *NetworkManger) AddViaRoute() error

func (*NetworkManger) DelViaRoute

func (net *NetworkManger) DelViaRoute() error

func (*NetworkManger) DisableNat

func (net *NetworkManger) DisableNat() error

func (*NetworkManger) EnableNat

func (net *NetworkManger) EnableNat() error

func (*NetworkManger) FlushRule

func (net *NetworkManger) FlushRule() error

func (*NetworkManger) ReloadIptables

func (net *NetworkManger) ReloadIptables() error

Jump to

Keyboard shortcuts

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