Archived

This topic is now archived and is closed to further replies.

Tunneling UDP for this game.... Impossible?

This topic is 4985 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Most games out there use UDP... however, many routers/firewalls/NATs or other network hardware disallow UDP packets. For the game Outpost 2, many people that I play with are having problems when trying to play thru a router. They cannot host or join a game. We have tried everything: setting port forwarding, DMZ in the router, and VPN. Nothing works. I''m the most knowledgable with programming in the group, and they''ve asked me to write a program that would allow them to play the game. The game uses UDP ports 47776 thru 47807. I have tried different approaches and both have failed. The first one involves writing a winsock "wrapper" DLL, by naming a DLL wsock32.dll and exporting all the functions that the game imports, then placing it in the same folder as the game EXE so it will load my DLL and not the system Winsock DLL. In the DLL, it is supposed to determine the host or client based off the nature of the calls to the DLL, and it will connect/listen at the right time, using TCP. The UDP packets are supposed to be piped thru the TCP stream to the computer(s) and at each end when the game calls recvfrom() to get data from a certain host, it would pass correct data into the program. However, I am at a loss as to how to go about packetizing the stream and manage all the connections. Example code would be useful. The second method I tried was to port a *nix tool called udptunnel. (Try searching on google) It does the exact thing what I want my program to do, but it fails to work, since it binds to the UDP port that the server is binding to, which creates a problem, of winsock saying the port is in use. It sets SO_REUSEADDR but that doesn''t help me out. If anyone could provide code of how I could go about doing this, I''d be pleased.

Share this post


Link to post
Share on other sites