add dynamic port

This commit is contained in:
Hiddify
2024-03-03 06:56:41 +01:00
parent a4b067006a
commit 3793b614db
2 changed files with 25 additions and 8 deletions

View File

@@ -9,7 +9,9 @@ import (
)
func main() {
v2.StartGrpcServer()
// defer C.free(unsafe.Pointer(port))
v2.StartGrpcServerGo("127.0.0.1:50051")
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
<-sigChan