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

Play Store Apps Won’t Update After Setting Up a VPN? The Problem Lies in Clash Routing Rules, Not Wstunnel

[截图 2:Play 商店更新界面,显示两个应用正常下载]

1. Problem Description

On my Android phone, I maintain two self-hosted VPN setups simultaneously:

  • Setup A (Vultr + pure WireGuard Singapore node): The Play Store page loads normally, app updates complete reliably, and there is a normal download progress bar.
  • Setup B (ZgoCloud + Wstunnel + WireGuard + Clash Verge Rev Los Angeles node): The Play Store page opens, but as soon as I tap “Update,” it gets stuck in the “Pending” state with no download progress, eventually failing.
[Screenshot 1: Play Store update interface, app stuck on "Pending"]

[Screenshot 1: Play Store update interface, app stuck on “Pending”]

Setup A updates normally, but Setup B does not—the difference in the links from the two servers to the Play Store made the problem look like it was caused by server location or network quality.

Thus began my long “troubleshooting journey.”

2. Initial Assessment and Wrong Directions

Based on the symptoms, I initially focused my suspicions on the following areas:

  1. Server location differences: Singapore vs. Los Angeles. I guessed that the higher latency was causing the update failures.
  2. Extra latency introduced by Wstunnel encapsulation: Wstunnel wraps another layer of WebSocket + TLS over WireGuard, lengthening the link.
  3. Google Play sensitivity to long connections: I assumed the Play Store update mechanism could not tolerate the latency fluctuations introduced by Wstunnel.
  4. MTU fragmentation issues: I suspected that multiple encapsulations caused an MTU mismatch, resulting in dropped packets.

Based on these assessments, I even devised three “optimization plans”:

PlanApproachPurpose
Plan 1: Split routing architecturePlay Store uses pure WireGuard, other traffic uses WstunnelReduce Play traffic latency
Plan 2: iptables multi-port WireGuardClient random port (20000–60000) → iptables NAT → Server 51820Avoid port conflicts and QoS limits
Plan 3: Wstunnel underlying optimizationAdjust TLS buffer, websocket frame size, try QUICReduce tunnel layer overhead

Final conclusion: All three plans were aimed in the wrong direction. The root cause of the problem was neither Wstunnel nor the network link. Reference: Complete Troubleshooting and Architecture Optimization for Google Play Update Anomalies on Android with Self-hosted WireGuard + Wstunnel

3. Key Turning Point: FlClash Logs Exposed the Real Problem

On Android, I used FlClash (an Android client for the Clash Meta core) to check the real-time request logs and noticed an anomaly:

[Screenshot 1: FlClash request log screenshot, showing domains like play.googleapis.com going through Proxy]

[Screenshot 1: FlClash request log screenshot, showing domains like play.googleapis.com going through Proxy]

The logs showed:

  • play.googleapis.com → Proxy
  • play-fe.googleapis.com → Proxy
  • android.googleapis.com → Proxy

In other words, all Play Store-related traffic was going through the proxy link. This ruled out the possibilities of “direct connection” or “DNS pollution.”

But then a question arose: if these domains go through the proxy, why does that cause the update to get stuck?

After further analysis, I realized the core problem was actually quite simple: Google Play’s download resources (APK packages) are hosted on a global CDN, while the proxy node is located in Los Angeles. When the download request goes through the proxy, the traffic travels halfway across the globe, making it extremely slow or causing it to time out. This was not Wstunnel’s fault, nor was it an MTU issue—it was simply that the routing rules were not granular enough.

4. The Correct Solution: Granular Routing Using the Ready-Made GEOSITE Ruleset

The Clash Meta core has a built-in GEOSITE ruleset, which is based on a community-maintained domain database. It can automatically identify which domains need a proxy and which can connect directly.

The core idea is simple:

Traffic TypeGoalPolicy
Google core services (account authentication, store homepage, OAuth)Maintain availabilityProxy (Proxy)
Google CDN resources (gvt1.com, googleusercontent.com, etc.)Accelerate downloadsDirect connection (DIRECT)
Domestic trafficAccelerate accessDirect connection

4.1 Modifying the Clash Configuration File

In the rules: section of the Clash configuration file, add the DNS fallback-filter domain list and add the following two rules:

