From 36ff11b8040048c514aedc8338e5453be1d265fc Mon Sep 17 00:00:00 2001 From: Tamim Hossain Date: Sat, 12 Jul 2025 22:20:02 +0600 Subject: [PATCH] Fix : Export RunXrayFromJSON in CGO Export RunXrayFromJSON in CGO --- build/template/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/template/main.go b/build/template/main.go index 66a78228..fb0e5656 100644 --- a/build/template/main.go +++ b/build/template/main.go @@ -15,6 +15,12 @@ func CGoResetDns() *C.char { return C.CString(ResetDns()) } +//export CGoRunXrayFromJSON +func CGoRunXrayFromJSON(base64Text *C.char) *C.char { + text := C.GoString(base64Text) + return C.CString(RunXrayFromJSON(text)) +} + //export CGoGetFreePorts func CGoGetFreePorts(count int) *C.char { return C.CString(GetFreePorts(count))