fix: issue with singbox 1.8.9
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/hiddify/libcore/bridge"
|
||||
"github.com/sagernet/sing-box/experimental/libbox"
|
||||
"github.com/sagernet/sing-box/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -13,24 +14,24 @@ var (
|
||||
)
|
||||
|
||||
type OldCommandClientHandler struct {
|
||||
port int64
|
||||
// logger log.Logger
|
||||
port int64
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) Connected() {
|
||||
// cch.logger.Debug("CONNECTED")
|
||||
cch.logger.Debug("CONNECTED")
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) Disconnected(message string) {
|
||||
// cch.logger.Debug("DISCONNECTED: ", message)
|
||||
cch.logger.Debug("DISCONNECTED: ", message)
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) ClearLog() {
|
||||
// cch.logger.Debug("clear log")
|
||||
cch.logger.Debug("clear log")
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) WriteLog(message string) {
|
||||
// cch.logger.Debug("log: ", message)
|
||||
cch.logger.Debug("log: ", message)
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) WriteStatus(message *libbox.StatusMessage) {
|
||||
@@ -44,7 +45,7 @@ func (cch *OldCommandClientHandler) WriteStatus(message *libbox.StatusMessage) {
|
||||
"downlink-total": message.DownlinkTotal,
|
||||
},
|
||||
)
|
||||
// cch.logger.Debug("Memory: ", libbox.FormatBytes(message.Memory), ", Goroutines: ", message.Goroutines)
|
||||
cch.logger.Debug("Memory: ", libbox.FormatBytes(message.Memory), ", Goroutines: ", message.Goroutines)
|
||||
if err != nil {
|
||||
bridge.SendStringToPort(cch.port, fmt.Sprintf("error: %e", err))
|
||||
} else {
|
||||
@@ -83,11 +84,11 @@ func (cch *OldCommandClientHandler) WriteGroups(message libbox.OutboundGroupIter
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) InitializeClashMode(modeList libbox.StringIterator, currentMode string) {
|
||||
// cch.logger.Debug("initial clash mode: ", currentMode)
|
||||
cch.logger.Debug("initial clash mode: ", currentMode)
|
||||
}
|
||||
|
||||
func (cch *OldCommandClientHandler) UpdateClashMode(newMode string) {
|
||||
// cch.logger.Debug("update clash mode: ", newMode)
|
||||
cch.logger.Debug("update clash mode: ", newMode)
|
||||
}
|
||||
|
||||
type OutboundGroup struct {
|
||||
|
||||
Reference in New Issue
Block a user