[UPHPU] Bi-directional Communication Through a Firewall
orson.uphpu at afriskito.net
Wed Jun 10 15:18:33 MDT 2009
Kirk Ouimet wrote:
> I want to do some fancy magic with this whole process, where my web server
> will actually record the port that the original request came through on and
> then use that port to send data back as needed. Essentially I want to open up
> persistent HTTP connection in order to circumvent any firewall that may be in
No need for fancy stuff, just establish a persistent HTTP connection from
the java client to your server. When the server needs to send a job to the
client, it just sends the data down the established persistent connection.
I believe there are html based irc clients that use this to have a live
interaction over a simple http connection.
I don't think you can just record the ports involved, then use them later
on, because many firewall time out connections that don't have any data
sent over a set time. Some even track the connection itself and remove the
port forward as soon as the connection closes.
Also, if you don't need to use HTTP, just use a normal TCP connection
instead. It will maintain the link until either end closes it.
More information about the UPHPU