Skip to content

Update to 26.6.27 and add some features#1

Open
FunLay123 wants to merge 2 commits into
PasarGuard:mainfrom
FunLay123:main
Open

Update to 26.6.27 and add some features#1
FunLay123 wants to merge 2 commits into
PasarGuard:mainfrom
FunLay123:main

Conversation

@FunLay123

@FunLay123 FunLay123 commented Jul 3, 2026

Copy link
Copy Markdown

This PR adds the XHTTP sessionID* fields needed for Xray 26.6.22+ and refreshes the package's version-aware parity data accordingly.

  • add sessionIDPlacement, sessionIDKey, sessionIDTable, and sessionIDLength to XHTTP transport types, schemas, importers, and compiler output
  • pin parity generation to include v26.6.22, refresh generated capabilities/manifest data, and advance the latest generated release data to v26.6.27
  • make inbound security field lists follow real per-release parity data so removed fields such as echForceQuery disappear automatically on releases where they no longer exist
  • add regression coverage for the new XHTTP sessionID* fields and for per-release TLS security-field capabilities
  • bump the package version to 0.3.5

Notes

After this PR is merged, PasarGuard/core-kit should be updated to the newly published @pasarguard/xray-config-kit version.

Summary by CodeRabbit

  • New Features
    • Added support for new xhttp/splithttp session ID settings: placement, key, table, and length.
    • Expanded supported/parity Xray releases to include v26.6.22 and v26.6.27.
  • Bug Fixes
    • Improved inbound security field handling so only supported form fields are surfaced.
    • Updated release capability/compatibility data to reflect the latest XRAY behavior.
  • Chores / Tests
    • Bumped package version to 0.3.5.
    • Updated CI test matrix and test expectations for the new release set.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e22904c7-a5fa-426d-a9a7-c38155c6b0db

📥 Commits

Reviewing files that changed from the base of the PR and between d6bb6d0 and cdfa109.

📒 Files selected for processing (19)
  • .github/xray-ci-matrix.json
  • package.json
  • src/adapters/xray/generated-capabilities.ts
  • src/core/compiler.ts
  • src/core/form.ts
  • src/core/types.ts
  • src/importers/index.ts
  • src/schemas/profile.ts
  • src/xray-json/parity-manifest.ts
  • tests/core.test.ts
  • tests/helpers/xray-releases.ts
  • tests/parity/generator-config.test.ts
  • tests/parity/json-loader-manifest.test.ts
  • tests/parity/manifest.test.ts
  • tests/security/security-field-capabilities.test.ts
  • tests/security/stream-security-settings.test.ts
  • tests/transports/stream-settings.test.ts
  • tests/transports/xhttp-session-id.test.ts
  • xray-parity.config.ts
💤 Files with no reviewable changes (1)
  • tests/security/stream-security-settings.test.ts
✅ Files skipped from review due to trivial changes (4)
  • .github/xray-ci-matrix.json
  • tests/core.test.ts
  • package.json
  • src/adapters/xray/generated-capabilities.ts
🚧 Files skipped from review as they are similar to previous changes (13)
  • tests/parity/manifest.test.ts
  • tests/parity/generator-config.test.ts
  • xray-parity.config.ts
  • tests/security/security-field-capabilities.test.ts
  • tests/transports/stream-settings.test.ts
  • src/schemas/profile.ts
  • tests/parity/json-loader-manifest.test.ts
  • tests/transports/xhttp-session-id.test.ts
  • src/core/compiler.ts
  • src/core/types.ts
  • src/core/form.ts
  • tests/helpers/xray-releases.ts
  • src/importers/index.ts

Walkthrough

This PR adds Xray v26.6.22/v26.6.27 release metadata and parity wiring, introduces xhttp/splithttp sessionID* fields across schema, types, compiler, importer, and tests, updates inbound security-field capability filtering, and bumps the package version.

Changes

Xray v26.6.x Release Support

