system

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AliasIP added in v0.12.0

func AliasIP(ctx context.Context, alias string) error

func FreePort

func FreePort(preference int) (int, error)

func IsElevated

func IsElevated() (bool, error)

func OpenPort added in v0.7.0

func OpenPort(port int) bool

func ResetSocksProxy added in v0.12.0

func ResetSocksProxy() error

func SetSocksProxy added in v0.12.0

func SetSocksProxy(host, port string) error

func UnaliasIP added in v0.12.0

func UnaliasIP(ctx context.Context, alias string) error

Types

type HostsSection added in v0.15.0

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

func NewHostsSection added in v0.15.0

func NewHostsSection(name string) (*HostsSection, error)

func (*HostsSection) Add added in v0.15.0

func (s *HostsSection) Add(address string, hosts ...string)

func (*HostsSection) Clear added in v0.15.0

func (s *HostsSection) Clear()

func (*HostsSection) Flush added in v0.15.0

func (s *HostsSection) Flush() error

func (*HostsSection) Remove added in v0.15.0

func (s *HostsSection) Remove(address string)

Jump to

Keyboard shortcuts

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