mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-16 12:03:03 +00:00
Allow empty "shortId" (client side)
This commit is contained in:
parent
82003f28b2
commit
e1cd1fd33e
@ -637,9 +637,6 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
|
||||
if config.PublicKey, err = base64.RawURLEncoding.DecodeString(c.PublicKey); err != nil || len(config.PublicKey) != 32 {
|
||||
return nil, newError(`invalid "publicKey": `, c.PublicKey)
|
||||
}
|
||||
if c.ShortId == "" {
|
||||
return nil, newError(`empty "shortId"`)
|
||||
}
|
||||
config.ShortId = make([]byte, 8)
|
||||
if _, err = hex.Decode(config.ShortId, []byte(c.ShortId)); err != nil {
|
||||
return nil, newError(`invalid "shortId": `, c.ShortId)
|
||||
|
Loading…
Reference in New Issue
Block a user