Skip to content

Version ​

The optional version block gates the config on a version range. This is useful when a config file is shared across machines and you want to fail fast if any of them runs an incompatible Xray build.

Options ​

FieldTypeDefaultAllowed valuesDescription
minstring(unset)<semver>Minimum Xray version required to load this config. A running binary older than min refuses to start.
maxstring(unset)<semver>Maximum Xray version allowed. A running binary newer than max refuses to start.

Source: infra/conf/version.go:10-13 · pinned at v26.9.9 (52a412d)

Example ​

json
{
  "version": {
    "min": "1.8.0",
    "max": "1.999.0"
  }
}

Notes ​

  • Comparison is plain semver against the running binary's version string.
  • Leave either field unset to skip that side of the check.

Source: infra/conf/version.go:10-13 · v26.9.9 (52a412d)

Core Tutorial by Argsment