Making "proxy-server" for GTA2 Networking
- ALPINE
- Car Jacker
- Posts: 36
- Joined: 03 Jan 2010, 12:47
- GH nick: ALPINE
- Location: Togliatti, Russia
- Contact:
Making "proxy-server" for GTA2 Networking
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:
But if we can make something like "proxy-server", one-way connection can be achieved, like this:
"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.
But if we can make something like "proxy-server", one-way connection can be achieved, like this:
"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
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: Making "proxy-server" for GTA2 Networking
This would be the one million dollar question.
I would like to use the hotline and call Vike.
I would like to use the hotline and call Vike.
"Mmmm, your eyes are so beautiful."
Re: Making "proxy-server" for GTA2 Networking
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.
- ALPINE
- Car Jacker
- Posts: 36
- Joined: 03 Jan 2010, 12:47
- GH nick: ALPINE
- Location: Togliatti, Russia
- Contact:
Re: Making "proxy-server" for GTA2 Networking
So you already tried to realise this idea?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.
.4LPINE
Re: Making "proxy-server" for GTA2 Networking
Yes we tried it but great to see you thinking the same.
- ALPINE
- Car Jacker
- Posts: 36
- Joined: 03 Jan 2010, 12:47
- GH nick: ALPINE
- Location: Togliatti, Russia
- Contact:
Re: Making "proxy-server" for GTA2 Networking
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.
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.
Last edited by ALPINE on 29 Nov 2011, 15:31, edited 1 time in total.
.4LPINE
Re: Making "proxy-server" for GTA2 Networking
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.
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.
- ALPINE
- Car Jacker
- Posts: 36
- Joined: 03 Jan 2010, 12:47
- GH nick: ALPINE
- Location: Togliatti, Russia
- Contact:
Re: Making "proxy-server" for GTA2 Networking
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
- Vike the Hube
- Hitman
- Posts: 145
- Joined: 28 Feb 2010, 22:34
- GH nick: vike
Re: Making "proxy-server" for GTA2 Networking
It is possible to force GTA2 to use specific ports; you use dxport. It just "hogs" all the ports that gta2 would otherwise use
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
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
- Vike the Hube
- Hitman
- Posts: 145
- Joined: 28 Feb 2010, 22:34
- GH nick: vike
Re: Making "proxy-server" for GTA2 Networking
By the way for writing stuff like this I recommend libev Not that I've tried it myself yet but yeah.
- ALPINE
- Car Jacker
- Posts: 36
- Joined: 03 Jan 2010, 12:47
- GH nick: ALPINE
- Location: Togliatti, Russia
- Contact:
Re: Making "proxy-server" for GTA2 Networking
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
Now when multiplayer works my interest of making this tool is quite lower than when I've created this topic
.4LPINE