Skip to content

Commit 218c0ca

Browse files
author
yiguo
committed
Document Invoke size limit
1 parent 0a5e781 commit 218c0ca

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ Design notes:
154154
`runXray`.
155155
3. `countGeoData` is not backed by an Xray config, so its `datDir` is passed in
156156
the method payload.
157+
4. The complete UTF-8 encoded Invoke request and response JSON envelopes are
158+
limited to 16 MiB. If either limit is exceeded, Invoke returns a failure
159+
response with `success: false`, `data: null`, and a size-limit error.
157160

158161
Supported methods:
159162

readme/README.zh_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ char* CGoInvoke(char* requestJSON);
118118
1. `Invoke` 不接受 `env` 字段。Xray-core 运行时环境项应写入 Xray 配置根 `env` 对象。
119119
2. `SetTunFd` 已删除。如果 fd 只能在运行时获得,请在调用 `runXray` 前把 `xray.tun.fd` 写入 Xray 配置根 `env` 对象。
120120
3. `countGeoData` 不依赖 Xray 配置,因此通过 method payload 的 `datDir` 传入数据目录。
121+
4. 完整的 UTF-8 编码 Invoke 请求和响应 JSON 包体限制为 16 MiB。任一方向超过限制时,Invoke 将返回 `success: false``data: null` 和对应的大小限制错误。
121122

122123
支持的 method:
123124

0 commit comments

Comments
 (0)