redir, dns: IncFailures on non-timeout errors (#133)

This commit is contained in:
wuudjac authored and GitHub committed 2020-04-28 15:18:19 +08:00
1 parent c2d9c67214
commit 22e0576b53
6 files changed
+40 -12

No files matched your search

+4 -1
View File
@@ -5,11 +5,14 @@ import "net"
// Proxy is a dialer manager
type Proxy interface {
// Dial connects to the given address via the proxy.
Dial(network, addr string) (c net.Conn, proxy string, err error)
Dial(network, addr string) (c net.Conn, dialer Dialer, err error)
// DialUDP connects to the given address via the proxy.
DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr, err error)
// Get the dialer by dstAddr
NextDialer(dstAddr string) Dialer
// Record records result while using the dialer from proxy.
Record(dialer Dialer, success bool)
}