Page MenuHomePhabricator

HTTP proxy support for APNS calls on production
Closed, ResolvedPublic


On production, outgoing HTTP requests go through an HTTP proxy. We need to make sure that the APNS client is configured properly to be able to communicate with the APNS backend.

  • Investigate if there is a need to add configuration for HTTP proxy
  • Enable proxy support for APNS backend calls.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 25 2020, 11:49 AM

Change 608084 had a related patch set uploaded (by MSantos; owner: MSantos):
[mediawiki/services/push-notifications@master] WIP: apns/fcm: Implement proxy configuration

MSantos claimed this task.Jun 29 2020, 5:28 PM
MSantos triaged this task as Medium priority.
MSantos added a subscriber: Mholloway.EditedJul 1 2020, 4:33 PM

@Jgiannelos and @Mholloway in the latest patch I swapped the @parse/node-apn library with the upstream one, as suggested by Yiannis, and proxy works fine, I think because it's not using HTTP/2 and HTTP/1.1 have proxy functionality in place.

How do we want to proceed with this change? IFRC the reason to use @parse/node-apn was that it has more recent commits and upstream is still active.

I'm totally fine with the switch to the upstream apn module. At a glance it's not all that much less actively maintained the parse fork. Also, it claims to support HTTP/2 in the readme, FWIW.

Jgiannelos added a comment.EditedJul 2 2020, 7:11 AM

I agree with @Mholloway also I checked the codebase and it looks like its using HTTP/2. I will try to investigate that I bit more, but I think that the HTTP/1.1 requests in the proxy logs are only the first hop to the proxy and then it connects using h2.

From the node debugger:

> this._socket
TLSSocket {_tlsOptions: {…}, _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true}
> this._socket.alpnProtocol

Change 608084 merged by jenkins-bot:
[mediawiki/services/push-notifications@master] apns/fcm: Implement proxy configuration

MSantos closed this task as Resolved.Jul 8 2020, 12:08 PM