Page 1 of 1

Workaround bad network routes

Posted: Sat Feb 17, 2024 10:41 am
by mudfreak
Hey,

this goes out to the network specialists.

Background:
==========
since a few weeks I have the problem that I get super bad lagspikes and jitter on ONLY my favorite game server (let's call it FAVSRV).
Via traceroute and ping I found that this happens only on the network route from my home (big german ISP connection) and
FAVSRV.
When I try traceroute and ping from a VPS I own then there seems to be no problems.

Here's my (failed) solution attempt:
==========================
I thought I could route the traffic from my home bzflag-client to FAVSRV via my VPS.
Being very nooby in network stuff I tried this on my VPS:
socat tcp-l:1234,fork,reuseaddr tcp:${FAVSRVIP}:${FAVSRVPORT}
socat udp-l:1234,fork,reuseaddr udp:${FAVSRVIP}:${FAVSRVPORT}

With my bzflag-client at home I now enter my VPS-IP and port 1234 and it then connects to FAVSRV via my VPS.
That's working - yay.

What does NOT work is the callsign authentication. I get a "-".

Question:
========
Can anyone help me with fixing the callsign authentication there?
Or come up with a better solution?
If this is a very stupid idiotic attempt, you can say that too, I don't mind. ;-)

Cheers,
Mudfreak

Re: Workaround bad network routes

Posted: Sat Feb 17, 2024 10:44 am
by playerStr
AFAIK global auth requests a token over https, so maybe you have to forward your https through your VPS connection as well?

Re: Workaround bad network routes

Posted: Sat Feb 17, 2024 12:10 pm
by mudfreak
Um, are you sure?
I don't think the client normally connects to "gameserver:443" for authentication.
Probably the game server takes the client IP and connects to some central auth server on port 443. But that's nothing that I need or could reroute.

Re: Workaround bad network routes

Posted: Sat Feb 17, 2024 12:13 pm
by playerStr
AFAIK it connects to a bzflag.org service for global auth, and I think the IP it does that with has to be the same as the one you log into a server with? I am not 100% on that

Re: Workaround bad network routes

Posted: Sat Feb 17, 2024 12:40 pm
by mudfreak
Yeah, that makes sense.
Maybe I need to reroute the traffic to bzflag.org too.
I need to figure out how to do that.

Re: Workaround bad network routes

Posted: Sat Feb 17, 2024 3:47 pm
by Zehra
The IP address must match for it to work.

In short:

Code: Select all

Client -> VPS -> Global auth
The VPS needs to make the authentication request if you are attempting to proxy your connection through it.

I started researching this due to IPv6/IPv4 issues messing with global authentication.

-Zehra