GithubHelp home page GithubHelp logo

Restore Mojang skins proxy about chrly HOT 6 CLOSED

elyby avatar elyby commented on June 20, 2024
Restore Mojang skins proxy

from chrly.

Comments (6)

Nik-mmzd avatar Nik-mmzd commented on June 20, 2024

we easily performed 19k requests from the one IP for about a minute (Mojang, if it affects you, we are really sorry. You know, it's all for science!)

It was pretty easy. Only 1k curl threads and about 100% CPU load :D
image

from chrly.

afdw avatar afdw commented on June 20, 2024

It is also possible to make new versions of patched Authlib for Minecraft 1.2.5+ that will pass special flag to Ely.by (like noMojang=true). When the server receives a request with this flag, it does not make a request to Mojang if there is no skin in Ely.by database, but instead informs the client that it has to fetch the skin from Mojang itself, using IP address of the user.

from chrly.

turikhay avatar turikhay commented on June 20, 2024

@afdw it may also work as a proxy for Ely.by itself by forwarding the full response from Mojang to Ely. As far as I know all responses are signed, so Ely is able to do the validation.

from chrly.

erickskrauch avatar erickskrauch commented on June 20, 2024

@turikhay yes, I have thought about it, but there is one key problem: we are going to receive textures, that we don't know. Ely.by codebase uses md5 to identify skins, but even with over 1 500 000 skins in our DB there will be very low hit rate of known textures. I'm not saying that it would not work, but I'd imagine that there will be a lot of skins, that'll never appear on Ely.by. Of course, we can drastically increase Ely.by's skins base, but without a skin recognition system this will only increase the memory costs without a real benefit to the project.

@afdw yeah, it sounds like a good idea. We may decrease the load by reallocating this logic into Authlib (Minecraft 1.7.10+), but for old versions (we are still keeping support for Minecraft 1.2.5) this solution could be the only possible solution, since writing patch for obfuscated classes is not a good idea.

from chrly.

Nik-mmzd avatar Nik-mmzd commented on June 20, 2024

@erickskrauch we can use both solutions at once: 1.7.10+ will request Mojang textures by itself, older versions will ask chrly for Mojang textures, so it will lower Mojang textures RPS

from chrly.

TheRadioGuy avatar TheRadioGuy commented on June 20, 2024

If skin is not exists in database - get skin by mojang api.

If you reached mojang api limit - add this task to queue, and return default Steve skin to client;

You can create longpoll connection, and when we will get skin, we will return skin to client;

from chrly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.