Excluding FCM from bypassing VPN makes it work in China

I am a user, and I already have a solution to a problem I struggled with for a long time. I am writing to seek enlightenment from expert for why the solution works.

I live in China, use an android phone, and use banned apps like Whatsapp. These apps require a VPN to work and they do work. But for a very long time I wouldn’t receive push notifications from these apps, despite having turned on things like autostart and background usage. I also had Play services and required it to go through VPN (split tunneling).

At times, when I turned off WiFi, or when I turned on WiFi, or when I turned off VPN, I would receive suddenly receive old and missed notifications all at once. Which could be a hint. For Signal, by turning VPN off , I would receive a notification that said “downloading new messages”, and when I turn VPN back on I will see those messaged.*

Recently I became very determined to solve it, and upon reading up on FCM, I stumbled upon About FCM messages  |  Firebase Cloud Messaging which says

“When the VPN is configured to allow us to do so, we bypass the VPN using an encrypted connection (over the base network wifi or LTE) so as to ensure a reliable, battery friendly experience…If the VPN is not configured to be bypassable then Firebase Cloud Messaging will use the VPN network in order to connect to the server.”

To my surprise, my VPN client and many others default to allow for bypassing. So I had this thought: What if I configure my VPN to disallow bypassing? And it works! I now receive push notifications for both VPN-channeled apps like Whatsapp and China domestic apps like WeChat.

But, what happened? With the issue resolved, I really want to know why and how. I can see two possibilities, and I hope the experts here can help satisfy my curiosity:

  1. FCM simply could not connect to the internet because it chose to bypass a VPN that allows it to function in China.

  2. FCM could connect to the internet, but because the banned apps were channeled through VPN whereas FCM bypassed VPN, some mismatch in communication resulted in push notifications failing.

EDIT 2024/2/6: Added the line labeled *.

Thank you bro, you make my day! (BTW, I found some apps like JD and some bank app of China mainland should also be excluded from using vpn in Clash settings to make them work while clash is ON.

That makes us two, I can finally get FCM push working with Clash on! Though I wonder the same thing.

The talk.google.com series of FCM domains are not blocked in China, so you can receive message notifications without connecting to a VPN.
You can enable the FCM diagnostic log on your phone to check the relevant FCM event information.
According to the VPN interactions and bypassability section of the About FCM messages  |  Firebase Cloud Messaging documentation, “FCM’s usage of bypassable VPNs is specific to the FCM Push Notification channel. Other FCM traffic, such as registration traffic, uses the VPN”. This means that if you use a VPN connection, FCM registration may use the VPN’s IP address to connect, and this IP address may not be accessible in China. Therefore, to ensure the normal delivery of FCM notifications, it is recommended that you configure your VPN to directly access requests to talk.google.com to obtain an IP address that is accessible in China.

Me too, I’m using surfboard and facing the same issue

Could you please let me know which app is related to FCM, that I should exclude?
Thanks

Hello, could you please help me with this

> You can enable the FCM diagnostic log on your phone to check the relevant FCM event information.