How to configure BOSH server to support my own XMPP server? - xmpp

I set up a BOSH server using node-xmpp-bosh and configured converse.js (a javascript XMPP client) to use the BOSH url I set up, I tried log in with my jabber.org account on converse.js and all worked fine.
Now I need to make this work with a private XMPP server. Assume that the XMPP server is at chat.mysite.com:5222, a JID on the server is johndoe#mysite.com. How do I configure the BOSH server so that it connects to chat.mysite.com:5222 when I try to log in with johndoe#mysite.com on converse.js?

You should add DNS SRV record _xmpp-client._tcp.mysite.com which should point to chat.mysite.com 5222

Related

Send mail through proxy

I would like to set up a proxy for SMTP traffic by this i mean send and receive mail through a proxy.
I have a machine which is not directly connect to an internet gateaway, I already have an squid proxy for http and https but now i need to send mail (receive is not fundamental)
Which tools do you advice me to use and if you have some doc or tutorial to use this tool as an smtp proxy it would be great. (I'm running on CentOS 7)
Thanks in advance

XMPP chat app architecture suggestion

I have a chat app having web service installed on tomcat server, ejabberd as XMPP server. Right now i am using strophe.js on client side to directly communicate with ejabberd server for chatting purpose.
Is this correct chat app design ? or shall I send chat through tomcat server so that xmpp server is not accessible directly from client side ? Can anyon suggest a better design ?
You should connect your clients directly to ejabberd (or through a proxy like NGinx). ejabberd is designed to receive lot of traffic directly and using Tomcat as proxy will not be scalable and is not recommended.

A way to forward or intercept smtp mail request to localhost?

Wondering if we have options for a failing smtp mail at "localhost" after changing DNS host.
The problem setup is this:
SMTP mail is being sent from a server, with mail being configured on the server itself. Originally, server was host of DNS domain as well as web app.
Using JavaMail, a request is sent to "localhost" without any authentication
The DNS settings have changed, server hosting web app is no longer the "from" email address
The Java web app cannot be modified and is still sending to "localhost"
Question: Do we have any options?
I'd like to intercept the "localhost" smtp mail request and forward it along to our domain's mail server, with new credentials, but am unsure if that is possible. A stand-alone script to watch for those requests?
We did receive the suggestion to edit our DNS settings on the new hosting and add "MX" and "A" records, but that would require a change of source code, which is not an option at this time.
Thanks!
If there's no SMTP server running on localhost, and you just want to redirect mail to another mail server without authentication, you could use a simple "proxy/tunnel" using something like the "netcat" program.
If there is an SMTP server running on localhost, you might be able to configure it to forward all messages to your other mail server.
Otherwise, is it possible to change the properties used by JavaMail in your web app, without changing the source code? For example, do the properties come from a file or from System.getProperties()?

How can I develop a web client gtalk via xmpp

I try to develop a web client gtalk in my http server.I know what I should do is just using the strophe.js which could send the xmpp message to xmpp server. I don't want to build my own xmpp server which connect to gtalk xmpp server.I think it may no need to build xmpp server as a transport.
But the gtalk xmpp server has no http-binding,so what should I do to send my http message to gtalk xmpp server? And if I send the http message to talk.google.com:5222,will it reply to me? Is it possible to make the connection between me and gtalk xmpp server?
I need your help.Thanks!
Gtalk server does not run a BOSH connection manager, so you would have to use a standalone one, like Punjab, for example.
After installing and running Punjab, you can have a HTTP-Bind at http://localhost:5280/xmpp-httpbind. Use your Strophe with it.

Proxy Facebook chat to bypass firewall

We built a flash application using XIFF XMPP to integrate with Facebook chat.
Problem is we found out a lot of firewalls out there do not allow Jabber (ports 5222, 5221).
So I was wondering if anyone tried to set-up a BOSH implementation (or something else) as a proxy to Facebook's chat for clients who are blocked by a firewall.
Thanks
Guy
How about PunJab?
PunJab is a HTTP jabber client interface. It is a BOSH connection manager that
allows persistent client connections to a XMPP server.
Actually facebook xmpp chat works even with port 443