Saturday, June 16, 2018

Issues with performance between an SSH SOCKS5 Proxy and a normal SOCKS5 Proxy

Hello everyone! I'm new to this sub and I apologize if this does not belong here. I saw "No advanced gaming latency issues" but at the same time I don't feel like this belongs in r/HomeNetworking. Please correct me if it's wrong and I'll move this post asap! Thank you.

I've been encountering this issue for the past few months and have not been able to identify the issue. I only work on this in my spare time with my other friend. Our goal was to create what people call a "GPN" or "Ping booster". We successfully were able to get our "socksifier" working, where we would inject our DLL and it would change the destination of the connect command from the game to that of our proxy servers. It works fine and the traffic gets sent through the routes we want it to. But the issue comes down to performance (This is where it becomes more gaming latency related).

When we direct the traffic straight through our proxy servers (hosted in Singapore / Hong Kong / Taiwan), we get latency spikes (with it continually rising..) if we input multiple commands in the game, i.e attacking + moving.. almost as if there were too many packets being sent and it was bottlenecking somewhere. If we don't input too many commands, i.e attacking + NOT moving, the latency stays low and smooth. We tried to identify the issue for a long period but could not come to an answer. So we tried using PuTTy/PLink to create an SSH SOCKS tunnel (-D) through to our proxy servers and instead set the destination to 127.0.0.1. This completely alleviated the issue of our latency spikes, and is why we're confused.

Finally we decided to test some actual proxification programs that are available on the market. We tried Proxifier and ProxyCap. When we used ProxyCap, with both their SOCKS5 and SSH method, the issue once again did not occur, ever. But using Proxifier, it would still happen. I tried ticketing the ProxyCap support staff to ask if they were doing anything different and they told me they simply set "TCP_NODELAY" remotely to the servers, which we already do. What we did discover though, is that with PLink and ProxyCap, they redirect the traffic to localhost first, whereas Proxifier did not. Because of this, we hosted a local socks proxy with chaining setup to route the traffic to the other proxy where we initially wanted it to go.. but the problem still persisted.

About the servers: We purchased multiple linux VPS's in specific locations and hosted SOCKS proxies on them. We tried a multitude of different proxy programs, all with the same results. Every proxy has TCP_NODELAY set on it's socket. TCP_NODELAY is also set on the game's socket on the client's end. We tried testing multiple SNDBUF and RCVBUF values as well as messing around with TCP_QUICKACK rather than NODELAY, but nothing has solved this issue. We also tried testing running the game between Windows 7-10, 32-bit and 64-bit. The game is Blade and Soul (Taiwan) and it unfortunately only uses TCP..

I apologize for the long post and if there's any more information that could help, please comment and ask!

Thank you.

EDIT: In a post I made on SuperUser, someone suggested it could be the VPS Providers having higher priority for SSH traffic. But in that case, ProxyCap (using their SOCKS method) would perform just as bad, but it doesn't.



No comments:

Post a Comment