YAML
# DNS配置(优化:为国内CDN域名单独指定DNS,避免污染)
dns:
  fallback-filter:
    geoip: true
    # 新增:强制这些国内CDN域名使用nameserver,避免被fallback解析到境外IP
    domain:
      - +.googleapis.cn
      - +.gvt1.com
      - +.gvt3.com
      - +.googleusercontent.com

rules:
  # 高优先级:Wstunnel 服务器直连
  - IP-CIDR,你的Wstunnel服务器IP/32,DIRECT

  # ==== 现成规则集 ====
  - GEOSITE,google,Proxy      # Google 核心服务走代理
  - GEOSITE,youtube,Proxy     # YouTube 走代理

  # DNS 解析直连
  - DOMAIN,dns.alidns.com,DIRECT

  # 本地局域网直连
  - IP-CIDR,127.0.0.1/8,DIRECT
  - IP-CIDR,10.0.0.0/8,DIRECT
  - IP-CIDR,172.16.0.0/12,DIRECT
  - IP-CIDR,192.168.0.0/16,DIRECT

  # 邮件端口走代理(解决 Thunderbird 发信问题)
  - DST-PORT,587,Proxy
  - DST-PORT,465,Proxy

  # 国内流量直连
  - DOMAIN-SUFFIX,cn,DIRECT
  - GEOIP,CN,DIRECT

  # 兜底:其他全部走代理
  - MATCH,Proxy

4.2 Why Does GEOSITE,google Solve the Problem?

The GEOSITE,google ruleset contains a set of granular sub-rules at its core, which intelligently routes Google’s different services:

  • Authentication and API domains (such as accounts.google.com, android.googleapis.com) → Proxy
  • Download CDN domains (such as play.googleapis.com, gvt1.com, googleusercontent.com) → Direct connection

The benefit of this “intelligent routing” is that you do not need to manually maintain any domain lists; the ruleset syncs automatically with Clash core updates.

4.3 Configuration Key Points

  1. GEOSITE,google must be placed before GEOIP,CN and MATCH, otherwise it will not take effect. Clash rules are matched sequentially from top to bottom, and matching stops once a rule is hit.
  2. Keep GEOIP,CN enabled to ensure domestic CDN nodes are identified for direct connection.
  3. DNS configuration optimization: Add the domain: list in fallback-filter to force domestic CDN domains like gvt1.com and googleusercontent.com to use domestic DNS resolution, preventing them from being resolved to overseas IPs by the fallback servers.

5. Verification Results

After modifying the configuration and reloading Clash:

  1. Play Store page: Loads normally, browsing is unaffected.
  2. App downloads: Progress bar appears normally, speed is stable.
  3. Clash logs: play.googleapis.com matches the GEOSITE,google rule but still goes through Proxy (because the ruleset still proxies control signaling as needed); meanwhile, CDN domains like gvt1.com are identified for direct connection by GEOIP,CN.

[Screenshot 2: Play Store update interface, showing two apps downloading normally]

At this point, the Play Store update issue that had persisted for days was completely resolved.

6. Reflection and Summary

In retrospect, the biggest detour in this troubleshooting process was “attributing the problem to the underlying network too early“—although Wstunnel has a longer link, it was not the root cause of the update getting stuck. The real crux of the issue was that the Clash routing rules were not granular enough: all traffic for Google-related domains was sent into the proxy tunnel, causing CDN download traffic that should have connected directly to also take a long detour.

Misjudged DirectionActual CauseConclusion
Wstunnel latencyRouting rules not granular enough❌
MTU fragmentationRouting rules not granular enough❌
Server locationRouting rules not granular enough❌
iptables multi-portRouting rules not granular enough❌

Three lines of configuration solved a three-month problem: Ultimately, I only needed to add the GEOSITE,google,Proxy line to the Clash configuration (along with the corresponding DNS optimization), and all problems were solved.

Environment reference: Android + FlClash (Clash Meta core) + self-hosted Wstunnel + WireGuard + Clash Verge Rev setup.


I hope this blog post helps friends who are currently struggling with Play Store update issues. If you have had a similar experience, feel free to leave a comment and discuss.

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

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

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

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

关于我  ·  GitHub  ·  邮件联系

评论

一条对“Play Store Apps Won’t Update After Setting Up a VPN? The Problem Lies in Clash Routing Rules, Not Wstunnel”的回复