-
Notifications
You must be signed in to change notification settings - Fork 0
Latency Testing
v2rayroot edited this page Jun 14, 2026
·
1 revision
char *TestLatency(char *configsJSON, char *testURL, int timeout);configsJSON accepts a JSON array of configuration strings or one raw
configuration/share URI.
[
"vless://...",
"trojan://..."
]When testURL is empty, the default is:
https://www.gstatic.com/generate_204
timeout is measured in seconds.
Results preserve input order:
["143","287","[ERROR]failed to load config: ..."]Numeric strings are milliseconds. Treat ERROR, -1, and values beginning
with [ERROR] as failures.
Each configuration runs through a temporary local HTTP/SOCKS proxy. Tests run concurrently and may consume substantial sockets, memory, and CPU.
Limit user-facing batch sizes and execute this call away from the UI thread.