Skip to content

Update to v26.7.11 - #2

Merged
ImMohammad20000 merged 3 commits into
PasarGuard:mainfrom
FunLay123:main
Jul 19, 2026
Merged

Update to v26.7.11#2
ImMohammad20000 merged 3 commits into
PasarGuard:mainfrom
FunLay123:main

Conversation

@FunLay123

@FunLay123 FunLay123 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Xray-core 26.7.11 introduces streamSettings.method as the new transport-type
field, keeping streamSettings.network around for backward compatibility. This
PR updates the kit to understand the new field and refreshes parity data
accordingly.

  • read transport type from streamSettings.method when importing raw JSON and
    generating share-link URIs, falling back to streamSettings.network, matching
    Xray-core's own priority (method wins when both are present)
  • avoid re-emitting a stale network key on round-trip when the source already
    declares transport via method
  • pin parity generation to include v26.6.27, advance the latest generated
    release data to v26.7.11, and pick up the upstream transport_method.go /
    transport_finalmask.go file split plus the new xmc finalmask protocol
  • add regression coverage for the method/network handling across import,
    compile round-trip, and URI export

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@FunLay123, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef665f81-82ba-4060-af14-7c595fe809d0

📥 Commits

Reviewing files that changed from the base of the PR and between 1f15300 and 5964d2b.

📒 Files selected for processing (1)
  • src/exporters/uris.ts

Walkthrough

Adds Xray release metadata for v26.6.27 and v26.7.11, updates generated capabilities and parity manifests, prioritizes streamSettings.method over network, and adds transport, parity, CI, and version validation updates.

Changes

Xray release and transport updates

Layer / File(s) Summary
Xray release parity metadata
xray-parity.config.ts, src/xray-json/parity-manifest.ts, src/adapters/xray/generated-capabilities.ts, tests/parity/*, tests/helpers/xray-releases.ts, tests/core.test.ts
Release selections, generated capabilities, parity schemas, loader paths, and related test expectations now include v26.6.27 and v26.7.11.
Transport method precedence
src/importers/index.ts, src/core/compiler.ts, src/exporters/uris.ts, tests/transports/method-network-fallback.test.ts
Transport handling reads streamSettings.method before network, preserves method-defined source fields, and serializes the selected method for VMess and VLESS URIs.
Release CI and package wiring
.github/xray-ci-matrix.json, package.json
The CI matrix includes v26.6.27 and the package version advances to 0.3.6.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant XrayConfig
  participant parseTransport
  participant mergeJsonPreservingSource
  participant URIExporter
  XrayConfig->>parseTransport: provide streamSettings.method and network
  parseTransport->>mergeJsonPreservingSource: preserve method-aware transport fields
  mergeJsonPreservingSource->>URIExporter: provide resolved transport settings
  URIExporter->>URIExporter: serialize method as URI transport type
Loading

Suggested reviewers: x0sina

Poem

A rabbit hops through releases bright,
New Xray tags appear in sight.
Method leads the network trail,
URIs bloom with transport detail.
Tests thump softly: all is right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check ✅ Passed The title is concise and accurately reflects the main change: updating the project to Xray v26.7.11.
✨ 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.

Actionable comments posted: 1

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

71-76: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Skip default "tcp" value for the new method field as well.

If compileProfile is updated to generate method: "tcp" by default (either now or in the future), it will bypass this skip check because only key === "network" is evaluated. This would result in "method": "tcp" unexpectedly leaking into the merged JSON even when the original source was completely empty of transport configurations.

Consider applying the value === "tcp" default-skip logic to both network and method fields to defensively maintain clean source outputs.

🛠️ Proposed refactor
-  if (parentKey === "streamSettings" && key === "network") {
-    // Method (new field) takes priority over network; don't reintroduce the
-    // legacy key when the source already declares the transport via method.
-    if (typeof source.method === "string" && source.method !== "") return true;
-    return value === "tcp";
-  }
+  if (parentKey === "streamSettings" && (key === "network" || key === "method")) {
+    // Method (new field) takes priority over network; don't reintroduce the
+    // legacy key when the source already declares the transport via method.
+    if (key === "network" && typeof source.method === "string" && source.method !== "") return true;
+    return value === "tcp";
+  }
🤖 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 71 - 76, Update the transport default-skip
logic in the parentKey === "streamSettings" branch to cover both network and
method fields: when either field has the default value "tcp", skip it unless the
source explicitly declares a non-empty method. Preserve the existing behavior
for non-default values and avoid leaking generated method: "tcp" into merged
output.
🤖 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.

Inline comments:
In `@src/exporters/uris.ts`:
- Line 390: Normalize the resolved transport network to lowercase in both
appendTransportParamsFromStream (src/exporters/uris.ts:390-390) and
appendTransportToVmessPayload (src/exporters/uris.ts:430-430) before
streamSettingsForNetwork performs its lookup. Preserve the existing fallback
order and default value while ensuring uppercase methods such as “GRPC” resolve
to the lowercase settings key.

---

Nitpick comments:
In `@src/core/compiler.ts`:
- Around line 71-76: Update the transport default-skip logic in the parentKey
=== "streamSettings" branch to cover both network and method fields: when either
field has the default value "tcp", skip it unless the source explicitly declares
a non-empty method. Preserve the existing behavior for non-default values and
avoid leaking generated method: "tcp" into merged output.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a37c6287-5b20-497c-91bf-c855d89fe9bc

📥 Commits

Reviewing files that changed from the base of the PR and between eebe0b7 and 1f15300.

📒 Files selected for processing (14)
  • .github/xray-ci-matrix.json
  • package.json
  • src/adapters/xray/generated-capabilities.ts
  • src/core/compiler.ts
  • src/exporters/uris.ts
  • src/importers/index.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/transports/method-network-fallback.test.ts
  • xray-parity.config.ts

Comment thread src/exporters/uris.ts Outdated
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.

2 participants