mirror of https://github.com/v2ray/v2ray-core
add some logs
parent
5d9dacc261
commit
156af4241d
|
@ -6,6 +6,8 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"v2ray.com/core/common/session"
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"v2ray.com/core"
|
"v2ray.com/core"
|
||||||
"v2ray.com/core/common"
|
"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) {
|
func (s *ClassicNameServer) sendQuery(ctx context.Context, domain string) {
|
||||||
|
newError("querying DNS for: ", domain).AtDebug().WriteToLog(session.ExportIDToError(ctx))
|
||||||
|
|
||||||
msgs := s.buildMsgs(domain)
|
msgs := s.buildMsgs(domain)
|
||||||
|
|
||||||
for _, msg := range msgs {
|
for _, msg := range msgs {
|
||||||
|
|
|
@ -23,6 +23,8 @@ func (server *Server) Start() (net.Destination, error) {
|
||||||
return net.Destination{}, err
|
return net.Destination{}, err
|
||||||
}
|
}
|
||||||
server.Port = net.Port(conn.LocalAddr().(*net.UDPAddr).Port)
|
server.Port = net.Port(conn.LocalAddr().(*net.UDPAddr).Port)
|
||||||
|
fmt.Println("UDP server started on port ", server.Port)
|
||||||
|
|
||||||
server.conn = conn
|
server.conn = conn
|
||||||
go server.handleConnection(conn)
|
go server.handleConnection(conn)
|
||||||
localAddr := conn.LocalAddr().(*net.UDPAddr)
|
localAddr := conn.LocalAddr().(*net.UDPAddr)
|
||||||
|
|
Loading…
Reference in New Issue