Vincent_BEZARD | 2019-11-25 15:55:25 UTC | #1
Hi, It seems that the SDK do not allow to use proxy when using Notification Channels. When looking the code the the SDK in the NotificationHandler.cs: The Method ConnectSocket() contain the WebSocket connection API, and it do not has any proxy parameters. So, to make the notification channels working with WebSocket, I think I have to:
- Add parameters to the ConnectSocket():
private void ConnectSocket(string uri, string uriproxy = null, string usernameproxy = null, string passwordproxy = null) and add: if (uriproxy != null) { WebSocket.SetProxy(uriproxy, usernameproxy, password_proxy); }
- Change the caller of the method ConnectSocket() - NotificationHandler() and NotificationHandler(channel):
Add input parameters if these 2 methods. It will look like: public NotificationHandler(string uriproxy = null, string usernameproxy = null, string password_proxy = null) And finally, call the ConnectSocket using the proxy parameters.
Questions: Am I right? Are you OK with that? Is there some changes planned to use proxies?
Thanks,
Vincent
tim.smith | 2019-11-25 17:08:31 UTC | #2
This has been requested before, but is not currently planned. There's was a PR a while back that demonstrates a solution that may or may not work. https://github.com/MyPureCloud/platform-client-sdk-dotnet/pull/2/files
Vincent_BEZARD | 2019-11-26 11:07:49 UTC | #3
Hi Tim, Thanks for your answer. I think that the link you have provided needs to be completed. In fact, the changes are done in NotificationHandler.cs in the method ConnectSocket(). However, I think that the NotificationHandler constructor needs also to be completed with the proxy input params. Can you confirm? Thanks,
Vincent
tim.smith | 2019-11-26 20:42:30 UTC | #4
I haven't looked into the enhancement to advise exactly how to implement it.
system | 2019-12-27 20:42:31 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 6567