I need to pick your brains :-D

I have a server/client application, the clients are located all over the word & the server is running on my PC.

The problem is, my IP address is not static. So at the moment i have programmed the server to upload the IP of the computer on which it is running (my computer...) to an FTP site, then when the clients are executed they connect to the same FTP, download the IP address of the server... and connect.

Now this works beautifully, but there is one BIG (and obvious) problem. To connect to the ftp the clients need to have the username and password of the FTP in their code, at the moment i have some crappy xor encryption hiding them, but i dont think doing things this way will ever be secure enough, a hacker will always be able to extract the username and password somehow, no matter what encryption method is used.

So the big question is, what is a more secure way of getting the IP address of the server to the clients?

I need to work something out quickly, as its only a matter of time before i get found out!

Posted on 2005-01-01 12:27:24 by Lennon
May be you can use another method.
Use an internet host with MySQL + PHP with free access for anybody (HTTP). You need a valid user and password just to update ip value/s in DB. Then, from client you can call the script that will return the ip value.

CLIENT ->_www.host.com/getip.php
CLIENT <- XXX.XXX.XXX.XXX (plain text)

"getip.php" query the ip value in DB and return it in plain text. The user and password fields are in the script (and not in client place). This is just an idea. Hope it help.

Posted on 2005-01-01 13:45:07 by Kecol
Sounds interesting, but i forgot to mention something important :oops:

Im about to change things so i have more than one active server running, i will release my server so anyone can host it. The clients will then get a list of all active servers, and then connect to the server of their choice.

The way i would do this using FTP is to have all the servers upload their IP's to an FTP folder, the clients then get all the files in that FTP folder, display them in a listbox, and then the user of the client connects to the server of their choice.

What this means is, the public will have both the server & cient, and they both must contain a username and password!

Posted on 2005-01-01 14:11:10 by Lennon
Maybe you can use a dynamic dns service like dyndns.org. That way you would just include yourname.dyndns.org in your code.
Posted on 2005-01-01 14:37:55 by QuantumMatrix1024
:) that would work great if i still only had one server on my own computer, but no good for the multiple server problem

I suppose one answer would be to have a central running on my computer that the other servers send thier IP + other details to, then the clients connect to the central server to get the list of active servers. That would work :-D

Problem is it means coding a whole new central server, and the clients and normal server will need big changes, i dont know if i have enuff time to get all that done :(

Surely there is a simpler way of doing things?
Posted on 2005-01-01 15:20:38 by Lennon