Version: v1.0.3 Latest Latest

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

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




This section is empty.


This section is empty.


This section is empty.


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) SetBlockRules added in v1.0.3

func (r *Router) SetBlockRules(blockList []string)

func (*Router) SetCountryCIDRs added in v1.0.3

func (r *Router) SetCountryCIDRs(directCIDRs []string)

func (*Router) SetDirectRules added in v1.0.3

func (r *Router) SetDirectRules(directList []string)

func (*Router) SetProxyRules added in v1.0.3

func (r *Router) SetProxyRules(proxyList []string)

Jump to

Keyboard shortcuts

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