Push notifications behind a proxy


#1

Hi,

In our setup, we have Countly server deployed behind a proxy to the internet. We have configured the proxy to allow traffic to required Apple and Google Firebase services for push notifications to work. And, we managed to get push working for Android because inside the Countly server config files, there's the parameter to specify the proxy. More specifically, inside "/countly/api/config.js" we found these commented out lines:

/* GCM proxy server for push plugin*/
push_proxy: {
host: "",
port:
}

What about the iOS? Trying to upload the APN certificate we get an error. From the logs it's clear it's a network issue:

INF: resolving api.push.apple.com
WRN: dns resolve error, let's retry once EAI_NONAME
ERR: dns resolve error, no more retrying after EAI_NONAME

My question is, what is the correct procedure to configure Countly server for Apples push services behind the proxy? Where and how should the proxy settings be configured?

Thanks in advance.


#2

Hello,

So far Countly doesn't have support of proxied APN connections. Even GCM proxy feature is not documented as you can see and I'm really surprised you found it :slight_smile:


#3

Hi artem,

Thanks for the reply. Unsupported proxy connections for APNs is bummer actually. Any recommendation for my case, to get it working in some way?


#4

Well, it would be best if you could implement this feature in Countly, since it's open source, you know :slight_smile: I can guide you through the process in case you're up to.

Other than that, probably some iptables + transparent tcp -> proxy app would do the job, but it's going to be painful and not error-prone for sure.