Click to See Complete Forum and Search --> : Server as a proxy.


Bios1
May 28th, 2004, 11:47 PM
Can client A get connected to client B using their commun server (data base) as a proxy ? A and B cannot establish a direct connection between themselves as they have a dinamical IP address and ignore it, while server has a known permenant IP address. A and B have permenant user names valid for the server.

kuphryn
May 29th, 2004, 12:53 AM
Definitely. In the case that the two clients share the same IP, one possible solution would be multiple logins.

Kuphryn

Bios1
May 29th, 2004, 08:47 PM
No, I mean 2 clients from 2 different ISP, they cannot call each other as they ignore the IP of partner; only if they both are visiting the server, they could use the server as a router, the question is how.

kuphryn
May 29th, 2004, 10:32 PM
Check out examples at CodeProject code section. I am not too familiar with socket relay. As far as I know, a proxy server can receive incoming data and then resend the data to the clients.

Kuphryn

Bios1
May 30th, 2004, 12:03 AM
I mean a normal server, not a proxy server. Using your terms: can a normal server be used as a proxy one ?
It is a question to all.

Bios1
May 30th, 2004, 12:16 AM
An immediate example: you and me know each other login and passwords, and we ask this forum server to connect us directly.
Or I ask the server if you are on-line. Some non-proxy servers display who is on-line. If they dont display, can they be asked to do it ?

j0nas
May 30th, 2004, 01:43 PM
Yes, provided that:
- A and B send their WAN IP addresses (or DNS name)
- A or B listens to TCP port

This is a common idiom... Must P2P software works like this.

Bios1
May 30th, 2004, 04:28 PM
j0nas: in your answer no place for the server, while I wanted to use the server to facilitate p2p connection between A and B.

j0nas
May 30th, 2004, 05:07 PM
Originally posted by Bios1
j0nas: in your answer no place for the server, while I wanted to use the server to facilitate p2p connection between A and B.
I was actually thinking of a server in between--I just left out that part... That's why I stated that A and B must use their WAN addresses, to post them up to a some server (to be exchanged later). You should think of this server as a broker. In MSN (Microsoft Messenger), this service or server is referred to as the swtichboard server... A think a better name would be a message broker or message dispatch server, but it doesn't really matter. The imporant thing is that both clients must send their WAN IP addresses, up to the "server", before direct "talking" is possible.

I don't know exactly what you have in mind, but I would let each client to logon to the broker service and upon success, the client retrieves a list of all online clients. Each entry in the list contains a client's friendly name, IP and/or DNS. The logon stuff is just to identify the client, so it can be added to the online list.

Bios1
May 30th, 2004, 07:17 PM
Yes, I mean this, and how to check if the server has a broker service, how to use and code samples.

j0nas
May 31st, 2004, 03:57 AM
There is no ready to use brokers, you have to create this service yourself.

As a start, you can write a cgi-bin script (some web app) that acts as your broker. Or, you can just create a TCP server program in plain C or C++ using sockets. You have to have some sort of application protocol... I suggest a text-based protocol.

Let me know if you need a simple sample.

Bios1
May 31st, 2004, 06:47 PM
Thank you for your suggestion. It was not my primary aim. The broker service cannot be the first dish of the server, but a dessert. It has the sense when many people visit frequently a particular site, and when you see some friends there, it would be nice to chat directly to them.
Since we are here at networking forum, we could test our own network programs direct on-line, letting know our IP address. I dont have a fix one.