appleboy / gorush

A push notification server written in Go (Golang).
MIT License
8.06k stars 842 forks source link

support sending to multiple different certs #365

Open gardenia opened 6 years ago

gardenia commented 6 years ago

Hi,

At the moment it appears I can configure exactly one Android API key and one IOS push certificate.

I would like the capability to somehow disptach to different Android API keys and IOS push certificates, perhaps based on an app bundle id. I realize I could run N instances of gorush to accomplish that but it seems more ideal to be be able to do it all from the same process.

What do you think?

e.g.

android:
  com.foo.bar:
    enabled: true
    apikey: "YOUR_API_KEY1"
    max_retry: 0 # resend fail notification, default value zero is disabled
  com.blah.blah:
    enabled: true
    apikey: "YOUR_API_KEY2"
    max_retry: 0 # resend fail notification, default value zero is disabled
appleboy commented 6 years ago

Gorush doesn't support multiple certificates in iOS but support send notification in the different android key.

In android, you can add api_key in the request body. See https://github.com/appleboy/gorush#request-body

wahello commented 5 years ago

@appleboy @gardenia APNS is using Universal Push Notification Client SSL, so just one cert is ok. This issue can be closed.

appleboy commented 5 years ago

@keyeMyria Thanks

gardenia commented 5 years ago

I don't believe this is related to my original question. I wanted the ability to use a single gorunsh instance to send pushes to:

some.bundle.id -> cert1.pem other.bundle.id -> cert2.pem

by dispatching to the different certs on the bundle id. I don't see what "Universal Push Notification Client SSL" has to do with this as it appears to related to production vs development pushes for the same bundle id using one cert.

It may be that gorush never plans to support this. and if so fair enough. I just don't see how Universal Push Notification Client SSL solves it.

marius-bardan commented 3 years ago

might be addressed via #564