Skip to content

Commit

Permalink
update to singbox 1.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Jan 21, 2024
1 parent d28a856 commit 1b0ed4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"os"
"time"

"context"

"github.com/sagernet/sing-box/log"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -32,7 +34,7 @@ func main() {

func preRun(cmd *cobra.Command, args []string) {
if disableColor {
log.SetStdLogger(log.NewFactory(log.Formatter{BaseTime: time.Now(), DisableColors: true}, os.Stderr, nil).Logger())
log.SetStdLogger(log.NewDefaultFactory(context.Background(), log.Formatter{BaseTime: time.Now(), DisableColors: true}, os.Stderr, "", nil, false).Logger())
}
if workingDir != "" {
_, err := os.Stat(workingDir)
Expand Down
4 changes: 2 additions & 2 deletions custom/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func NewService(options option.Options) (*libbox.BoxService, error) {
ctx = filemanager.WithDefault(ctx, sWorkingPath, sTempPath, sUserID, sGroupID)
urlTestHistoryStorage := urltest.NewHistoryStorage()
ctx = service.ContextWithPtr(ctx, urlTestHistoryStorage)
pauseManager := pause.NewDefaultManager(ctx)
ctx = pause.ContextWithManager(ctx, pauseManager)
pauseManager := pause.WithDefaultManager(ctx)
// ctx = pause.ContextWithManager(ctx, pauseManager)
instance, err := B.New(B.Options{
Context: ctx,
Options: options,
Expand Down

0 comments on commit 1b0ed4a

Please sign in to comment.