Allow empty "spiderX" (client side)

This commit is contained in:
RPRX 2023-02-17 21:07:27 +08:00 committed by GitHub
parent e1cd1fd33e
commit c7358a32f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -642,7 +642,7 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
return nil, newError(`invalid "shortId": `, c.ShortId) return nil, newError(`invalid "shortId": `, c.ShortId)
} }
if c.SpiderX == "" { if c.SpiderX == "" {
return nil, newError(`empty "spiderX"`) c.SpiderX = "/"
} }
if c.SpiderX[0] != '/' { if c.SpiderX[0] != '/' {
return nil, newError(`invalid "spiderX": `, c.SpiderX) return nil, newError(`invalid "spiderX": `, c.SpiderX)