Skip to content

DNS: change error loglevel for DOH for NXDOMAIN#4558

Closed
patterniha wants to merge 1 commit intoXTLS:mainfrom
patterniha:main
Closed

DNS: change error loglevel for DOH for NXDOMAIN#4558
patterniha wants to merge 1 commit intoXTLS:mainfrom
patterniha:main

Conversation

@patterniha
Copy link
Collaborator

@patterniha patterniha commented Mar 27, 2025

dns-query-answer for some domains contains no ip, NXDOMAIN

nslookup jkasssahdjashdjh.com

-> server can't find jkasssahdjashdjh.com: NXDOMAIN

in Xray-core when dns is DOH and and dns-query answer has no ip (NXDOMAIN), an error-log is created and printed:

2025/03/27 17:09:46.372277 [Error] app/dns: failed to retrieve response for jkasssahdjashdjh.com. > Post "https://free.shecan.ir/dns-query": context canceled

this log is only shown for DOH-dns, and we have no log for other types of dns.

///

some apps in android constantly asking for IP of an invalid domain(NXDOMAIN), this causes thousands of unnecessary logs in v2rayNG and slows down the app.

///

this is only a temporary solution.(and only for log)

@patterniha
Copy link
Collaborator Author

patterniha commented Mar 27, 2025

Also, I think NXDOMAIN should be cache for 2 minutes to avoid consecutive requests which, in addition to the log, also has a negative impact on the network.

@Meo597 I think this is yours.

@Fangliding
Copy link
Member

Fangliding commented Mar 27, 2025

还是 #3784
NXDOMAIN 不缓存错误 导致N次请求最终爆炸 主流DOH服务器的行为如果连续query相同的请求会返回400 只是返回这个err叫context canceled
还是我在PR标题写的那句话

是否要其他人为这些DNS灵车爱好者买单?

这不 买单的来了 如果不是Yuhan觉得应该修按我当时的判断就是直接关了 那个pr当初没加配置项是因为不想在配置文件堆垃圾 不过我想你们俩现在应该也都知道怎么加字段了 那就继续扩这没啥人用的字段就行了 我管不着了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants