I programme an Unix chat server. To log in a client uses a browser and loads
a HTML frame page. One frame contains a java applet, another frame connects
directly to the chat server with http://www.abc.xy:12345/. The chat server
has now to find out that these two connections belong to one client.
I used getpeername() to retrieve the IP adresses of the clients and to find
out what connections belong together.
This didn't work always, and meanwhile I know what the problem is (thanks to
Soumen in c.p.tcp-ip): If the client uses a proxy I get different IP
adresses. That is if I use getpeername() to get the IP adress the connection
to the java applet returns the IP adress of the client. But the connection
to the HTML page in the browser returns the IP adress of the proxy! With
different IP adresses it is impossible to the server to find out that the
two connections belong to one client.
How can I find out that the two connections belong to the same client? Is it
possible to get the IP adress of the client behind the proxy? I'd say it
should be possible because there is a connection between the server and the
client's HTML page - but how?
Thank you very much in advance,