[PR #3] [MERGED] chore: use canonical Xray module path #3

Closed
opened 2026-10-13 21:10:40 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-libxray/pull/3
Author: @FrogRocky
Created: 7/10/2026
Status: ✅ Merged
Merged: 7/14/2026
Merged by: @FrogRocky

Base: main ← Head: frog/replace-xray-module


📝 Commits (1)

  • 0c352e2 chore: update xray module path

📊 Changes

10 files changed (+118 additions, -92 deletions)

View changed files

📝 build.sh (+8 -8)
📝 controller_android.go (+1 -1)
📝 go.mod (+26 -16)
📝 go.sum (+62 -46)
📝 xray/geo.go (+6 -6)
📝 xray/geo_cut.go (+9 -9)
📝 xray/stats.go (+1 -1)
📝 xray/uuid.go (+1 -1)
📝 xray/xray.go (+3 -3)
📝 xray_wrapper_android.go (+1 -1)

📄 Description

Summary

  • switch all Xray imports to the canonical github.com/xtls/xray-core module path
  • require Xray v1.260707.0 and replace it with github.com/amnezia-vpn/amnezia-xray-core v1.260707.0
  • adapt geo helpers to the geodata protobuf API moved to common/geodata in the new Xray version
  • preserve the checked-in go.mod and go.sum during builds
  • make mobile builds reproducible and reliable by pinning gomobile/gobind, failing on errors, and passing the linker flag required by anet on Go 1.23+

Why

The Amnezia Xray fork now declares the canonical github.com/xtls/xray-core module path. Keeping fork-path imports would make go mod tidy restore the old module dependency and conflict with the intended require/replace setup.

The build script also recreated module files on every run, which discarded the checked-in replacement. Xray v1.260707.0 additionally moved geodata protobuf types and introduced an Android dependency on github.com/wlynxg/anet, which requires -checklinkname=0 with current Go toolchains.

Validation

  • go mod tidy -diff
  • go mod verify
  • go test ./...
  • go vet ./...
  • ./build.sh android (AAR with armeabi-v7a, arm64-v8a, x86, and x86_64)
  • ./build.sh apple (iOS device, iOS simulator, and macOS XCFramework slices)
  • confirmed build.sh, go.mod, and go.sum remain unchanged after both mobile builds

Follow-ups

After merge, tag the next package release (expected v1.0.1) and update the amnezia-client Conan recipe version, source tag/URL, and SHA-256.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-libxray/pull/3 **Author:** [@FrogRocky](https://github.com/FrogRocky) **Created:** 7/10/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@FrogRocky](https://github.com/FrogRocky) **Base:** `main` ← **Head:** `frog/replace-xray-module` --- ### 📝 Commits (1) - [`0c352e2`](https://github.com/amnezia-vpn/amnezia-libxray/commit/0c352e260376e6466e8fae3b0357e07981133b21) chore: update xray module path ### 📊 Changes **10 files changed** (+118 additions, -92 deletions) <details> <summary>View changed files</summary> 📝 `build.sh` (+8 -8) 📝 `controller_android.go` (+1 -1) 📝 `go.mod` (+26 -16) 📝 `go.sum` (+62 -46) 📝 `xray/geo.go` (+6 -6) 📝 `xray/geo_cut.go` (+9 -9) 📝 `xray/stats.go` (+1 -1) 📝 `xray/uuid.go` (+1 -1) 📝 `xray/xray.go` (+3 -3) 📝 `xray_wrapper_android.go` (+1 -1) </details> ### 📄 Description ## Summary - switch all Xray imports to the canonical `github.com/xtls/xray-core` module path - require Xray `v1.260707.0` and replace it with `github.com/amnezia-vpn/amnezia-xray-core v1.260707.0` - adapt geo helpers to the geodata protobuf API moved to `common/geodata` in the new Xray version - preserve the checked-in `go.mod` and `go.sum` during builds - make mobile builds reproducible and reliable by pinning `gomobile`/`gobind`, failing on errors, and passing the linker flag required by `anet` on Go 1.23+ ## Why The Amnezia Xray fork now declares the canonical `github.com/xtls/xray-core` module path. Keeping fork-path imports would make `go mod tidy` restore the old module dependency and conflict with the intended `require`/`replace` setup. The build script also recreated module files on every run, which discarded the checked-in replacement. Xray `v1.260707.0` additionally moved geodata protobuf types and introduced an Android dependency on `github.com/wlynxg/anet`, which requires `-checklinkname=0` with current Go toolchains. ## Validation - `go mod tidy -diff` - `go mod verify` - `go test ./...` - `go vet ./...` - `./build.sh android` (AAR with armeabi-v7a, arm64-v8a, x86, and x86_64) - `./build.sh apple` (iOS device, iOS simulator, and macOS XCFramework slices) - confirmed `build.sh`, `go.mod`, and `go.sum` remain unchanged after both mobile builds ## Follow-ups After merge, tag the next package release (expected `v1.0.1`) and update the `amnezia-client` Conan recipe version, source tag/URL, and SHA-256. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 21:10:40 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-libxray#3
No description provided.