简体   繁体   English

在 Android 上的代理后面接收 FCM (GCM)

[英]Receiving FCM (GCM) behind proxy on Android

We have an app that uses FCM (ex GCM) for push messaging and notification on Android devices.我们有一个应用程序使用 FCM(前 GCM)在 Android 设备上推送消息和通知。

We have an use case where the app won't have open access to Google Play Services as it will be deployed on a corporate network - well it is a "everything closed except fixed servers with fixed IP addresses and ports" firewall.我们有一个用例,应用程序将无法开放访问 Google Play 服务,因为它将部署在公司网络上——嗯,它是一个“除了具有固定 IP 地址和端口的固定服务器之外的一切都关闭”防火墙。 Direct connection to these services will not be allowed, but we can provide our own http/s or socks proxy to access whatever we want.不允许直接连接到这些服务,但我们可以提供自己的 http/s 或 socks 代理来访问我们想要的任何内容。

To my latest knowledge and searches on SO, even if you specify a proxy on android, the proxy will only be used if your app is set up to use it (no problem), but Google Play Services and Firebase will just ignore the proxy setting.根据我对 SO 的最新知识和搜索,即使您在 android 上指定代理,只有在您的应用设置为使用它时才会使用代理(没问题),但 Google Play 服务和 Firebase 将忽略代理设置.

Has this changed?这有改变吗? Can Firebase/FCM/Google play services run through the proxy specified in Android? Firebase/FCM/Google play服务可以通过Android中指定的代理运行吗? And if so, from which android version?如果是这样,来自哪个 android 版本?

Thank you, Nicolas谢谢你,尼古拉斯

Here is the latest info from the firebase support (short answer: no)这是来自 firebase 支持的最新信息(简短回答:否)

" Unfortunately, Firebase Cloud Messaging is currently not designed to support a Proxy and does not attempt to address all network conditions. An alternative is to whitelist FCM to not go through a proxy at all. You should whitelist all of the IP addresses in the IPv4 and IPv6 blocks listed in Google's ASN of 15169. For more information regarding FCM ports, please refer to this documentation. https://firebase.google.com/docs/cloud-messaging/concept-options#ports_and_your_firewall " " Unfortunately, Firebase Cloud Messaging is currently not designed to support a Proxy and does not attempt to address all network conditions. An alternative is to whitelist FCM to not go through a proxy at all. You should whitelist all of the IP addresses in the IPv4和 Google 的 ASN 15169 中列出的 IPv6 块。有关 FCM 端口的更多信息,请参阅此文档。https://firebase.google.com/docs/cloud-messaging/concept-options#ports_and_your_firewall "

If any has ideas of workarounds, please feel free to share them:) Thanks, Nicolas如果有人有解决方法的想法,请随时分享:)谢谢,尼古拉斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM