#cant connect to my own server due to error 502

43 messages · Page 1 of 1 (latest)

thin zenith
#

I'm running the server on a separate laptop that runs on debian 10 since my main pc isn't that powerful. The 2 computers are connected to the same Network.

The laptop has the ip 192.168.0.125 and my main pc has the ip 192.168.0.62.

I changed the following two parameters in the config.json of the server:

accessAddress (game), accessAddress (server - http)

When I go to my main computer, I go to fiddler, paste the typical script:

import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;

class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.Equals("overseauspider.yuanshen.com:8888")) {
oS.oRequest.FailSession(404, "Not Found", "Not Found");
}
else if(oS.host.EndsWith(".yuanshen.com") oS.host.EndsWith(".hoyoverse.com") oS.host.EndsWith(".mihoyo.com")) {
oS.host = "192.168.0.125:22102"; // This can also be replaced with another IP address.
}
}
};

When I successfully run the server in my laptop I open anime game 3.7, try to login with an already created account in my server and get error 502. When I go to Fiddler I click on one of the packets that corresponds to the game and it says that my laptop refused the connection (¿?).

I already clicked on trust certificates, I have downloaded keystore.p12 and enabled encryption via config.json. I'm using GC 1.6.3 (latest stable release).

hallow abyss
#

oS.host = "192.168.0.125:22102"
This is the issue

#

Remove :22102

thin zenith
#

Ok let me try

#

now i get error 400 inside the game

hallow abyss
#

Close and reopen the game

thin zenith
#

ok

#

gimme a sec

hallow abyss
#

Make sure that useEncryption and useInRouting are both true, as well. Not just encryption

thin zenith
#

they are

hallow abyss
#

Then you'll be good to go

thin zenith
#

still the same error

#

fiddler says

#

"Invalid SNI"

#

<tr><th>CAUSED BY:</th><td>org.eclipse.jetty.http.BadMessageException: 400: Invalid SNI</td></tr>

hallow abyss
#

Ok so you changed both access addresses in config? Did you change anything else in there?

thin zenith
#

no

hallow abyss
#

Also can you send your fiddler script in a code block so it actually shows everything properly. You put three ` on either side of it, ``` like so ```

#

A copy of your config.json would also be ideal

thin zenith
#

ok let me send them to you

#
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;

class Handlers
{
    static function OnBeforeRequest(oS: Session) {
        if (oS.host.Equals("overseauspider.yuanshen.com:8888")) {
            oS.oRequest.FailSession(404, "Not Found", "Not Found");
        }
        else if(oS.host.EndsWith(".yuanshen.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com")) {
            oS.host = "192.168.0.125"; // This can also be replaced with another IP address.
        }
    }
};```
#

there it is

#

if by any chances youre wondering, i checked that my laptop's LAN ip is that one by logging into my router and checking it

hallow abyss
#

Could you double check that is the correct one by opening a new cmd on your laptop and running ipconfig and checking what it says for IPv4 Address for it's main adapter

#

If it is correct then either:

  • Your devices cannot reach each other on your network
  • Your fiddler is not set up correctly
thin zenith
#

yeah, it says inet4 192.168.0.125/24

#

im pretty sure it has to do with firewall in my laptop

hallow abyss
#

You can check if it's a local issue or a fiddler issue by changing the address to a public server like Yuuki and seeing if you can reach it

thin zenith
#

but idrk

#

whats yuukis ip?

hallow abyss
#

you can do this by changing the address in fiddler to ps.yuuki.me while the game is closed, then opening it again

thin zenith
#

yeah

#

yuukis server works

hallow abyss
#

Ok then the issue is definitely your network

thin zenith
#

it has to do something with firewall pretty sure

#

thank you for your help

hallow abyss
#

No problem

thin zenith
#

well, i guess im just gonna play and run in the same computer

#

idk what isnt working since i used this same setup (laptop/pc) before to play

#

opened ports using sudo ufw

#

honestly idk