From 18c5fef49892be1c5755dd4e6ec672399521809a Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 14 Apr 2026 20:03:06 +0800 Subject: [PATCH] =?UTF-8?q?Make=20RegisterProcessFinder=20a=20CoreControll?= =?UTF-8?q?er=20method=EF=BC=8Cversion=20=3D=2036?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android_process_finder.go => libv2ray_android.go | 5 +---- libv2ray_main.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) rename android_process_finder.go => libv2ray_android.go (95%) diff --git a/android_process_finder.go b/libv2ray_android.go similarity index 95% rename from android_process_finder.go rename to libv2ray_android.go index 3943547..f4b409f 100644 --- a/android_process_finder.go +++ b/libv2ray_android.go @@ -1,10 +1,7 @@ -//go:build android - package libv2ray import ( "fmt" - corenet "github.com/xtls/xray-core/common/net" ) @@ -27,7 +24,7 @@ type ProcessFinder interface { // enabling per-app routing based on UID. Must be called before starting the // core for process-based routing rules to work. // Pass nil to unregister a previously registered finder. -func RegisterProcessFinder(finder ProcessFinder) { +func (x *CoreController) RegisterProcessFinder(finder ProcessFinder) { if finder == nil { corenet.RegisterAndroidProcessFinder(nil) return diff --git a/libv2ray_main.go b/libv2ray_main.go index c8ca4d1..31db929 100644 --- a/libv2ray_main.go +++ b/libv2ray_main.go @@ -195,7 +195,7 @@ func MeasureOutboundDelay(ConfigureFileContent string, url string) (int64, error // CheckVersionX returns the library and Xray versions func CheckVersionX() string { - var version = 35 + var version = 36 return fmt.Sprintf("Lib v%d, Xray-core v%s", version, core.Version()) }