Add command server
This commit is contained in:
16
custom/command_server.go
Normal file
16
custom/command_server.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "github.com/sagernet/sing-box/experimental/libbox"
|
||||
|
||||
var commandServer *libbox.CommandServer
|
||||
|
||||
type CommandServerHandler struct{}
|
||||
|
||||
func (csh *CommandServerHandler) ServiceReload() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func startCommandServer() error {
|
||||
commandServer = libbox.NewCommandServer(&CommandServerHandler{}, 300)
|
||||
return commandServer.Start()
|
||||
}
|
||||
Reference in New Issue
Block a user