Documentation
¶
Index ¶
- type ProxyDialFn
- type Router
- func (r *Router) DirectHandle(conn net.Conn, addr string) error
- func (r *Router) ProxyHandle(conn net.Conn, domain string, port uint16) error
- func (r *Router) RouteHandle(conn net.Conn, domain string, port uint16) (err error)
- func (r *Router) ServeDNS(w dns.ResponseWriter, req *dns.Msg)
- func (r *Router) SetBlockRules(blockList []string)
- func (r *Router) SetCountryCIDRs(directCIDRs []string)
- func (r *Router) SetDirectRules(directList []string)
- func (r *Router) SetProxyRules(proxyList []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyDialFn ¶ added in v1.0.1
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 (*Router) ProxyHandle ¶ added in v1.0.1
func (*Router) RouteHandle ¶ added in v1.0.1
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 (*Router) SetCountryCIDRs ¶ added in v1.0.3
func (*Router) SetDirectRules ¶ added in v1.0.3
func (*Router) SetProxyRules ¶ added in v1.0.3
Click to show internal directories.
Click to hide internal directories.