View Single Post
  #8  
Old 04-29-2016, 12:04 AM
Zaela Zaela is offline
Sarnak


Join Date: Jul 2014
Posts: 319
Default

If packets are getting dropped left and right, there's not much you can do.

But if your connection is mostly okay, it may be an issue with packets being delivered out of order. Normally when the client receives packets out of order, it informs the server of what it expected to receive next, and the server re-sends that packet and everything "after" it.

The eqemu login server deliberately ignores these out-of-order requests from the client, presumably because it would be a relatively cheap and easy DoS vector. When that happens, the client gets cranky and starts flagging every packet it gets from then on as "out of order", and nothing gets done.

There is a workaround for this, though... We can put a layer between the client and the loginserver. The layer forces all the packets the client sees to be in order. If the layer receives packets out of order, it does nothing -- it just waits until the gaps are filled by later packets, then sends them all to the client in order. As long as no packets are dropped entirely, this works quite well.

As far as the loginserver goes, pretty much the only thing that can be received out of order is the server list, and it's only 10 or so packets. Once you pass that hurdle, char select and zones should handle out-of-order requests correctly, so receiving things out of order shouldn't matter as much (and these can also address dropped packets to some extent).


You can download the workaround program (eqemu-login-helper.exe) here. Code available here.

If you want to try this out, there is a little setup involved:

Steps:
1) Open eqhost.txt in your EQ folder, and change the Host from "login.eqemulator.net:5998" to "localhost:5998".
2) Start eqemu-login-helper.exe and keep it running in the background.
3) Start EQ and log in as usual

The workaround is technically a "man in the middle", but it runs entirely on your local machine, and it does nothing except forward packets (client -> loginserver), possibly after inspecting their "sequence" values and keeping them in a temporary queue (loginserver -> client). Only packets sent between you and the loginserver are treated this way; once you connect to a specific server, eqemu-login-helper is no longer in the middle of any client-server communication.

You'll need to remember to always run eqemu-login-helper before trying to log in, or else remember to change your eqhost.txt back to login.eqemulator.net if you want to log in without it. Making this convenient is left as an exercise for the reader...
Reply With Quote