Skip to content

test: Xray-core interop suite (REALITY PQ, XHTTP, ECH) and CI job - #25

Merged
Nemu-x merged 1 commit into
devfrom
ci/xray-interop
Oct 12, 2026
Merged

Nemu-x merged 1 commit into
devfrom
ci/xray-interop

Conversation

@Nemu-x

@Nemu-x Nemu-x commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Automated interop tests against a real Xray-core binary, replacing the manual live checks done for #8, #9, #10, #19 and #20.

test/interop/ (own module, stdlib only, build tag interop)

cd test/interop && XRAY_BIN=/path/to/xray go test -tags interop -v ./... (skips without XRAY_BIN; builds Citrus unless CITRUS_BIN is set; INTEROP_LOG_DIR keeps logs and configs). Works on Linux and Windows.

  • Keys come from the binary itself: xray x25519, mldsa65, uuid, tls ech.
  • Everything is local:
    • the destination is an HTTP echo server; each case does a GET with a random token, then a 256 KiB POST whose SHA-256 must come back;
    • the REALITY target is a TLS 1.3 server with a chain over 4 KB, so the ML-DSA signature fits.
  • Xray 26.10.10's freedom outbound blocks private destinations by default; the tests allow them with finalRules: [{action: allow}].
# Case Variants
1 Citrus client → Xray server, vless+vision+REALITY with mldsa65Seed chrome, firefox, safari, ios; wrong mldsa65-verify must fail
2 Xray client → Citrus server, mldsa65-seed + require-x25519mlkem768 chrome, firefox; wrong mldsa65Verify must fail
3 Citrus client → Xray xhttp (REALITY h2) packet-up, stream-one, stream-up, path with ?query, x-padding-bytes "0-0"
3 Xray client → Citrus xhttp packet-up, GET uplink, header placement
4 ECH both directions (Xray echServerKeys / Citrus ech-key) right and wrong config (wrong must fail, proving ECH was really used)

Local run on Windows: 18/18 as expected (13 pass, 5 expected rejections), ~21 s.

.github/workflows/interop.yml

  • Runs: one ubuntu job on PRs touching transport/tls/ech/listener/outbound/go.mod/the tests, on pushes to dev, weekly, and by hand.
  • Xray binary: pinned v26.10.10. Its SHA-256 must match both the release .dgst and a hash written into the workflow (to catch a swapped release, not just a corrupted download).
  • Go setup: same setup-go, mirror and retry as Test.
  • On failure: logs are uploaded.
  • Expected time is 3–4 minutes.

Go tests under test/interop (build tag interop, own stdlib-only module) run
Citrus against a real xray binary on localhost: REALITY with ML-DSA-65 and
the X25519MLKEM768 rule both ways, XHTTP modes, ECH with xray tls ech keys,
plus wrong-key rejections. Keys come from xray x25519/mldsa65/uuid/tls ech;
the REALITY target is a local TLS 1.3 server with a 4+ KB chain, the
destination a local echo server.

The workflow downloads Xray-linux-64.zip v26.10.10, checks its SHA-256
against the pinned value and the release .dgst, and runs one ubuntu job.
@Nemu-x
Nemu-x merged commit 1551ef4 into dev Oct 12, 2026
10 checks passed
@Nemu-x
Nemu-x deleted the ci/xray-interop branch October 14, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant