[HELP] 5017 RUNNING TWO SERVERS, look here.

03/16/2010 18:53 ImmuneOne#16
I don't really see the difference now, from loading the character's server from ini nor mysql.
03/17/2010 02:24 CptSky#17
Quote:
Originally Posted by Korvacs View Post
[...]3) Have your game servers lookup their ip and port from a database and have the auth server send the client to the correct game server (this is how i do mine), i can run as many game servers as i like using the same source and it grabs the correct port from the database, this reduces human error dramatically as the server will not start if the server is already running somewhere.[...]
Already use this method before, but if the port doesn't match (I know one of the situation), you can't log in the game server. I use AccountId and Token. The AccountId is the account hashed with FNV and the token is a value always incremented after a connection. I just make a check for them and if they match... The first game packet contains the two elements, why don't use them.
03/17/2010 03:15 kamote#18
Quote:
Originally Posted by CompacticCo View Post
I was wondering how I'd be able to RUN two server's of the same source on the same IP without it crashing, also how would the server.dat look like? I've tried a few times and the server.dat didn't work out.
all you need to do is change the port # of the AUTH/Login server and also with the game server... it should be set differently with each other...
03/17/2010 22:46 Korvacs#19
Quote:
Originally Posted by CptSky View Post
Already use this method before, but if the port doesn't match (I know one of the situation), you can't log in the game server. I use AccountId and Token. The AccountId is the account hashed with FNV and the token is a value always incremented after a connection. I just make a check for them and if they match... The first game packet contains the two elements, why don't use them.
If which port dont match out of interest? I dont really get what your saying.

For people who are considering using the client to move the accountID and remove the need to comminicate between auth and game servers, your auth packet and game packet can be exploited to login to which ever character they like if you dont have neccassery protection on the accountID in the packet, this means that encryption is a must.
03/18/2010 02:49 CptSky#20
Quote:
Originally Posted by Korvacs View Post
If which port dont match out of interest? I dont really get what your saying.

For people who are considering using the client to move the accountID and remove the need to comminicate between auth and game servers, your auth packet and game packet can be exploited to login to which ever character they like if you dont have neccassery protection on the accountID in the packet, this means that encryption is a must.
You check the ip address and the port in database? It's not the same for the auth connection and the game connection, but I am sure that you already know. In general, the game connection use the auth port incremented, but not always. It's what I try to say if I understand the way you compare.

I understand your point for the AccountID, but I think it can be hard. Yes, you can manipulate your packet, but you will probably fail at login because the account you try to use doesn't have the same Token in the DataBase.

Code:
--- Auth Response ---
Generate AccID (FNV Hash)
Generate Token (LastToken++)
Save Token (Acc File)

--- Game Request ---
Generate AccID (FNV Hash)
Check Token (Check for the Acc with Token)
Check AccID (Check if the Acc and the Packet match)
03/18/2010 09:55 Korvacs#21
The Auth port for Conquer is 9958 usually, and the game ports start at around 5160, its been like that since the beginning of time i think lol.

It depends how you use the token and accountid, i dont store the token anywhere, so my lookup is based soley on the accountid.