bs-community / yggdrasil-api

Please refer to https://github.com/bs-community/blessing-skin-plugins .
MIT License
60 stars 7 forks source link

English language support #12

Closed lukruh closed 4 years ago

lukruh commented 5 years ago

Hey, I'm interested in implementing a custom yggdrasil auth service in my minecraft server. Unfortunatly I can't find any english (or german) instructions. Tryed to translate the readme using google translate but it's not very helpful at all ;).

So I'm using the HMCLauncher already there is an option -> "authlib-injector". But same problem there.. everything in chinese..

As far as I know three applications need to be changed, since they communicate with mojange auth server by default (launcher/game/server). I don't know how to implement the injector on serverside and also I would like to know if this can be used in addition to mojang auth (not only as replacement) on the same server?

yushijinhun commented 5 years ago

Hi, I'm the initiator of authlib-injector project. And I'm sorry that almost all the documents are only available in Chinese. I would be grateful if anyone could help me translate those things into English.

Let me give a brief introduction of how these things work:

  1. authlib-injector is a javaagent. Javaagent is something which can dynamically change the behaviour of a Java program at runtime. I use this technology to modify the Minecraft client/server and to make them use the custom Yggdrasil authentication server.
  2. authlib-injector's wiki contains Yggdrasil Server Specification and Launcher Specification. They expound how a Yggdrasil authentication server should be implemented and what a launcher needs to do in order to support authlib-injector. These specifications are based on the reverse engineering of Mojang's authentication APIs.
  3. HMCL is a Minecraft launcher which supports authlib-injector. (It has English support.)
  4. yggdrasil-api is a plugin of Blessing Skin Server, which implements the Yggdrasil authentication APIs on top of Blessing Skin Server.

I hope this will help you.

yushijinhun commented 5 years ago

if this can be used in addition to mojang auth (not only as replacement) on the same server?

As to this question, my answer is No. Mixing two authentication systems is really complex. I have tried this before (see #4 , unfortunately it's in Chinese), but did not succeed.

lukruh commented 5 years ago

Thanks for the reply, I'll come back to this and try to install it on my server later on. Your brief instruction was good to give me a clear overview how the projects are related. Only thing that's not clear yet is how to implement/install the authlib-injector on the server (unix/debian, spigot 1.13.2).

I guess I need to install the package and start the servers jar file with the -javaagent:{authlib-injector.jar 的路径}={Yggdrasil 服务端的 URL(API Root)} parameter?

yushijinhun commented 5 years ago

I guess I need to install the package and start the servers jar file with the -javaagent:{authlib-injector.jar 的路径}={Yggdrasil 服务端的 URL(API Root)} parameter?

You are right if I didn't misunderstand your meaning. Note that the parameter should be inserted before -jar.

And the English translation of the parameter:

-javaagent:{/path/to/authlib-injector.jar}={API Root of Authentication Server}

You need to replace the two string templates ({...}) in the parameter.

authlib-injector can be downloaded here (JSON API). (or here if you understand Chinese)

Take skin.prinzeugen.net (a demo Blessing Skin Server instance maintained by @printempw) for example, "API Root of Authentication Server" is https://skin.prinzeugen.net/api/yggdrasil. But it can be shorter: the protocol can be omitted when using https; the path can be omitted when the server supports.

So finally your parameter will be like this:

-javaagent:authlib-injector.jar=skin.prinzeugen.net