Skip to content

Commit

Permalink
+version.bind
Browse files Browse the repository at this point in the history
  • Loading branch information
mili-tan committed Oct 12, 2024
1 parent 5a12cb3 commit 7fca3aa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Arashi.Aoi/Routes/DnsQueryRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ await ReturnContext(context, returnMsg, msg, null,
return;
}

if (qMsg.Questions.First().RecordClass == RecordClass.Chaos && qMsg.Questions.First().RecordType == RecordType.Txt &&
qMsg.Questions.First().Name.IsEqualOrSubDomainOf(DomainName.Parse("version.bind")))
{
var msg = qMsg.CreateResponseInstance();
msg.IsRecursionAllowed = true;
msg.IsRecursionDesired = true;
msg.AnswerRecords.Add(
new TxtRecord(qMsg.Questions.First().Name, 3600, "ArashiDNS.Aoi"));

await ReturnContext(context, returnMsg, msg, qMsg,
transIdEnable: idTe.idEnable, trimEnable: idTe.teEnable);
return;
}

if (qMsg.Questions.First().RecordType == RecordType.Any && !Config.AnyTypeEnable)
{
var msg = qMsg.CreateResponseInstance();
Expand Down

0 comments on commit 7fca3aa

Please sign in to comment.