alaingilbert/ogame

websocket for chat can fail

twdnhfr opened this issue · 5 comments

Hope this helps, it seems the websocket connection can fail

ERRO [ogame.go:816] chat eof: EOF
ERRO [ogame.go:781] failed to get socket.io token: Get https://sXXX-de.ogame.gameforge.com:20029/socket.io/1/?t=1579XXXXXXXXX: dial tcp 79.XXX.XX.XXX:20029: connect: connection refused
ERRO [ogame.go:781] failed to get socket.io token: Get https://sXXX-de.ogame.gameforge.com:20029/socket.io/1/?t=1579XXXXXXXXX: dial tcp 79.XXX.XX.XXX:20029: connect: connection refused
ERRO [ogame.go:781] failed to get socket.io token: Get https://sXXX-de.ogame.gameforge.com:20029/socket.io/1/?t=1579XXXXXXXXX: dial tcp 79.XXX.XX.XXX:20029: connect: connection refused
ERRO [ogame.go:781] failed to get socket.io token: Get https://sXXX-de.ogame.gameforge.com:20029/socket.io/1/?t=1579XXXXXXXXX: dial tcp 79.XXX.XX.XXX:20029: connect: connection refused
ERRO [ogame.go:781] failed to get socket.io token: Get https://sXXX-de.ogame.gameforge.com:20029/socket.io/1/?t=1579XXXXXXXXX: dial tcp 79.XXX.XX.XXX:20029: connect: connection refused
ERRO [ogame.go:844] Failed to connect to chat

I refer to issue #26 someone explained that the Websocket doesn't use the Proxy set in HTTP Client. So if you use a Proxy, the Websocket for Chat api is using the normal internet connection. So your IP-Address is leaked. This Info is really importent for Multi Users.

In your case your Firewall mayblock outgoing TCP-Port 20029 I refer to the refuse Error.

They don't see the IP of the websocket in their tool.

Thanks for the replies, I am not using a proxy atm and this happened while runtime, so the chat connection worked before.

@alaingilbert I checked it with Wireshark now. Yes you are correct, the Issue #26 isn't an issue! Can you close it? I am totally confused by this guy @Kane67 . Damn it, he didn't even checked this out. It is so easy to run Wireshark and check it... and a little bit brain, @alaingilbert is using the b.connect(...) which is using the instance of HTTP Client constructed by New(...) so everything set there is reused on any connect method, which is great! Well done @alaingilbert !!! Appreciate!!!

And I am multi-user on many Universes and if this issue were true I would be fucked months ago!!! I am using it for many months now and didn't got a single ban... Even with the Phalanx issue were we have to verify the Data. But it's good to know that is curses a soft ban of 10 Minutes. :-) Good find out!

lol the 10min auto soft-ban was quite surprising to me. It took me a little while to understand why suddenly nothing was working anymore.