mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 01:15:41 +08:00
rule: log next dialer in verbose mode. (#92)
Print out the next dialer is useful when a particular website does not load completely, and it helps when updating config rules.
This commit is contained in:
parent
9595fcf0c0
commit
69bbaa809c
@ -99,12 +99,16 @@ func (rd *Dialer) NextDialer(dstAddr string) proxy.Dialer {
|
||||
|
||||
// Dial dials to targer addr and return a conn
|
||||
func (rd *Dialer) Dial(network, addr string) (net.Conn, error) {
|
||||
return rd.NextDialer(addr).Dial(network, addr)
|
||||
d := rd.NextDialer(addr)
|
||||
log.F("[Dial] %s => %s", addr, d.Addr())
|
||||
return d.Dial(network, addr)
|
||||
}
|
||||
|
||||
// DialUDP connects to the given address via the proxy
|
||||
func (rd *Dialer) DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr, err error) {
|
||||
return rd.NextDialer(addr).DialUDP(network, addr)
|
||||
d := rd.NextDialer(addr)
|
||||
log.F("[DialUDP] %s => %s", addr, d.Addr())
|
||||
return d.DialUDP(network, addr)
|
||||
}
|
||||
|
||||
// AddDomainIP used to update ipMap rules according to domainMap rule
|
||||
|
Loading…
Reference in New Issue
Block a user