ZTzTopia / GTProxy

⚖️ A proxy for growtopia. NO SHADOW BAN!
MIT License
54 stars 37 forks source link

Stuck at "Located server, connecting..." #71

Closed Furkan125 closed 10 months ago

Furkan125 commented 11 months ago

I started the proxy I have "127.0.0.1 www.growtopia1.com and growtopia2" in my hosts file but I'm stuck on "Located server, connecting...".

message.txt

badewen commented 11 months ago

You have to somehow get www.growtopia1.com ip address and put it in config.json

Furkan125 commented 11 months ago

Thanks it worked

Furkan125 commented 11 months ago

I had to reopen the issue because there is a problem. I got the ip address of www.growtopia1.com (it keeps changing as 195.175.176.144 and 195.175.176.225) but after playing the game for a while, I get disconnected and it stuck on the "Located server, connecting..." screen again (even if the ip is correct) and doesn't get fixed until I reset the router.

badewen commented 10 months ago

sorry i just came home from school, i will investigate the problem and maybe implement auto ip resolve to ease the need of manually changing growtopia's ip.

badewen commented 10 months ago

anyways can i know how you got the ip address? would be very helpful :)

Furkan125 commented 10 months ago

Here is an example in python:

>>> import socket
>>> socket.gethostbyname("www.growtopia1.com")
'195.175.176.225'

but because of the hosts file, when we try this while the proxy is running, the result is 127.0.0.1

>>> import socket
>>> socket.gethostbyname("www.growtopia1.com")
'127.0.0.1'
>>> socket.gethostbyname("a1966.dscb.akamai.net")
'195.175.176.144'

a1966.dscb.akamai.net always giving the ip

I couldn't find a way to do the same as I'm not very good at C++ By the way, unrelated but can you give an example of how I can send a VariantList?

koftrciali commented 10 months ago

I had to reopen the issue because there is a problem. I got the ip address of www.growtopia1.com (it keeps changing as 195.175.176.144 and 195.175.176.225) but after playing the game for a while, I get disconnected and it stuck on the "Located server, connecting..." screen again (even if the ip is correct) and doesn't get fixed until I reset the router.

u need edit enet

TheArmagan commented 10 months ago

Newest ip is 195.175.178.105 but still having same issue. Gets stuck on Located server, connecting. and then after some time proxy gets disconnected. My client version is 4.34

[2023-08-11 15:04:28.533] [GTProxy] [info] Headers:
[2023-08-11 15:04:28.533] [GTProxy] [info]      Accept: */*
[2023-08-11 15:04:28.533] [GTProxy] [info]      Content-Length: 36
[2023-08-11 15:04:28.533] [GTProxy] [info]      Content-Type: application/x-www-form-urlencoded
[2023-08-11 15:04:28.533] [GTProxy] [info]      Host: www.growtopia1.com
[2023-08-11 15:04:28.533] [GTProxy] [info]      REMOTE_ADDR: 127.0.0.1
[2023-08-11 15:04:28.534] [GTProxy] [info]      REMOTE_PORT: 50191
[2023-08-11 15:04:28.534] [GTProxy] [info]      User-Agent: UbiServices_SDK_2019.Release.27_PC64_unicode_static
[2023-08-11 15:04:28.534] [GTProxy] [info] Params:
[2023-08-11 15:04:28.534] [GTProxy] [info]      platform=0&protocol=192&version=4.34
[2023-08-11 15:04:29.269] [GTProxy] [info] POST /growtopia/server_data.php 200
[2023-08-11 15:04:29.327] [GTProxy] [info] New client connected to proxy server.
[2023-08-11 15:04:30.079] [GTProxy] [info] Connecting to Growtopia server (213.179.209.168:17197).
[2023-08-11 15:04:30.216] [GTProxy] [info] Connected to Growtopia server.
[2023-08-11 15:04:31.949] [GTProxy] [info] Outgoing MessagePacket:
NET_MESSAGE_GENERIC_TEXT [2]: [Hided.]

[2023-08-11 15:04:49.796] [GTProxy] [info] Disconnected from Growtopia server.
[2023-08-11 15:04:49.815] [GTProxy] [info] Client disconnected from proxy server.
badewen commented 10 months ago

Here is an example in python:

>>> import socket
>>> socket.gethostbyname("www.growtopia1.com")
'195.175.176.225'

but because of the hosts file, when we try this while the proxy is running, the result is 127.0.0.1

>>> import socket
>>> socket.gethostbyname("www.growtopia1.com")
'127.0.0.1'
>>> socket.gethostbyname("a1966.dscb.akamai.net")
'195.175.176.144'

a1966.dscb.akamai.net always giving the ip

I couldn't find a way to do the same as I'm not very good at C++ By the way, unrelated but can you give an example of how I can send a VariantList?

Thanks for the method. It really helps. as for your question, i dont really remember how because i havent used this proxy for a while now. Try digging through the code base especially client.cpp and server.cpp file.

Furkan125 commented 10 months ago

I had to reopen the issue because there is a problem. I got the ip address of www.growtopia1.com (it keeps changing as 195.175.176.144 and 195.175.176.225) but after playing the game for a while, I get disconnected and it stuck on the "Located server, connecting..." screen again (even if the ip is correct) and doesn't get fixed until I reset the router.

u need edit enet

you mean enet library itself or enetwrapper?

Newest ip is 195.175.178.105

Do you know how often it changes?

Try digging through the code base especially client.cpp and server.cpp file.

There is an example in the client.cpp file, I'm trying to figure out how it works

badewen commented 10 months ago

you can now close this issue. As for the recon issue, i cant really say anything atm as i got no time to test them.

badewen commented 10 months ago

Fixed on #72