没有不值得去解决的问题,也没有不值得去学习的技术!

Clash Verge Domestic Direct Connection Suddenly Fails: A Complete Troubleshooting Guide From PR_END_OF_FILE_ERROR to Recovery After Updating GeoData

[Figure 2: Clash Verge logs show admin.shuijingwanwq.com being sent to Proxy by the MATCH rule]

作者:

在

Today, when I tried to access the WordPress admin dashboard, I suddenly encountered a problem that had never occurred before.

Accessing:

admin.shuijingwanwq.com/wp-admin/

Firefox did not open the dashboard; instead, it directly prompted:

PR_END_OF_FILE_ERROR

Seeing “Secure Connection Failed” at first, it is easy to suspect the server, Nginx, or the SSL certificate.

However, after layer-by-layer troubleshooting, I found that the production server was completely normal. The real anomaly lay in the current proxy routing state of Clash Verge / Mihomo: admin.shuijingwanwq.com, which should have used a domestic direct connection, unexpectedly fell into the final MATCH rule and went through the proxy.

Ultimately, I did not add a forced direct connection rule specifically for this domain, nor did I modify the existing routing architecture. Instead, I updated the GeoData and restarted the Mihomo core. The WordPress dashboard then immediately returned to normal.

This article documents the entire troubleshooting process.


1. Background: The Existing Rules Were Originally “Domestic Direct, Foreign Proxy”

I currently use Clash Verge Rev in an Ubuntu desktop environment.

The existing routing scheme was not temporarily configured today; it has been in use for a while, based on the principle of:

  • Domestic websites and domestic IPs: direct connection;
  • Foreign websites: through proxy;
  • Finally, MATCH handles requests not matched by preceding rules.

This configuration had been working properly.

In my Clash Verge Rev configuration article dated July 6, 2026, I had already documented the current set of rules and DNS configuration being used:

Therefore, there is an important background context when this issue occurred:

The rules had not just been modified, and this was the first time a domestic site was suddenly misrouted to the proxy.

Because of this, during subsequent troubleshooting, I did not accept “adding a separate DIRECT rule for admin.shuijingwanwq.com” as the ultimate solution.

That would only resolve this single domain, but it could not explain why the previously long-functioning domestic direct connection mechanism suddenly failed.


2. Symptom: Firefox Prompts PR_END_OF_FILE_ERROR

Opening the WordPress admin dashboard:

admin.shuijingwanwq.com/wp-admin/

Firefox displayed:

Secure Connection Failed

Error code:

PR_END_OF_FILE_ERROR

[Figure 1: PR_END_OF_FILE_ERROR occurs when Firefox accesses the WordPress admin dashboard]
[Figure 1: PR_END_OF_FILE_ERROR occurs when Firefox accesses the WordPress admin dashboard]

Based on the browser’s behavior, at this point I could only tell that the HTTPS/TLS connection was not established properly; I could not yet determine exactly which layer had the problem.

Possible factors included:

  • DNS;
  • Clash Verge;
  • Proxy node;
  • Network link;
  • Nginx;
  • SSL certificate;
  • PHP;
  • WordPress.

So the first step was not to modify the server, but to continue gathering evidence.


3. Clash Verge Logs Reveal the True Direction of the Anomaly

I opened the Clash Verge logs and searched for:

admin.shuijingwanwq.com

I immediately found a large number of WARNINGs.

The logs basically showed:

Plaintext
[TCP] dial Proxy (match Match) / 127.0.0.1:xxxxx --> admin.shuijingwanwq.com:443 error: context deadline exceeded
[Figure 2: Clash Verge logs show admin.shuijingwanwq.com being sent to Proxy by the MATCH rule]
[Figure 2: Clash Verge logs show admin.shuijingwanwq.com being sent to Proxy by the MATCH rule]

The most crucial part here is not the final:

context deadline exceeded

but the preceding:

dial Proxy (match Match)

This actually indicates:

admin.shuijingwanwq.com did not match the expected domestic direct connection rule, but instead fell all the way through to the final MATCH, and was subsequently sent to the proxy.

Mihomo’s MATCH is itself a fallback rule that unconditionally matches remaining requests. Therefore, if the preceding domestic rules were not matched, it is consistent with the rule execution mechanism for the request to ultimately enter MATCH → Proxy.

And this admin domain of mine corresponds to my own domestic Alibaba Cloud server:

121.40.248.29

Under normal circumstances, there is no need to access it via a foreign proxy node.

At this point, the troubleshooting direction had shifted from “server failure” to “Clash Verge / Mihomo routing anomaly”.

However, proxy logs alone were not enough to prove the server was fine.

Next, I needed to verify from the server side.


