3x-ui/xray
MHSanaei 106adca414
test: cover crypto, random, netsafe, sub helpers, xray equals, websocket hub, node service
Adds ~110 unit tests across previously untested packages. Focus on
pure-logic and concurrency surfaces where regressions would silently
affect users:

- util/crypto, util/random: password hashing round-trip, ss2022 key
  generation, alphabet/length invariants.
- util/netsafe: IsBlockedIP edge cases, NormalizeHost validation,
  SSRF guard with AllowPrivate context bypass.
- util/common, util/json_util: traffic formatter, Combine nil-skip,
  RawMessage empty-as-null and copy-on-unmarshal.
- sub: splitLinkLines, searchKey/searchHost, kcp share fields,
  finalmask normalization, buildVmessLink round-trip.
- xray: Config.Equals and InboundConfig.Equals field-by-field,
  getRequiredUserString/getOptionalUserString type checks.
- web/websocket: hub registration, throttling, slow-client eviction,
  nil-receiver safety, concurrent register/unregister.
- web/service: NodeService.normalize validation, normalizeBasePath,
  HeartbeatPatch.ToUI mapping.
- web/job: atomicBool concurrent set/takeAndReset semantics.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 10:00:09 +02:00
..
api.go fix(shadowsocks): generate valid ss2022 keys and per-client method for legacy ciphers 2026-05-18 00:19:09 +02:00
api_test.go test: cover crypto, random, netsafe, sub helpers, xray equals, websocket hub, node service 2026-05-18 10:00:09 +02:00
client_traffic.go refactor(traffic): drop all-time traffic tracking 2026-05-17 09:01:04 +02:00
config.go Remove streamSettings for protocols that don't support it 2026-05-14 23:18:23 +02:00
config_test.go test: cover crypto, random, netsafe, sub helpers, xray equals, websocket hub, node service 2026-05-18 10:00:09 +02:00
inbound.go Remove streamSettings for protocols that don't support it 2026-05-14 23:18:23 +02:00
inbound_test.go test: cover crypto, random, netsafe, sub helpers, xray equals, websocket hub, node service 2026-05-18 10:00:09 +02:00
log_writer.go v3 2026-05-10 02:13:42 +02:00
process.go fix(xray): implement graceful shutdown for xray process and add tests (#4259) 2026-05-11 14:11:40 +02:00
process_test.go fix(xray): implement graceful shutdown for xray process and add tests (#4259) 2026-05-11 14:11:40 +02:00
traffic.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00