new: add hiddifyrpc

This commit is contained in:
Hiddify
2024-03-03 04:15:19 +01:00
parent 0aa2c99599
commit a4b067006a
22 changed files with 3715 additions and 29 deletions

16
v2/example_server/main.go Normal file
View File

@@ -0,0 +1,16 @@
package main
import (
"os"
"os/signal"
"syscall"
v2 "github.com/hiddify/libcore/v2"
)
func main() {
v2.StartGrpcServer()
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
<-sigChan
}