Repository navigation
feat: decode full subscription text and remove exit location probes - #165
Merged
Merged
Conversation
AnatomikPerq
added a commit
to AnatomikPerq/libXray
that referenced
this pull request
Oct 18, 2026
Takes upstream through 75ccb62: Xray-core v26.9.30, v26.10.10 and v26.10.17 with refreshed dependencies (Go 1.27.2), the hysteria2 share fix for the new conf.UDPHop, decodeSubscriptionText, build and CI updates. Keeps the fork's pingBatch locationUrl probe that upstream XTLS#165 removed: the App shows each node's flag from the measured location, and without it the first ping round would erase every stored country code. The upstream test for forced outbounds is kept next to the location test. go.mod: upstream versions, plus the fork's direct x/net and grpc and the minewire-cli replace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow callers to obtain complete subscription text before deciding whether to import nodes or preserve a provider's full Xray configuration. Remove exit-location probing from batch latency tests.
The decoder reuses the existing Age implementation, preserves plaintext exactly, and returns
texteven when empty. It performs no JSON parsing, Base64 decoding, outbound projection or Core creation. Plaintext is limited to 16 MiB of UTF-8 bytes; the existing request/response envelope limits still apply separately. English and Chinese API documentation describe the contracts.Batch results retain input order, zero-millisecond delays and per-item errors. The managed-instance guard and temporary Core cleanup remain unchanged;
apiVersionremains 3.Evidence
After:
TestInvokeDecodeSubscriptionTextPreservesWholeDocumentand the share decoder tests preserve complete objects/arrays, DNS, routing, balancers and unknown fields, including X25519 and hybrid Age round trips. Error, plaintext-size and response-envelope cases pass.TestInvokePingBatchUsesEachForcedOutboundAndOnlyLatencyHeadsverifies freedom succeeds and blackhole fails in input order, with exactly one HEAD and no other request; the zero-delay wire test passes.go test ./... -count=1, gofmt andgit diff --checkpassed at029b68f. Android artifacts built for four ABIs and Apple artifacts for five slices using the unchanged Xray Core v26.10.10 dependency; copied artifacts matched source hashes. Android arm64 consumer validation exercised native Age decoding and latency-only batch tests.Merge Danger
Door: Two-way
Code can be reverted, but downstream request/result models and native artifacts must stay synchronized.
Blast Radius: Integrations
PingBatchWithLocation,locationUrl,locationJsonandlocationErrorare removed. Go callers using the removed function/fields must update; JSON clients must stop requesting or expecting location data. Consumers calling the new method require rebuilt native artifacts. Format classification and complete-configuration validation belong to the caller.