Question about working with APNS: proxies and ports

Good day.


I read the information from the article https://support.apple.com/en-us/HT203609. It reads "You need a direct, unproxied connection to the APNs servers on these ports:"


The question arose, my push notification server should work directly with the APNS without using a proxy. Right?


And the second question, in the same article, says "TCP port 443 or 2197 to send notifications to APNs. *", But in "the ports Apple services use." (https://support.apple.com/ru-ru/HT202944), that to work with the APNS ports are used:

1. 2195 TCP Apple Push Notification Service (APNS) - Push Notifications

2. 2196 TCP Apple Push Notification Service (APNS) - Feedback Service

Tell me which ports should be used to send notifications to APNs?


Thank.

Replies

When your push provider connects to Apple Push Notification Service (APNs) in order to send a push notification, it uses one of three different ports:

  • If the provider is using the modern HTTP/2 interface, it connects to the standard HTTPS port, 443.

  • An HTTP/2 provider can also connect to port 2197, which is helpful if 443 is blocked.

  • If the provider uses the legacy binary interface, it connects to port 2195 for sending push notifications. The binary interface also requires a connection to port 2196 for getting feedback.

Most of this info is covered in Sending Notification Requests to APNs. The specifics of the legacy binary interface is covered by the Binary Provider API section of the Local and Remote Notification Programming Guide.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

good day

On the proxy, please check my push notification server without using a proxy.

If a connection through a proxy is possible, are there requirements for this proxy?