1.19 auth support (server side)
This commit is contained in:
@ -13,6 +13,7 @@ import (
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"github.com/Tnze/go-mc/data/packetid"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
@ -217,7 +218,7 @@ func genEncryptionKeyResponse(shareSecret, publicKey, verifyToken []byte, keyPai
|
||||
return erp, err
|
||||
}
|
||||
return pk.Marshal(
|
||||
0x01,
|
||||
packetid.LoginEncryptionResponse,
|
||||
pk.ByteArray(cryptPK),
|
||||
pk.Boolean(false),
|
||||
l,
|
||||
@ -230,7 +231,7 @@ func genEncryptionKeyResponse(shareSecret, publicKey, verifyToken []byte, keyPai
|
||||
return erp, err
|
||||
}
|
||||
return pk.Marshal(
|
||||
0x01,
|
||||
packetid.LoginEncryptionResponse,
|
||||
pk.ByteArray(cryptPK),
|
||||
pk.Boolean(true),
|
||||
pk.ByteArray(verifyT),
|
||||
|
@ -121,7 +121,7 @@ func (c *Client) join(ctx context.Context, d *mcnet.Dialer, addr string) error {
|
||||
}
|
||||
return nil
|
||||
|
||||
case packetid.SetCompression: //Set Compression
|
||||
case packetid.LoginCompression: //Set Compression
|
||||
var threshold pk.VarInt
|
||||
if err := p.Scan(&threshold); err != nil {
|
||||
return LoginErr{"compression", err}
|
||||
|
Reference in New Issue
Block a user