Files
umbrix-libcore/custom/command_server.go

25 lines
607 B
Go
Raw Normal View History

2023-08-28 13:07:21 +03:30
package main
import "github.com/sagernet/sing-box/experimental/libbox"
var commandServer *libbox.CommandServer
type CommandServerHandler struct{}
func (csh *CommandServerHandler) ServiceReload() error {
return nil
}
2023-09-05 19:00:24 +03:30
func (csh *CommandServerHandler) GetSystemProxyStatus() *libbox.SystemProxyStatus {
return &libbox.SystemProxyStatus{Available: true, Enabled: false}
}
func (csh *CommandServerHandler) SetSystemProxyEnabled(isEnabled bool) error {
return nil
}
2023-08-28 13:07:21 +03:30
func startCommandServer() error {
commandServer = libbox.NewCommandServer(&CommandServerHandler{}, 300)
return commandServer.Start()
}