Skip to content

Commit 36ff11b

Browse files
committed
Fix : Export RunXrayFromJSON in CGO
Export RunXrayFromJSON in CGO
1 parent d3408e3 commit 36ff11b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build/template/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ func CGoResetDns() *C.char {
1515
return C.CString(ResetDns())
1616
}
1717

18+
//export CGoRunXrayFromJSON
19+
func CGoRunXrayFromJSON(base64Text *C.char) *C.char {
20+
text := C.GoString(base64Text)
21+
return C.CString(RunXrayFromJSON(text))
22+
}
23+
1824
//export CGoGetFreePorts
1925
func CGoGetFreePorts(count int) *C.char {
2026
return C.CString(GetFreePorts(count))

0 commit comments

Comments
 (0)