Author Topic: IPXWrapper over the internet...  (Read 3987 times)

0 Members and 1 Guest are viewing this topic.

Offline Timballisto

  • Posts: 941
    • View Profile
IPXWrapper over the internet...
« on: April 14, 2014, 04:23:52 PM »
Hi all!  I'm still alive.

I recently unearthed my copy of Warcraft II, which is awesome.  I've also made a slew of multiplayer scenarios, which is also awesome.  What's less awesome is, while I can play other people over LAN, I have no good way to play against someone remotely.

I can play over LAN thanks to this thing which emulates IPX, but there's no way to get it to communicate with other networks out-of-the-box.  Also the source code isn't a complete mess, but, it's not exactly a joy to read through either.

So, to solve this problem, I've started writing something in Java which can take the UDP packets the IPXWrapper spits out and transmit them to another network(s).  So far I can intercept packets the IPXWrapper broadcasts and then rebroadcast them on the remote network and vice-versa.  This may be enough, if it gives the IPXWrapper instances the information they need to route packets between the two networks (I'll know whether or not this is the case later today), but it's possible I may have to find a way to intercept packets from the private sockets for each IPXWrapper instance (ie each running instance of Warcraft on the network).  I haven't had a chance to fully test this thing yet.

I'm telling all of you this because I know some of you here will be better at writing something like this than me.  Network programming isn't exactly something I'm an expert in (I had one class in college).  That said, anyone have any advice or know of something I'm not accounting for?  Would anyone like to help with this?

I can send people the source code if they want it.

Offline Simon

  • Administrator
  • Posts: 3954
    • View Profile
    • Lix
Re: IPXWrapper over the internet...
« Reply #1 on: April 14, 2014, 05:19:29 PM »
What's preventing IPXWrapper from sending data across the internet instead of to another LAN address?

This sounds like you need a VPN. There are existing VPN tools you might look into before writing your own, but it might prove to be a great exercise nonetheless. :-)

-- Simon

Offline Timballisto

  • Posts: 941
    • View Profile
Re: IPXWrapper over the internet...
« Reply #2 on: April 14, 2014, 06:01:37 PM »
There is no way to specify a remote destination or destinations for the IPXWrappers to send stuff to, the only things you can set in the configuration are the port to broadcast to and the network interface.  I'm thinking that each node broadcasts routing info to the rest of the network, and that those nodes pick it up and make transmissions based on that info.  I haven't been able to confirm this looking through the IPXWrapper code yet.  My hope is that I can dump the broadcast packets onto the other network and have it work that way.  It depends on whether or not the broadcast actually does what I think it does, and if the routing information is valid on the remote network (it might be if the sending address on the packet is used).

Yeah, perhaps a VPN would be a good way to go, but I knew that coming into this.  I'm not sure why I want to make my own thing, maybe for the reason you said.  It would be cool if I could actually get it to work.

Offline Timballisto

  • Posts: 941
    • View Profile
Re: IPXWrapper over the internet...
« Reply #3 on: April 22, 2014, 05:16:53 AM »
In case anyone was interested...

I've taken the first real step to getting this working.  Broadcasts now work correctly, so I can see a friend's game of Warcraft II in the games list.  Can't join it though, crashes the server when I try.  That's because packets that have a specific recipient aren't being submitted quite right yet (I'm not getting my port numbers back out of my packets correctly, I'll fix that soon).  Either way, I'm excited, because now I know that this can be done! = D

EDIT:

And, it's working!  I was able to play a game with a person on another network.  In fact, I was able to create a game with three people from three different networks, but we never launched the game.  Two people on the same network still causes issues, but, still, it's working!