Skip to content

Restore invoke env and desktop wrapper#133

Merged
yiguodev merged 7 commits into
mainfrom
dev-26.7-3
Jul 7, 2026
Merged

Restore invoke env and desktop wrapper#133
yiguodev merged 7 commits into
mainfrom
dev-26.7-3

Conversation

@yiguodev

@yiguodev yiguodev commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Restore Invoke.env for the Xray-core process env keys used by libXray callers: asset location, cert location, and TUN fd.
  • Restore the Windows/Linux desktop wrapper and include it in build artifacts.
  • Keep the wrapper input as a standard LibXrayInvokeRequest file with method=runXray.
  • Preserve ping delay sentinel data on ping failure responses.

Validation

  • go test ./... -count=1
  • python3 build/main.py apple go local
  • python3 build/main.py android local
  • python3 build/main.py linux local
  • git diff --check

@yiguodev yiguodev marked this pull request as ready for review July 7, 2026 12:38
Copilot AI review requested due to automatic review settings July 7, 2026 12:38

Copilot AI 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.

Pull request overview

This PR restores a reduced Invoke.env surface for the Xray-core runtime environment keys that libXray callers rely on, reintroduces a Linux/Windows “desktop wrapper” executable into build outputs/artifacts, and updates the invoke APIs around geo counting and ping error responses to better preserve intended data.

Changes:

  • Narrow Invoke.env support to the runtime keys xray.location.asset, xray.location.cert, and xray.tun.fd, and update documentation/tests accordingly.
  • Add a desktop_bin wrapper (bin/xray / bin/xray.exe) and include it in Linux/Windows build outputs and GitHub Actions artifacts.
  • Make countGeoData take datDir via payload and preserve ping delay sentinel values on ping failures.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
readme/README.zh_CN.md Updates Chinese docs for restored Invoke.env scope and desktop wrapper usage.
README.md Updates English docs for restored Invoke.env scope and desktop wrapper usage.
invoke.go Limits applied env keys, switches countGeoData to payload datDir, and preserves ping sentinel delay on error.
invoke_test.go Updates tests for new env model, adds coverage for ping sentinel preservation and datDir payload behavior.
invoke_model.go Shrinks LibXrayEnvJson to runtime keys and adds datDir to CountGeoDataRequest.
download_geo/main.go Updates countGeoData invocation to pass datDir in payload (no env dependency).
desktop_bin/run.go Implements wrapper logic to run runXray via LibXrayInvokeRequest.
desktop_bin/main.go Adds CLI entrypoint for wrapper with signal handling and stop-on-exit behavior.
build/app/windows.py Builds and outputs the Windows wrapper executable alongside the DLL.
build/app/linux.py Builds and outputs the Linux wrapper executable alongside the SO.
build/app/build.py Adds build_desktop_bin() helper to compile the wrapper into bin/.
.github/workflows/build.yml Packages bin/xray / bin/xray.exe into Linux/Windows artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread readme/README.zh_CN.md Outdated
Copilot AI review requested due to automatic review settings July 7, 2026 13:24

Copilot AI 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.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comment thread desktop_bin/main.go Outdated
Comment thread desktop_bin/run.go Outdated
@yiguodev yiguodev merged commit 30f375a into main Jul 7, 2026
2 checks passed
@yiguodev yiguodev deleted the dev-26.7-3 branch July 7, 2026 13:32
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