[JDEV] socket redirect

Niklas Gustavsson niklas.gustavsson at framfab.se
Sun Jul 8 18:17:20 CDT 2001


I'm currently writing a Jabber client in javascript using Flash 5 as the
client socket. It works really good but I have one obstacle:
I want this to be running of a website, you should be able to type in the
URL for the client, get the Jabber client, log into Jabber and be up and
running. But, Flash only allows you to connect to the same server as the
webserver it loaded the flash file from. This leaves me with two options:

+ run my own Jabber server on the same computer as my webserver and force
everyone who wants to use the client to have a account on it. 
+ run a server that redirects all socket to any other Jabber server. It
could work by, for exemple, accept incoming sockets on port 5222, detect
what Jabber server the user wants to connect to (maybe by parsing the
<stream:stream>) and then handle the communication between the Jabber server
and the client during the rest of the session.

I want the second option, but I pretty much suck at writting such a server
(being a javacripter :-). Now, for development purposes I have written a
Java server that does this for me. But it wouldn't work for real-world usage
(hardcoded for one Jabber server, bad performance and memory handling and so

So, my question is: does anyone know of any, hopefully, free program that
will to this for me? Or, maybe even better, is there anyone out there who
would be willing to help me write such a program? Or, do you have any other
idea about how I could handle this problem?

I hope to be able to show you a working beta version of the client in a week
or so (busy at work right now :-)


More information about the JDev mailing list