Freelancer network protocols
-
A few months back I looked for directplay implementations but I could not find any.
I have implemented a fragment of the directplay. I lost motivation as I intensely hate implementing windowed protocols. The fragment was sufficient to pretend to be a FL server, i.e. show up in the multiplayer server window but nothing else.
Why are you interested in the FL network protocol?
-
A few months back I looked for directplay implementations but I could not find any.
Some incomplete work at Google Code, including a run at creating a Wireshark protocol plugin. Microsoft’s protocol seems fairly well documented.
I have implemented a fragment of the directplay. I lost motivation as I intensely hate implementing windowed protocols. The fragment was sufficient to pretend to be a FL server, i.e. show up in the multiplayer server window but nothing else.
If you are willing to share that fragment, I would appreciate it. I’d like to move on to the in-game stuff. Right now I’m just trying to identify fields and message types in the binary UDP exchange prior to the XML “game registration” with gun.fllistserver.com.
Why are you interested in the FL network protocol?
Most of it is just curiosity. I’ve been spending a lot of time trying to get my bearings within the structure of the game, and part of that is documenting things as I learn them, and reading other people’s work.
The fact that there doesn’t seem to be any publicly available information about the protocol is a motivator. I know some people know how it works, and I don’t, and that’s enough to get me going on the problem. I’d love to see an open-source, extensible Freelancer server and server directory, or a packet-inspection system that allowed for advanced anti-cheat (yay pie-in-the-sky). Given time and luck, I might be able to lay the groundwork for stuff like that.
Or maybe someone who knows more will lay the groundwork out, and I can get to work on something cooler.
This might be the wrong approach; completely replacing the game protocol with something a little more sane might be workable too. No idea if that would be even remotely feasible.
-
This is quite the noble endeavour. I’ll definitely be following your work. And, if you ever need a mod to be your guinea pig to test your thoughts/ideas on, feel free to shoot me a PM
-
Here’s a few programs to muck about with packets. PacketStats calls IServerImpl::DumpPacketStats, generating EXE\flservertrace.txt (I was lazy, just using an existing name in common.dll). PacketStatsExit is a plugin to dump the stats when FLServer shuts down, generating EXE\PacketStats-YYYY-MM-DD.hhmmss.txt (the time when the server started). PacketLog is a plugin to log all outgoing packets (didn’t find the incoming ones, yet) to EXE\PacketLog-time.txt. I’ve decoded a few, the rest can wait.
-
New version on my site. I’ve split it into two: PacketLog now just writes the raw binary data; PacketDump converts that to text. Client packets are included; most packets are decoded (albeit with a lot of unknowns). There’s no direct hash translation, but Flunhash (and an updated CreateID) takes care of it.
-
Oh wow, nice job with all that, adoxa!
Just a slight thing I noticed which could be improved on. (I think.)
The server news’ reversal is broken.
18:17:37.106: size = 58, FLPACKET_SERVER_MISCOBJUPDATE, offset = 0x25C28
flag = 0x0010
name = abcdefghijklm
001E: 6E 00 6F 00 70 00 71 00 72 00 73 00 74 00 75 00 n.o.p.q.r.s.t.u.
002E: 76 00 77 00 78 00 79 00 7A 00 v.w.x.y.z. -
Figuring out of the network protocols etc. might give knowledge enough to program a Linux server.
Another thought, IPv4 is really close to dying, and IPv6 is also faster. Figuring out of this could also allow to make FL compatible with IPv6, even though DirectPlay 8 doesn’t like IPv6.
-
Wolfie wrote:
Figuring out of the network protocols etc. might give knowledge enough to program a Linux server.Another thought, IPv4 is really close to dying, and IPv6 is also faster. Figuring out of this could also allow to make FL compatible with IPv6, even though DirectPlay 8 doesn’t like IPv6.
Really nice idea! If you need any help, write me an PN!
-
I don’t have the programming knowledge to do that sadly,sorry for writing in it such a way that it was easy to misunderstand.
I do have my knowledge when it comes to computers,but I didn’t get learning a programming language yet. I know HTML4, a little bit javascript and basic C++.
However, That should be possible doing; so I suggest that the FL community comes together to do it.
-
Huh. You ask someone else to do all the work for you so you can write an article about it?
Isn’t that a little… counterintuitive?
-
Oh man, I disassembled the GLS/GUN protocol through WireShark and emulated the packet transactions through a Java program a few months ago. It had full client support, and I was finishing up the server listing support on it before my hard drive crashed. Wish I backed that up…