router

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyDialFn added in v1.0.1

type ProxyDialFn func(network, host string, port uint16) (net.Conn, error)

type Router added in v1.0.1

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

func NewRouter added in v1.0.1

func NewRouter(serveIP, fallbackDNS, mmdbFile string, proxyDial ProxyDialFn) *Router

func (*Router) DirectHandle added in v1.0.1

func (r *Router) DirectHandle(conn net.Conn, addr string) error

func (*Router) ProxyHandle added in v1.0.1

func (r *Router) ProxyHandle(conn net.Conn, domain string, port uint16) error

func (*Router) RouteHandle added in v1.0.1

func (r *Router) RouteHandle(conn net.Conn, domain string, port uint16) (err error)

func (*Router) ServeDNS added in v1.0.1

func (r *Router) ServeDNS(w dns.ResponseWriter, req *dns.Msg)

func (*Router) SetRules added in v1.0.1

func (r *Router) SetRules(blockList, directList, proxyList, directCIDRs []string)

Jump to

Keyboard shortcuts

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