Subject: BOSH via Proxy Server using Openfire
The problem is the MatriX(.NET) cannot connect the BOSH Server through a proxy from client program.
It connects BOSH Server directly to the Openfire but not via proxy server.
We want to connect the BOSH server via proxy server.
We are using OnCreateWebRequest as suggested in previous posts, but that does not seem to help.
The sample code is as follows:
It connects BOSH Server directly to the Openfire but not via proxy server.
We want to connect the BOSH server via proxy server.
We are using OnCreateWebRequest as suggested in previous posts, but that does not seem to help.
The sample code is as follows:
- _xmppClient.Compression = false;
- _xmppClient.Hostname = null;
- _xmppClient.ResolveSrvRecords = true;
- _xmppClient.StartTls = true;
- _xmppClient.Status = "Online";
- _xmppClient.Show = Show.NONE;
- _xmppClient.OnMessage += xmppClient_OnMessage;
- _xmppClient.OnPresence += xmppClient_OnPresence;
- _xmppClient.OnError += xmppClient_OnError;
- _xmppClient.OnStreamError += xmpp_OnStreamError;
- _xmppClient.OnReceiveXml += xmpp_OnReceiveXml;
- _xmppClient.OnSendXml += xmpp_OnSendXml;
- _xmppClient.OnCreateWebRequest += xmpp_OnCreateWebRequest;
- void xmpp_OnCreateWebRequest(object sender ,WebRequestEventArgs args)
- {
- if (!(String.IsNullOrEmpty(Config.getInstance().ProxyUsername)))
- {
- Config.getInstance().ProxyUsername, Config.getInstance().ProxyPassword);
- proxyObject.Credentials = credential;
- }
- args.WebRequest.Proxy = proxyObject;
- }