4. Server-Side Verification: Nginx, SSL, and WordPress Are All Normal

I first logged into the Alibaba Cloud server.

I did not restart Nginx or modify the Nginx configuration; instead, I directly accessed the virtual host corresponding to admin.shuijingwanwq.com from the server itself.

During the test, I resolved:

admin.shuijingwanwq.com:443

temporarily to:

127.0.0.1

This allowed me to directly access the local Nginx while preserving the correct Host and TLS SNI.

Ultimately, I obtained:

Plaintext
HTTP/2 302
server: nginx
location: https://admin.shuijingwanwq.com/wp-login.php?...
x-redirect-by: WordPress
strict-transport-security: max-age=15768000
x-robots-tag: noindex, nofollow, noarchive
[Figure 3: Accessing the admin virtual host from the server itself returns HTTP/2 302 normally]
[Figure 3: Accessing the admin virtual host from the server itself returns HTTP/2 302 normally]

This single result actually verified multiple things at once:

  • Nginx is running normally;
  • The admin.shuijingwanwq.com virtual host can be matched correctly;
  • Port 443 is normal;
  • TLS handshake is normal;
  • SSL certificate is normal;
  • PHP can process requests;
  • WordPress is running normally;
  • /wp-admin/ can properly redirect to the login page.

In particular:

x-redirect-by: WordPress

proves that the request actually reached WordPress.

Therefore:

The production server itself can essentially be ruled out.


5. Bypassing the Explicit Proxy Locally and Directly Accessing the Real Server IP

After confirming the server was internally normal, I performed a second layer of verification from the ThinkPad.

First, a normal DNS query returned:

198.18.0.50

At the same time, curl also revealed that the current system had:

https_proxy=http://127.0.0.1:7897

Combined with Clash Verge’s current Fake-IP/TUN environment, this 198.18.x.x address itself cannot simply be considered an error. Mihomo’s Fake-IP mode inherently uses virtual IP addresses for mapping.

So, instead of using this Fake-IP, I directly specified the server’s real public IP:

121.40.248.29

Executed:

Bash
curl --noproxy '*' -vkI \
    --connect-timeout 10 \
    --max-time 20 \
    --resolve admin.shuijingwanwq.com:443:121.40.248.29 \
    https://admin.shuijingwanwq.com/wp-admin/
[Figure 4: ThinkPad uses fixed 121.40.248.29 to directly verify backend HTTPS]
[Figure 4: ThinkPad uses fixed 121.40.248.29 to directly verify backend HTTPS]

The result was a fully successful TLS handshake:

Plaintext
SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
Server certificate:
subject: CN=admin.shuijingwanwq.com

And an HTTP/2 connection was successfully established.

This step was very important.

It showed that:

The network link from the ThinkPad to the Alibaba Cloud server’s real public IP was also normal.

At this point, I had essentially ruled out:

  • WordPress failure;
  • PHP failure;
  • Nginx failure;
  • SSL certificate failure;
  • Alibaba Cloud port 443 failure;
  • Communication failure from the local machine to the server’s real public IP.

The only thing left worth investigating was the current routing behavior of Clash Verge / Mihomo.


6. Why I Did Not Want to Add a Forced DIRECT Rule for admin

At this point in the troubleshooting, the simplest temporary workaround would certainly be to add:

DOMAIN,admin.shuijingwanwq.com,DIRECT

This would very likely resolve the issue immediately.

But I did not want to do that.

Because this involves another, more important question:

If my existing rules were supposed to achieve a domestic direct connection, why did they suddenly fail today?

If I just added an exception for admin.shuijingwanwq.com, I would only be fixing the symptom.

Later, it might happen again with:

abc.example.com

Then I would add another DIRECT rule;

And if another domestic domain had an issue, I would add yet another DIRECT rule.

Eventually, a rule system that should be uniformly determined by GeoSite, GeoIP, etc., would gradually turn into a large number of manually maintained exception rules.

This was obviously not the result I wanted.

More importantly:

This set of rules had always been normal before, and this was the first time this phenomenon occurred.

So rather than assuming “the rule design was flawed from the start,” I preferred to first check the data the rules depend on or Mihomo’s current running state.


7. Starting to Suspect GeoData or Mihomo’s Current Running State

Mihomo’s rule system itself supports determining domains, target IPs, etc., based on GeoSite and GeoIP; for rules targeting IPs, domain requests can also trigger DNS resolution when necessary, and then continue with IP rule evaluation.

Geo data is one of the important foundations for these determinations. Mihomo also specifically provides configurations for Geo data mode, Geo data loading, and auto-updating.

Given that:

  • The original rules were not modified;
  • They had been normal previously;
  • This was the first time it happened today;
  • A domestic server domain suddenly fell directly into MATCH → Proxy;

