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))