Report desktop Core errors through an optional file - #154
Merged
Merged
Conversation
Preserve command failures for GUI callers while retaining stderr output. Isolate CLI reporting for host-only regression tests and document the new option.
wejg
pushed a commit
to wejg/libXray
that referenced
this pull request
Sep 24, 2026
… of https://github.com/XTLS/libXray * 'main' of https://github.com/wejg/libXray: * 'main' of https://github.com/XTLS/libXray: feat: allow excluding reserved ports from allocation (XTLS#157) Restore Matt Pocock skills configuration and documentation (XTLS#156) Complete share-link fields and remove legacy VMess QR support (XTLS#155) feat: add an optional desktop Core error output file (XTLS#154) Validate Xray configurations through instance construction (XTLS#153) Update Xray-core to v26.9.9 (XTLS#152) refactor: remove runtime accounting and simplify share responses (XTLS#151) Add managed runtime accounting and probe APIs (XTLS#150) Restore protected desktop DNS resolver (XTLS#148) Return validated outbound-only JSON from share conversion (XTLS#147) Add Tools .go (XTLS#146) Document single Go runtime limitation (XTLS#144) Add age-encrypted subscriptions and JSON-based Xray APIs (XTLS#143) Fix Windows ARM64 build toolchain (XTLS#142) Add concurrent batch ping and improve runtime safety (XTLS#141) Validate imported outbounds with Xray-core (XTLS#140) Add Android VPN-aware DNS resolver (XTLS#139) Update native platform builds (XTLS#138) # Conflicts: # README.md # go.mod # go.sum # invoke.go # invoke_model.go # invoke_test.go # memory/memory_ios.go # readme/README.zh_CN.md # xray/ping.go # xray/xray.go
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
-error-fileargument to the desktop Core CLI so GUI callers can read the actual configuration or startup failure after the process exits, while preserving stderr output and exit codes.Compatibility
Existing commands without
-error-fileremain unchanged. Callers using the option must bundle a desktop Core that supports it. The Invoke API remains at version 3; no additional preflight validation or runtime accounting is introduced.Validation
go test ./... -count=1on macOS.go test desktop_bin/command.go desktop_bin/command_test.go -count=1for host-only CLI tests.git diff --check.