GTAMP.com

Grand Theft Auto Multiplayer
It is currently Fri Jan 18, 2019 7:00 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Nov 29, 2011 3:00 pm 
Offline
Car Jacker
User avatar

Joined: Sun Jan 03, 2010 12:47 pm
Posts: 36
Location: Togliatti, Russia
As I know GTA2 uses two-way connections (client and server) and requires forwarded ports to make connections from out outside are possible. Schematic of connections can be figured like this:

Attachment:
gta2_mp.png
gta2_mp.png [ 6.6 KiB | Viewed 8406 times ]

But if we can make something like "proxy-server", one-way connection can be achieved, like this:

Attachment:
gta2_proxy_mp.png
gta2_proxy_mp.png [ 11.82 KiB | Viewed 8406 times ]

"Proxy" means program that open two-side connection(s), one for GTA2 (localhost), one for opposite side (other proxy). After connections be established, program just transfer incoming buffers from one side to outcoming buffer to other side. As a result, traffic will be transfered like at "direct" connection.

By using only TCP protocol in proxy-proxy connections we can "transform" GTA2's UDP traffic to TCP traffic (no package loss), so number of "out of sync" lags probably will be reduced.

What are you thinking about this?

I'm a C programmer, I'm now learning winsock and I think I can make this program, but I don't have any program that can analyse gta2.exe's connections and I absolutely don't know what kind of connections gta2.exe establishes. So I need your help and I offer to develop this thing together.

_________________
.4LPINE


Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:08 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 905
This would be the one million dollar question.

I would like to use the hotline and call Vike.

_________________
"Mmmm, your eyes are so beautiful."


Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:22 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1345
Location: GTAMP.com
v11.41 already uses TCP for everything important. It is possible to make it so only the host needs open ports. Vike and I got it working a while back by using socat to proxy the data.


Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:24 pm 
Offline
Car Jacker
User avatar

Joined: Sun Jan 03, 2010 12:47 pm
Posts: 36
Location: Togliatti, Russia
Sektor wrote:
v11.41 already uses TCP for everything important. It is possible to make it so only the host needs open ports. Vike and I got it working a while back by using socat to proxy the data.

So you already tried to realise this idea?

_________________
.4LPINE


Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:25 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1345
Location: GTAMP.com
Yes we tried it but great to see you thinking the same.


Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:28 pm 
Offline
Car Jacker
User avatar

Joined: Sun Jan 03, 2010 12:47 pm
Posts: 36
Location: Togliatti, Russia
So what are results?

I don't think that integrating proxy server to gta2.exe is good idea. I you know what connections is gta2.exe opening maybe its better to write separate program? Or you are already tried to use _separate_ program?

P.S. Oh, I missed up socat. Is socat built only for cygwin? It's bad.

_________________
.4LPINE


Last edited by ALPINE on Tue Nov 29, 2011 3:31 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:30 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1345
Location: GTAMP.com
We used a separate program: http://www.dest-unreach.org/socat/

I'm looking for the settings we used but I think I lost them. http://gtads.blogspot.com used proxy method for GTA1, so only the host needed a port open.

TCPView is useful for seeing what ports a program uses.


Top
 Profile  
 
PostPosted: Tue Nov 29, 2011 3:35 pm 
Offline
Car Jacker
User avatar

Joined: Sun Jan 03, 2010 12:47 pm
Posts: 36
Location: Togliatti, Russia
I really don't want to run 202 servers (100 for TCP range 2300-2400, 100 for UDP, and 2 for 47624). Maybe there are ways to define only ports are REALLY used by gta2.exe?

_________________
.4LPINE


Top
 Profile  
 
PostPosted: Thu Dec 01, 2011 10:19 am 
Offline
Hitman
User avatar

Joined: Sun Feb 28, 2010 10:34 pm
Posts: 144
It is possible to force GTA2 to use specific ports; you use dxport. It just "hogs" all the ports that gta2 would otherwise use :P

yeah we've been pondering this for a while. The problem is it gets hairy when you have more than 2 players.

And then we start thinking about adding UPnP, and TCP or UDP hole punching, trying to make the whole thing general and always work. At which point it becomes ugly :P


Top
 Profile  
 
PostPosted: Thu Dec 01, 2011 10:53 am 
Offline
Hitman
User avatar

Joined: Sun Feb 28, 2010 10:34 pm
Posts: 144
By the way for writing stuff like this I recommend libev ;) Not that I've tried it myself yet but yeah.


Top
 Profile  
 
PostPosted: Fri Dec 02, 2011 10:02 am 
Offline
Car Jacker
User avatar

Joined: Sun Jan 03, 2010 12:47 pm
Posts: 36
Location: Togliatti, Russia
I've just correctly configured my router and - at last - played GTA2 Multiplayer.
Now when multiplayer works my interest of making this tool is quite lower than when I've created this topic :)

_________________
.4LPINE


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


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:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group