microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.72k stars 306 forks source link

[Notification][WNS] have a way to register into WNS throught a proxy (get channel URI) #1526

Open ice02 opened 2 years ago

ice02 commented 2 years ago

Proposal: Give a way to use default proxy or to give proxy information to register into WNS (to generate channel URI)

Summary

Today, to register into WNS (to get channel URI), a direct connection seems to be mandatory. With a valid channel, all is working fine behind proxy It could be great to let channel registration using a proxy to be able to use WNS notification behind corporate proxy

Rationale

hulumane commented 2 years ago

@nicuparente We have proxy support in our backlog correct?

hulumane commented 2 years ago
andrewleader commented 2 years ago

@hulumane yeah we can add it to productboard! I'll work with you and Nicu offline on what you want to put up there!

hulumane commented 2 years ago

It is interesting to note here that the feature isn't specific to the app specific channel registration per se. We just need to support WNS connections for all apps over a proxy in corp environments. Today the proxies don't understand custom protocol and block our traffic without an endpoint exemption. So general guidance has been to add an exemption to the proxy environment for WNS endpoints to allow the traffic through. @nicuparente I recall there being a documentation link for this exemption stuff? May be worth following up on this option in the interim.

nicuparente commented 2 years ago

Correct - the current guidance is to allow list the traffic. Here is the documentation and I believe @ice02 came across this doc then followed our guidance there to file this as feedback in the Windows App SDK repo.

ice02 commented 2 years ago

Hi all, Thanks for the answer. I had this documentation and rules were added but it seems to miss one thing. In fact WNS by itself work fine but calling to PushNotificationChannel channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

fail when i am behind corporate proxy with proxy pac used. I tryied to trace with fiddler and it seems that a direct connection is used, proxy is ignored for this call