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) SetRules(blockList, directList, proxyList, directCIDRs []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
Click to show internal directories.
Click to hide internal directories.