I previously compiled a practical record related to the current v4 configuration.
That article was relatively important for the ongoing maintenance of this configuration because it documented the process of a low-frequency DNS resolution anomaly from its appearance and diagnosis to the adjustment. However, due to relevant requirements, that Chinese article is no longer publicly available, and the original URL now returns an HTTP 404.
I have separately documented why I adjusted some Chinese articles at the time and the final approach the website adopted in another article:
Record of Handling the Discontinuation of Public Availability for Some Chinese Articles
This time, I am not restoring the original article, nor am I republishing the original text.
I want to reorganize a more concise technical record based on the v4 configuration actually in long-term use on my computer, retaining only the parts that still hold reference value.
More importantly:
The occasional DNS resolution timeout issue from back then has not reappeared after completing the v4 adjustments and using it continuously for a period of time.
Therefore, reviewing this adjustment now is no longer just about recording a configuration attempt; it also includes subsequent actual operating results as a reference.
1. Why I Am Reorganizing This Article
The address of the previous related record is:
https://www.shuijingwanwq.com/2026/07/06/19005/
Visiting this address now shows that the page is no longer available and returns an HTTP 404.
![[Figure 1: The previous related Chinese article is no longer publicly available]](https://media.shuijingwanwq.com/2026/08/1-55-1024x475.png)
Although the old article is no longer public, the v4 configuration recorded within it has remained in my actual usage environment ever since.
Through subsequent continuous use, I have not encountered the DNS resolution timeout that occasionally occurred every few days back then.
Therefore, I believe this part of the configuration is still worth reorganizing.
However, the focus of this article has shifted.
The old record leaned more towards:
Anomaly occurs
↓
Check logs
↓
Locate DNS resolution
↓
Adjust configuration
↓
Continue observing
While this reorganization leans more towards:
Review the v4 in actual use
↓
Explain the differences between v3 and v4
↓
Explain why only minor adjustments were made
↓
Record long-term usage results
This also better matches the actual current state of this configuration.
2. Configuration Maintenance Is Now Synced to GitHub
There is another rather important change this time.
Previously, the blog article itself assumed a considerable role in recording configurations. If the article was adjusted, looking back for a specific historical version later would be somewhat troublesome.
Therefore, from now on, this configuration will be synced and maintained on GitHub:
The repository currently contains:
metacubex-v1.yaml
metacubex-v2.yaml
metacubex-v3.yaml
metacubex-v4.yaml
Among them:
metacubex-v4.yaml
is the latest stable version.
![[Figure 2: The GitHub repository has added metacubex-v4.yaml and recorded the v4 update in the README]](https://media.shuijingwanwq.com/2026/08/2-45-1024x775.png)
If I continue to find areas that need optimization in the future, I will prioritize updating the GitHub repository and then sync the blog according to the actual situation.
If you are also referencing this configuration, I recommend bookmarking the GitHub repository.
Compared to a single fixed article, the repository is better suited as a long-term entry point for subsequent version updates and historical configuration lookups.
3. The Previous Issue Has Not Reoccurred
v3 was already quite stable overall during normal use.
However, I observed a very low-frequency phenomenon at the time:
Certain websites would occasionally experience brief DNS resolution timeouts.
It did not happen continuously.
The behavior at the time was roughly as follows:
- Normal use most of the time;
- Occurring perhaps once every two or three days;
- Waiting a few seconds or a dozen seconds after it occurred;
- Accessing it again usually restored normalcy.
When checking the logs at the time, entries similar to the following appeared:
dns resolve failed
all DNS requests failed
context deadline exceeded
As a result, the focus of my subsequent investigation gradually shifted to the DNS configuration.
However, I need to make a special note here:
This issue has not reoccurred.
After completing the v4 adjustments, I continued to use this configuration normally, and to date, I have not observed the original low-frequency DNS timeouts reappearing.
Of course, this does not strictly prove that a single configuration change is the sole reason.
The actual network environment itself changes, and DNS service status, route quality, and client versions can all affect the final behavior.
Therefore, I prefer to describe the current result as:
After the v4 adjustment, in my actual usage environment, the previously observed low-frequency DNS timeouts have not reappeared.
4. v4 Does Not Redesign the Entire Configuration
After encountering this issue at the time, I did not drastically modify the existing structure.
This is the most important concept behind v4.
v3 was already sufficient for daily use.
Redesigning the entire DNS configuration for an issue that only occurred occasionally every two or three days could introduce more variables instead.
Therefore, v4 did not adjust:
- The WireGuard node structure;
- The Wstunnel usage;
- The main routing rules;
- The overall structure of
GEOSITEandGEOIP; - The rule order already validated in v3.
What actually changed was mainly:
dns:
This part.
Simply put, it is:
Retaining the original approach and only adding fallback capabilities to a few positions that could become single points of failure.
5. What Are the Characteristics of the v3 DNS Configuration
The DNS configuration in v3 is relatively simple.
nameserver only has one DoH:
nameserver:
- https://dns.alidns.com/dns-query
fallback also only has one DoT:
fallback:
- tls://1.1.1.1:853
Additionally, there is no explicit configuration for:
default-nameserver
Under normal circumstances, these configurations work perfectly fine.
However, if one resolution endpoint experiences slow responses at a given moment, it could cause a brief resolution anomaly.
Therefore, v4 does not add many complex rules; it merely adds fallback options for a few specific positions.
6. Change 1: Adding default-nameserver
v4 first adds:
default-nameserver:
- 223.5.5.5
- 119.29.29.29
This is primarily used to handle the basic resolution of the DoH and DoT services’ own domains.
For example:
dns.alidns.com
doh.pub
These are domains themselves.
Before accessing the corresponding DoH services, the resolution of these domains themselves must be completed.
Therefore, adding two basic resolution endpoints makes the dependency at this layer more explicit.
This is not about rebuilding a DNS system; it simply adds a very small basic fallback to the existing configuration.
7. Change 2: Adding a Fallback DoH to nameserver
v3:
nameserver:
- https://dns.alidns.com/dns-query
v4:
nameserver:
- https://dns.alidns.com/dns-query
- https://doh.pub/dns-query
This means adding Tencent DoH alongside the original Alibaba public DoH.
The purpose of doing this is very simple:
To prevent the entire nameserver from relying on a single resolution endpoint.
A DNS service being stable over the long term does not mean it will never experience a brief delay.
Since the issue at hand was inherently a low-frequency, sporadic phenomenon, adding a fallback resolution endpoint aligns better with the goal of this adjustment than redesigning a large number of rules.
8. Change 3: Adding a Fallback DoT to fallback
v3:
fallback:
- tls://1.1.1.1:853
v4:
fallback:
- tls://1.1.1.1:853
- tls://8.8.8.8:853
That is, adding Google DoT alongside Cloudflare DoT.
The approach is similar to nameserver:
Avoiding a single resolution endpoint becoming the sole dependency as much as possible.
I also did not add a third, fourth, or even more services here.
This is because the goal of v4 is not to make the configuration “comprehensive”, but rather to add an appropriate amount of redundancy to the existing configuration without significantly increasing maintenance complexity.
9. The Changes Between v3 and v4 Are Actually Very Minor
By directly comparing the DNS sections of the two versions, you can see that the added content is quite limited.
![[Figure 3: DNS configuration differences between v3 and v4]](https://media.shuijingwanwq.com/2026/08/3-39.png)
There are mainly three changes:
1. Added default-nameserver
2. nameserver
Increased from 1 DoH to 2
3. fallback
Increased from 1 DoT to 2
Other than that, the overall structure still follows v3.
This is what I like about this modification.
Often, configuration maintenance is not about having more features.
If the existing approach is already stable, adding a large number of rules all at once for a low-frequency issue can easily make troubleshooting more difficult in the future.
In contrast, minor modifications make it easier to judge the actual effect.
10. The v4 DNS Configuration Currently in Use
The DNS section in the current v4 is as follows:
dns:
# 用于解析 DoH / DoT DNS 服务器自身域名
default-nameserver:
- 223.5.5.5
- 119.29.29.29
# 主要 DoH,并增加一个备用入口
nameserver:
- https://dns.alidns.com/dns-query
- https://doh.pub/dns-query
# 沿用现有 Proxy 组
proxy: Proxy
# DoT 备用解析
fallback:
- tls://1.1.1.1:853
- tls://8.8.8.8:853
fallback-filter:
geoip: true
geoip-code: CN
The article mainly shows the DNS section here.
The complete configuration is centrally maintained on GitHub:
https://github.com/shuijingwan/clash-config
This way, if v5 or v6 appear in the future, there will be no need to rely on a specific blog post to keep the latest configuration.
11. Why I Did Not Continue Adding More DNS Settings
In reality, many more configuration items could be added.
For example:
- More
nameserver; - More
fallback; nameserver-policy;- Other DNS operating modes;
- Adding separate resolution strategies for specific domains.
But I still have not done so.
The reason is that there are currently no actual issues driving these modifications.
After the v4 adjustment, the previously occasional DNS timeouts have not been observed again, and daily use is quite stable.
Under these circumstances, continuing to add configurations yields unclear benefits while definitely increasing maintenance costs.
Therefore, I still adhere to one principle:
Only make targeted, minor adjustments after actual issues arise, and do not keep adding items just to make the configuration look more complex or complete.
12. From v1 to v4, I Increasingly Lean Towards Incremental Maintenance
Looking back at the entire process, the changes in each version are actually not major.
v1 established the basic structure.
v2 began refining the DNS configuration.
v3 adjusted a rule order.
v4 merely added a few fallback endpoints to DNS.
None of the versions underwent large-scale refactoring.
However, this approach is actually better suited for long-term maintenance:
First establish a working basic configuration
↓
Actual use
↓
Encounter a clear issue
↓
Only modify the relevant parts
↓
Continue observing
↓
Retain once confirmed stable
Up to now, v4 has undergone a period of actual use.
The low-frequency DNS timeout that I most wanted to improve back then has not reappeared.
Therefore, I will not continue to modify it for the time being.
If new, consistently reproducible issues arise in the future, I will then consider whether moving to v5 is necessary.
13. Future Updates Will Be Based on the GitHub Repository
Another purpose of reorganizing this article is to gradually separate “blog records” from “configuration maintenance”.
The blog is better suited for explaining:
- Why a modification was made;
- What was observed at the time;
- What the modification approach was;
- What the subsequent actual effects were.
GitHub is better suited for maintaining:
- The current stable version;
- Historical versions;
- Configuration files;
- Subsequent version changes.
Repository address:
If this configuration continues to be adjusted in the future, I will sync and update this repository.
If this configuration serves as a useful reference for you, feel free to bookmark the GitHub repository. Future versions will continue to be maintained here.
14. Summary
This reorganization of v4 is not because new DNS issues have emerged now.
Quite the opposite:
The occasional DNS resolution timeout from back then has not reappeared.
I am rewriting this article partly because the previous related records are no longer publicly available, and this technical practice still holds preservation value; on the other hand, I also hope to reformulate the currently stable, operational configuration into a more concise record that is easier to maintain long-term.
The core changes in v4 are only threefold:
Added default-nameserver
Added fallback DoH to nameserver
Added fallback DoT to fallback
The overall structure was not adjusted, nor was a large-scale refactoring done for a low-frequency issue.
Through subsequent continuous use, the original low-frequency DNS timeout has not been observed again.
Therefore, at this stage, I will keep v4 unchanged.
If genuinely new issues requiring action arise in the future, I will then record the next minor adjustment.
And starting from this article, the latest configuration will also be continuously maintained on GitHub:
https://github.com/shuijingwan/clash-config
If you wish to keep following future versions, I recommend bookmarking this repository.

![[Figure 2: The GitHub repository has added metacubex-v4.yaml and recorded the v4 update in the README]](https://media.shuijingwanwq.com/2026/08/2-45.png)