1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 01:27:03 -05:00

include question section in dns response

This commit is contained in:
Darien Raymond 2019-02-12 13:29:12 +01:00
parent 3539ae9c38
commit 69e8db7bbe
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -216,6 +216,13 @@ func (h *Handler) handleIPQuery(id uint16, qType dnsmessage.Type, domain string,
RCode: dnsmessage.RCodeSuccess,
Response: true,
})
builder.EnableCompression()
common.Must(builder.StartQuestions())
common.Must(builder.Question(dnsmessage.Question{
Name: dnsmessage.MustNewName(domain),
Class: dnsmessage.ClassINET,
Type: qType,
}))
common.Must(builder.StartAnswers())
rHeader := dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName(domain), Class: dnsmessage.ClassINET, TTL: 600}