iprule

package
v0.0.0-...-851e5e8 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package iprule provides Go API for interacting with ip rule.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router uses `ip rule` under the hood

func NewRouter

func NewRouter(rpFilterManager routes.RPFilterManager, fwmark uint32) *Router

NewRouter is a default constructor for Router

func (*Router) CleanupRouting

func (r *Router) CleanupRouting() error

CleanupRouting for client node enable routing through exit node

func (*Router) SetupRoutingRules

func (r *Router) SetupRoutingRules(
	vpnInterface net.Interface,
	ipv6Enabled bool,
	enableLocal bool,
) (err error)

SetupRoutingRules setup or adjust policy based routing rules

func (*Router) TableID

func (r *Router) TableID() uint

Jump to

Keyboard shortcuts

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