new: add tunnel service

This commit is contained in:
Hiddify
2024-01-29 21:55:01 +01:00
parent 25d5b8a1c5
commit 5fa28220b4
28 changed files with 364 additions and 231 deletions

19
cmd/cmd_admin_service.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
"github.com/hiddify/libcore/admin_service"
"github.com/spf13/cobra"
)
var commandService = &cobra.Command{
Use: "admin-service",
Short: "Sign box service start/stop/install/uninstall",
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
if len(args) < 2 {
admin_service.StartService("")
}
admin_service.StartService(args[1])
},
}