go-mc
go-mc copied to clipboard
add KeyManager in server for better client join performance
As mentioned in #209 ,
I add KeyManager
for caching RSA keypair,
not yet add the option for prevent-proxy-connections: true
right now.
As mentioned in #210 ,
(By simply store the server's key in the LoginHandler. There is no need to use interface if we have only one implementation.
Add a interface is for user who need more control without re-implement full MojangLoginHandler
, eg:
- can automatically generate keypair for N hours (1024 bit RSA is weak)
- use specific key for specific client if they need
Otherwise we may need to add GenerateKey()
, SetKey()
, GetKey()
on the MojangLoginHandler
and lost the ability for use specific key for specific client.
BTW. I test vanilla 1.19 client, it can handle up to 8192 bit key without issue. (join will be slower) (more bits are not test)