Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 12:37

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 Post subject: Tribes 1 Master Server (msreborn)
PostPosted: 22 Aug 2007 03:57 

Joined: 21 Aug 2007 17:12
Posts: 28
Meh, I took it and wasted some time making it better. :)

https://sourceforge.net/projects/tribes1ms/

Fixed:
Threading - Creating new thread every time there is a new packet wasn't good. Made thread pool instead.
Heartbeats - Heartbeats are the same packet as "add me" packets. Altered add_server to recognize this.

Added:
Ability to mirror other master servers.
MOTD is now changeable.
There are a few commands you can use now. (While the program is running. Going to add more later.)

Have fun with it. (Smilies are disabled D: ) I may release the source later.


Last edited by Kigen on 22 Aug 2007 20:52, edited 1 time in total.

Top
 Profile  
 
 
 Post subject:
PostPosted: 22 Aug 2007 10:35 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
that msreborn source you used was old although the latest public, I have updated it a couple of weeks ago adding sql functions too and I should release it in these days.
The thread pool idea seems interesting, how did you implemented it?


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 11:00 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
for anyone: other ideas and suggestions for improving this tool are welcome and we can discuss about them just in this specific thread.

I wrote msreborn many years ago and I have never updated it (it's still 0.1) since I created it only for having something quick to launch for local LAN gaming (not production environment), while seems that recently it has been used as base for alternatives to the dead Tribes 1 master servers... but naturally my poor tool wasn't ready for that.

so ideas, ideas and ideas!!! 8-)


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 17:01 

Joined: 21 Aug 2007 17:12
Posts: 28
I sent you the code. Please tell me what you think aluigi. :)

But it appears for some reason the Tribes 1 master servers didn't die the day they were suppose to. I don't know whats going on now but its been an interesting project and a learning experience for me.

In the thread pooling there are 8 threads made for incoming connections. (A little excessive if you ask me but meh.) I've used Critical Section objects to make sure that two threads don't attempt to read/write to a shared resource at the same time (of course it should be portable to Linux).

I'm planning to add a full configuration file to it.


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 17:45 

Joined: 21 Aug 2007 17:12
Posts: 28
Just made the thread pooling dynamic. :)


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 19:34 

Joined: 21 Aug 2007 17:12
Posts: 28
I got bored and made my little editing project a home.

https://sourceforge.net/projects/tribes1ms/

Meh, its interesting to learn about SourceForge.


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 19:52 

Joined: 14 Aug 2007 13:32
Posts: 71
I dont get this part

Just a simple Tribes 1 Master Server. Many bug and exploit fixes have been made

What exploit was in the original code im sure luigi didn't code an unsafe server.Or am i missing some thing.


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 20:48 

Joined: 21 Aug 2007 17:12
Posts: 28
NoFiX of the Tribes community was able to crash the master server (original tribes1ms) with ease.

Spam it with UDP packets containing requests for the list and it'll probably crash due to thread spamming. Haven't tested that though.


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 22:31 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
yes n00b my implementation was very basic and vulnerable to DoS since I created it only for LAN (I wrote it many times in the readme and in the description too).

Kigen I will check your project on SF (or just the mail I have received from you) and I will check what I can merge in msreborn.
Thanx a lot, your help is very appreciated.

And I hope Garagegames will set up a master server, I have checked some forums and seems that there is a chaos since tons of people are setting up their own server ih ih ih


Top
 Profile  
 
 Post subject:
PostPosted: 22 Aug 2007 22:45 

Joined: 14 Aug 2007 13:32
Posts: 71
Oh i see not a problem m8 .!!


Top
 Profile  
 
 Post subject:
PostPosted: 23 Aug 2007 00:15 

Joined: 21 Aug 2007 17:12
Posts: 28
There haven't been that many people setup master servers. Still they act like its the end of the world.

I don't know how much you can merge with msreborn since I stripped out everything that I didn't see as useful for a Tribes master.

https://sourceforge.net/project/showfil ... _id=203954

Latest files include source code now.


Top
 Profile  
 
 Post subject:
PostPosted: 19 Oct 2007 01:32 

Joined: 21 Aug 2007 17:12
Posts: 28
What do you think of it aluigi?

http://sourceforge.net/projects/tribes1ms/

The release that is there now is what I'm considering to be a very stable release.

So far I've had it running for quite some time and nothing has happened.

I've had 11 hacking attempts on the master server so far. (In the instance that is currently running.)

My master server's address is kigen.ath.cx:28000. As far as I have seen no one has been able to hack it or crash it.


Top
 Profile  
 
 Post subject:
PostPosted: 19 Oct 2007 07:54 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
seems ok.

at line 599 you could add also something like:

if(!total_servers || (ti %= SERVERSPCK)) {

I added this and some other small lines in my private code that I have then abandoned.
If you want in attachment there are a couple of useful functions and the main code which use them.

Then, about threads, you could also make the master server completely threadless since it uses UDP packets.
Naturally it will require additional work and a good handling of the incoming and outgoing packets but you could think at this solution.

Oh and uintX_t types (which I declare as u8, u16 and u32) are better than u_char, u_short and u_int since their size is exact.


Attachments:
old_ms1.h [2.79 KiB]
Downloaded 68 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron