proxy: added the ability to log forwarder

This commit is contained in:
nadoo committed 2019-09-18 12:53:04 +08:00
1 parent c2425e67de
commit 063dc1bc01
22 files changed
+138 -141

No files matched your search

+3 -1
View File
@@ -32,7 +32,9 @@ func (s *Reject) Addr() string { return "REJECT" }
func (s *Reject) NextDialer(dstAddr string) proxy.Dialer { return s }
// Dial connects to the address addr on the network net via the proxy.
func (s *Reject) Dial(network, addr string) (net.Conn, error) { return nil, errors.New("REJECT") }
func (s *Reject) Dial(network, addr string) (net.Conn, string, error) {
return nil, "REJECT", errors.New("REJECT")
}
// DialUDP connects to the given address via the proxy.
func (s *Reject) DialUDP(network, addr string) (net.PacketConn, net.Addr, error) {