I decided not to modify the rules first, but to try:

Updating GeoData.

In the current Clash Verge Rev, I could directly go to:

设置 → 更新 GeoData

to perform the update.

[Figure 5: "Update GeoData" in the Clash Verge Rev settings page]
[Figure 5: “Update GeoData” in the Clash Verge Rev settings page]

The GeoData updated successfully very quickly.

But I did not immediately conclude that the problem was definitely solved.

After the update was complete, I opened the Clash core management interface.


8. Restarting the Mihomo Core After Updating GeoData

The current environment showed:

  • Clash Verge Rev: v2.5.2;
  • Mihomo: v1.19.29.

After updating the GeoData, I did not click “Upgrade Core”; instead, I directly executed:

Restart Core

[Figure 6: Restarting the stable Mihomo core after the GeoData update is complete]
[Figure 6: Restarting the stable Mihomo core after the GeoData update is complete]

Here, two operations need to be distinguished:

Upgrading the core changes the Mihomo version;

Restarting the core simply restarts the current Mihomo and reloads the existing configuration and data.

There was no need to introduce a new software version variable this time.

So the entire recovery process actually only did two things:

Plaintext
Update GeoData
↓
Restart Mihomo core

Nothing was modified:

  • Existing proxy rules;
  • GEOSITE rules;
  • GEOIP rules;
  • MATCH;
  • DNS configuration;
  • Fake-IP configuration;
  • TUN configuration;
  • Proxy subscription;
  • admin.shuijingwanwq.com dedicated rules;
  • WordPress;
  • Nginx;
  • SSL.

9. WordPress Admin Dashboard Returns to Normal

After completing the GeoData update and restarting the Mihomo core, I reopened:

admin.shuijingwanwq.com/wp-admin/

This time, the dashboard displayed normally immediately.

[Figure 7: WordPress admin dashboard returns to normal after updating GeoData and restarting Mihomo]
[Figure 7: WordPress admin dashboard returns to normal after updating GeoData and restarting Mihomo]

The WordPress dashboard reappeared.

At the same time, I went back to the Clash Verge logs and searched for:

admin.shuijingwanwq.com

The previously continuous:

Plaintext
[TCP] dial Proxy (match Match) ... admin.shuijingwanwq.com:443 error: context deadline exceeded

also stopped generating new WARNINGs.

The issue was resolved at this point.

Most importantly:

Throughout this process, no separate DIRECT rule was added for the admin domain.

The original routing system remained unchanged.


10. Can We Directly Conclude That “GeoData Is Broken”?

Although the outcome looks very much like:

Plaintext
Domestic direct connection anomaly
↓
Update GeoData
↓
Returns to normal

I am not going to directly state the root cause as:

GeoData file corruption.

The reason is that two actions were actually performed consecutively this time:

Plaintext
1. Update GeoData
2. Restart Mihomo core

These two variables were changed together.

So there are at least two possibilities at present.

The first possibility is:

The original GeoData itself or the current GeoData state experienced an anomaly, and it recovered after re-updating the data.

The second possibility is:

An occasional anomaly occurred in the GeoData, DNS, rule cache, or other runtime state loaded by Mihomo at that time, and it recovered after restarting the core to reload.

Of course, it is also possible that both were involved.

Therefore, based on the evidence currently available, I believe a more accurate conclusion should be:

An anomaly occurred in Clash Verge / Mihomo’s GeoData or rule execution state, causing admin.shuijingwanwq.com, which should have used a domestic direct connection, to miss the preceding domestic rules and ultimately fall into MATCH → Proxy. It returned to normal after updating GeoData and restarting the Mihomo core.

This aligns with the actual phenomenon without writing unproven speculation as established fact.


11. If It Happens Again, I Will Separate the Two Recovery Actions

Because this was the first time encountering this issue, I went ahead and restarted Mihomo after updating GeoData.

Although this recovered things quickly, it left a regret:

It is impossible to strictly determine which action actually solved the problem.

If the exact same phenomenon occurs again in the future, I will change the troubleshooting order.

First, observe the Clash Verge logs.

If I find that a domestic address which should be directly connected shows:

dial Proxy (match Match)

and it has already been proven that the real server itself is fine, then the first step will only be:

Restart Mihomo core

Then retest.

If it recovers:

It leans more towards an anomaly in Mihomo’s running state or data loading state at that time.

If it is still abnormal, then execute:

Update GeoData

Then retest.

If it recovers only then:

The likelihood of a GeoData anomaly itself increases significantly.

This way, next time I can truly separate the:

内核运行状态

and:

GeoData 数据状态

variables for verification.


