XTLS/Xray-core · error
invalid "minClientVer":
Error message
invalid "minClientVer":
What it means
Thrown by the REALITY builder while parsing minClientVer when the dotted version string has a 4th component (index 3 exists). Client versions are limited to exactly three numeric components (major.minor.patch) because they are stored in a fixed 3-byte array.
Source
Thrown at infra/conf/transport_security.go:108
}
if c.Xver > 2 {
return nil, errors.New(`invalid PROXY protocol version, "xver" only accepts 0, 1, 2`)
}
if len(c.ServerNames) == 0 {
return nil, errors.New(`empty "serverNames"`)
}
if c.PrivateKey == "" {
return nil, errors.New(`empty "privateKey"`)
}
if config.PrivateKey, err = base64.RawURLEncoding.DecodeString(c.PrivateKey); err != nil || len(config.PrivateKey) != 32 {
return nil, errors.New(`invalid "privateKey": `, c.PrivateKey)
}
if c.MinClientVer != "" {
config.MinClientVer = make([]byte, 3)
var u uint64
for i, s := range strings.Split(c.MinClientVer, ".") {
if i == 3 {
return nil, errors.New(`invalid "minClientVer": `, c.MinClientVer)
}
if u, err = strconv.ParseUint(s, 10, 8); err != nil {
return nil, errors.New(`"minClientVer[`, i, `]" should be less than 256`)
} else {
config.MinClientVer[i] = byte(u)
}
}
errors.LogWarning(context.Background(), `REALITY: Changing "minClientVer" will increase the likelihood of your server's IP being blocked by the GFW`)
} else {
config.MinClientVer = []byte{26, 3, 27} // change it at your own risk: https://github.com/XTLS/Xray-core/commit/af7eb68028732a8ee3c0e5d6ab2b8a657bb2e770
errors.LogWarning(context.Background(), `REALITY: The default minimal client version is Xray-core v26.3.27, other clients may be refused to connect`)
}
if c.MaxClientVer != "" {
config.MaxClientVer = make([]byte, 3)
var u uint64
for i, s := range strings.Split(c.MaxClientVer, ".") {
if i == 3 {
return nil, errors.New(`invalid "maxClientVer": `, c.MaxClientVer)View on GitHub (pinned to 7d214f8b09)
Solutions
- Use a three-part version, e.g. "1.8.6".
- Prefer omitting minClientVer entirely (defaults to 26.3.27 with a warning) unless you have a specific reason.
Example fix
// before "minClientVer": "1.8.6.2" // after "minClientVer": "1.8.6"
Defensive patterns
Strategy: validation
Validate before calling
func validVerTriple(s string) bool {
parts := strings.Split(s, ".")
if len(parts) > 3 { return false }
for _, p := range parts {
if n, err := strconv.ParseUint(p, 10, 8); err != nil || n > 255 { return false }
}
return true
} Prevention
- Accept only 3-part dotted versions in config UIs.
- Omit minClientVer unless you understand the GFW-blocking warning it carries.
When it happens
Trigger: Setting "minClientVer": "1.8.6.2" or any four-part version string.
Common situations: Copying a four-part version from an About dialog or a release tag suffix.
Related errors
- "minClientVer[", i, "]" should be less than 256
- invalid "maxClientVer":
- "maxClientVer[", i, "]" should be less than 256
- REALITY: Empty "realitySettings".
- please fill in a valid value for "target"
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/fd68e9da4bdc0d74.
Report an issue: GitHub.