How to make OpenClash automatically resolve IPs to hostnames? #4128
Replies: 3 comments 3 replies
-
请恕我并非专业人士,或许你可以尝试检查你的DNS解析流程,正确地做法是让客户端的DNS请求直接发送给openclash。 此外,不建议你在配置文件中使用如此多的DNS服务器,default-nameserver组是用来解析代理节点域名的更不需要这么多,各组保留三个左右有效快速的即可,也更推荐使用namepolicy功能替代fallback组。 |
Beta Was this translation helpful? Give feedback.
-
I have made progress in identifying this problem. IPs are only resolved to domains if I do the following:
Visiting a site instead of the first step doesn't work. Using an IP address instead of the domain (e.g. |
Beta Was this translation helpful? Give feedback.
-
The problem seemed to be that some of the applications I was using were ignoring the specified DNS (router IP) that was set in network connections. I don't know how to solve such problem, but at least it works fine for most applications. I guess I can make some script that would ping domains in my list and resolve them. Unfortunately I have no idea how to do this in case of a huge number of random subdomains. |
Beta Was this translation helpful? Give feedback.
-
Hello. I apologize for the probably stupid question, but I've been trying to find an answer by myself for a few days and decided it would be better to just ask more experienced people. I use an offline configuration file with rules for site domains, but for most connections OpenClash doesn't resolve IPs to domains and therefore the domains' rules are not applied. It is important to note that OpenClash itself works fine if I use it without rules or for IPs that can be resolved.
I have rebooted both router and computer several times, and looked through almost every option in settings, but I could not find a solution on my own, neither in practice nor by searching. I also read general documentation (via translator). I have a hard time searching for my problem because I can only formulate a search query in English. I feel like I'm missing some simple detail because I'm just getting familiar with OpenClash.
My router is Xiaomi AX3000T (with ESMT NAND flash chip). Below I will give the contents of "Config File Edited By OpenClash For Running" and the current network & dhcp settings of OpenWrt.
OpenWrt's network file:
OpenWrt's dhcp file:
I also disabled IPv6 everywhere. I use 192.168.2.1 for LAN because I have two routers connected to each other. I use router without OpenWrt for WiFi and router with OpenWrt only for connection via ethernet cable and routing. I had no problems with the routers themselves.
Otherwise my OpenWrt settings are standard. I'm using the latest stable version (23.05.5). Before installing OpenClash I used "miniupnpd" for some time (it is still installed).
I installed OpenClash in the following way:
Beta Was this translation helpful? Give feedback.
All reactions