12. Lessons Learned from This Troubleshooting

1. PR_END_OF_FILE_ERROR Does Not Necessarily Mean the Server SSL Has a Problem

The browser initially did show an HTTPS secure connection failure.

But it was ultimately proven that:

  • SSL certificate was normal;
  • TLS 1.3 handshake was normal;
  • Nginx was normal;
  • WordPress was normal.

The real problem occurred in the proxy routing link.

So when encountering such errors, one should not reissue certificates or modify Nginx based solely on the browser’s error name.


2. Clash Verge’s match Match Logs Are Crucial

What truly changed the troubleshooting direction this time was:

dial Proxy (match Match)

Because MATCH is the final fallback rule.

For a request that was originally supposed to use a domestic direct connection, if it falls all the way to:

MATCH → Proxy

it indicates that what is truly worth investigating is:

Why didn’t the preceding domestic rules match?

This has more diagnostic value than simply seeing:

context deadline exceeded


3. Do Not Immediately Assume DNS Is Wrong Just Because You See a Fake-IP

During the first check:

Plaintext
admin.shuijingwanwq.com
→ 198.18.0.50

it looked very strange.

But combined with the Clash Verge/Mihomo Fake-IP environment, this type of address itself does not mean that public DNS actually resolved the domain to 198.18.x.x. Mihomo’s Fake-IP mode inherently maintains such virtual address mappings.

The real origin server IP:

121.40.248.29

could still be verified independently.


4. When the Root Cause Can Be Verified, Do Not Rush to Add Exception Rules

If I had added this right from the start:

DOMAIN,admin.shuijingwanwq.com,DIRECT

the dashboard would most likely have recovered as well.

But I might never have noticed:

that the original domestic direct connection mechanism had actually developed an anomaly.

“The website can be opened” and “the problem is truly solved” are not the same thing.

Especially for a long-maintained set of proxy rules, you should try to ensure the overall logic is correct, rather than constantly piling up single-site exceptions.


5. When the Server Has No Problems, Do Not Touch the Production Environment Due to a Proxy Failure

This time, the server side continuously proved:

  • Nginx was normal;
  • SSL was normal;
  • WordPress was normal;
  • Public port 443 was normal.

Therefore, throughout the entire handling process, I ultimately did not:

  • Restart the production server;
  • Modify Nginx;
  • Modify WordPress;
  • Clear WordPress cache;
  • Reapply for an SSL certificate.

This also avoided introducing new risks into a normally running production environment in order to fix a client-side proxy issue.


13. Final Failure Chain

Compressing the entire process, the failure state can be roughly represented as:

Plaintext
Firefox
↓
admin.shuijingwanwq.com
↓
Clash Verge / Mihomo
↓
Missed domestic direct connection rules
↓
MATCH
↓
Proxy
↓
Connection timeout
↓
PR_END_OF_FILE_ERROR

While the server’s real state was:

Plaintext
ThinkPad
↓
121.40.248.29:443
↓
TLS 1.3
↓
Nginx
↓
WordPress
↓
HTTP/2 302
↓
Normal

The final recovery process was very simple:

Plaintext
Update GeoData
↓
Restart Mihomo core
↓
Reload data and running state
↓
admin.shuijingwanwq.com access restored
↓
No longer generates the original Proxy WARNING

14. Summary

This failure initially presented very much like a problem with the WordPress dashboard or HTTPS:

PR_END_OF_FILE_ERROR

But after actual troubleshooting, I found:

The server was normal throughout; the anomaly occurred in the proxy routing link of Clash Verge / Mihomo.

The most crucial evidence was in the Clash Verge logs:

dial Proxy (match Match)

A backend domain that should have used a domestic direct connection did not match the expected rules, but ultimately entered the Proxy.

Since the current rules had been running stably before, and this was the first time the same issue occurred, I chose not to add a dedicated DIRECT rule for admin.shuijingwanwq.com, but instead prioritized checking the data the rules depend on and Mihomo’s running state.

Ultimately:

Update GeoData → Restart Mihomo core

after which the issue immediately recovered.

There is currently insufficient evidence to prove definitively that the “GeoData file was corrupted,” so a more rigorous record is:

This failure was likely related to an anomaly in Clash Verge/Mihomo’s GeoData or rule execution state. It recovered after updating GeoData and restarting Mihomo, and the original “domestic direct, foreign proxy” rules did not need modification.

This troubleshooting also made me more certain of one principle:

When a long-running set of rules experiences an anomaly for the first time, first verify the running state and the data the rules depend on, before deciding whether to modify the rules themselves.

Otherwise, a temporary DIRECT might get the webpage to open immediately, but it could also hide the problem truly worth solving.

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系