From 156af4241d545f57cf6af2a67c1d52a21c5ff07e Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 10 Sep 2018 22:12:07 +0200 Subject: [PATCH] add some logs --- app/dns/udpns.go | 4 ++++ testing/servers/udp/udp.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/app/dns/udpns.go b/app/dns/udpns.go index 5c4a972c..fe1513c0 100644 --- a/app/dns/udpns.go +++ b/app/dns/udpns.go @@ -6,6 +6,8 @@ import ( "sync/atomic" "time" + "v2ray.com/core/common/session" + "github.com/miekg/dns" "v2ray.com/core" "v2ray.com/core/common" @@ -269,6 +271,8 @@ func msgToBuffer(msg *dns.Msg) (*buf.Buffer, error) { } func (s *ClassicNameServer) sendQuery(ctx context.Context, domain string) { + newError("querying DNS for: ", domain).AtDebug().WriteToLog(session.ExportIDToError(ctx)) + msgs := s.buildMsgs(domain) for _, msg := range msgs { diff --git a/testing/servers/udp/udp.go b/testing/servers/udp/udp.go index 22e47689..54e947d1 100644 --- a/testing/servers/udp/udp.go +++ b/testing/servers/udp/udp.go @@ -23,6 +23,8 @@ func (server *Server) Start() (net.Destination, error) { return net.Destination{}, err } server.Port = net.Port(conn.LocalAddr().(*net.UDPAddr).Port) + fmt.Println("UDP server started on port ", server.Port) + server.conn = conn go server.handleConnection(conn) localAddr := conn.LocalAddr().(*net.UDPAddr)