Layer / File(s) Summary
Generated capability metadata and version constants
src/adapters/xray/generated-capabilities.ts
Extends the generated release tags, updates the latest generated release/version, and adds capability entries for v26.6.22 and v26.6.27.
Parity config and CI matrix wiring
xray-parity.config.ts, .github/xray-ci-matrix.json
Adds v26.6.22 to the parity release list and CI matrix include list.
Release/version tests and helpers
tests/helpers/xray-releases.ts, tests/parity/*, tests/core.test.ts
Updates release selections, manifest expectations, protocol lists, and adapterId assertions for the expanded release set.
Package version bump
package.json
Updates the package version to 0.3.5.

XHTTP sessionID Fields

Layer / File(s) Summary
Schema and type definitions for sessionID fields
src/core/types.ts, src/schemas/profile.ts
Adds optional sessionIDPlacement, sessionIDKey, sessionIDTable, and sessionIDLength fields to XHttpExtra and xhttpExtraSchema.
Compiler and importer support for sessionID fields
src/core/compiler.ts, src/importers/index.ts
Preserves the new sessionID* fields in allowed field lists, emits them into compiled xhttpSettings, and reads them back from imported configs.
SessionID field tests
tests/transports/xhttp-session-id.test.ts, tests/transports/stream-settings.test.ts
Adds schema/build/import coverage for sessionID* fields and updates the xhttp stream settings fixture to the new field names.

Inbound Security Field Capability Tracking

Layer / File(s) Summary
Security field filtering logic and tests
src/core/form.ts, tests/security/*
Changes inboundSecurityFields to omit missing capability rows and updates security-field tests for version-based field presence.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Importer as importXrayConfig
  participant Schema as xhttpTransportSchema
  participant Profile as Profile.extra
  participant Compiler as buildXrayConfig
  participant Output as streamSettings.xhttpSettings

  Importer->>Schema: validate raw xhttpSettings
  Schema-->>Importer: sessionIDPlacement, sessionIDKey, sessionIDTable, sessionIDLength
  Importer->>Profile: backfill sessionID* into transport.extra
  Compiler->>Profile: read transport.extra.sessionID*
  Compiler->>Output: emit sessionID* fields in JSON
Loading

Poem

A rabbit hops through code so bright,
New sessionIDs take their flight,
v26.6 joins the release parade,
Security fields, freshly remade,
Thump-thump! Ship it, day or night! 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions the version bump, but "add some features" is too vague to describe the main changes clearly. Rename it to something specific like "Bump Xray parity to 26.6.27 and add XHTTP sessionID support".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/core/compiler.ts (1)

177-178: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate field-set literals for xhttpSettings/splithttpSettings.

Both Sets are near-identical (differ only by nothing here—both lists are byte-for-byte the same), and every new XHTTP field addition (including this PR's 4 sessionID* fields) must be duplicated in two places, risking drift between the two entries over time.

♻️ Suggested refactor to share the field list
+const xhttpSharedFields = new Set(["host", "path", "mode", "headers", "scMaxBufferedPosts", "scMaxEachPostBytes", "scMinPostsIntervalMs", "scStreamUpServerSecs", "noSSEHeader", "xPaddingBytes", "xPaddingObfsMode", "xPaddingKey", "xPaddingHeader", "xPaddingPlacement", "xPaddingMethod", "uplinkHTTPMethod", "sessionPlacement", "sessionKey", "sessionIDPlacement", "sessionIDKey", "sessionIDTable", "sessionIDLength", "seqPlacement", "seqKey", "uplinkDataPlacement", "uplinkDataKey", "uplinkChunkSize", "noGRPCHeader", "xmux"]);
-  ["xhttpSettings", new Set([...])],
-  ["splithttpSettings", new Set([...])],
+  ["xhttpSettings", xhttpSharedFields],
+  ["splithttpSettings", xhttpSharedFields],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/compiler.ts` around lines 177 - 178, The xhttpSettings and
splithttpSettings entries in compiler.ts are duplicated with the same field
list, which creates drift risk for future additions like the sessionID* fields.
Refactor the shared field names into a single reusable constant or helper near
the existing settings map, then have both xhttpSettings and splithttpSettings
reference that shared list instead of repeating the Set literal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/core/compiler.ts`:
- Around line 177-178: The xhttpSettings and splithttpSettings entries in
compiler.ts are duplicated with the same field list, which creates drift risk
for future additions like the sessionID* fields. Refactor the shared field names
into a single reusable constant or helper near the existing settings map, then
have both xhttpSettings and splithttpSettings reference that shared list instead
of repeating the Set literal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 54f3b06e-640e-44f1-a323-f7396d26af89

📥 Commits

Reviewing files that changed from the base of the PR and between 82f4ce4 and d6bb6d0.

📒 Files selected for processing (19)
  • .github/xray-ci-matrix.json
  • package.json
  • src/adapters/xray/generated-capabilities.ts
  • src/core/compiler.ts
  • src/core/form.ts
  • src/core/types.ts
  • src/importers/index.ts
  • src/schemas/profile.ts
  • src/xray-json/parity-manifest.ts
  • tests/core.test.ts
  • tests/helpers/xray-releases.ts
  • tests/parity/generator-config.test.ts
  • tests/parity/json-loader-manifest.test.ts
  • tests/parity/manifest.test.ts
  • tests/security/security-field-capabilities.test.ts
  • tests/security/stream-security-settings.test.ts
  • tests/transports/stream-settings.test.ts
  • tests/transports/xhttp-session-id.test.ts
  • xray-parity.config.ts
💤 Files with no reviewable changes (1)
  • tests/security/stream-security-settings.test.ts

FunLay123 added 2 commits July 4, 2026 01:24
- add XHTTP sessionID support and related schema/import updates
- pin v26.6.22 as an explicit xray-core parity release
- stop generating version-gated security fields that are unavailable on a release
- share duplicate field-set literals for tcp/raw and xhttp/splithttp (CodeRabbit feedback on PR PasarGuard#1)
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