From fac242010576e71b0592b0c24ed4fac2a98c5c89 Mon Sep 17 00:00:00 2001 From: Yuzuki616 Date: Wed, 9 Aug 2023 19:39:59 +0800 Subject: [PATCH] fix hy stub for sing --- core/sing/sing.go | 3 ++- go.mod | 2 +- go.sum | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/sing/sing.go b/core/sing/sing.go index b115c2c..07c7d04 100644 --- a/core/sing/sing.go +++ b/core/sing/sing.go @@ -10,7 +10,6 @@ import ( "github.com/InazumaV/V2bX/conf" vCore "github.com/InazumaV/V2bX/core" - "github.com/inazumav/sing-box/adapter" "github.com/inazumav/sing-box/inbound" "github.com/inazumav/sing-box/log" @@ -20,6 +19,7 @@ import ( "github.com/sagernet/sing/common" E "github.com/sagernet/sing/common/exceptions" F "github.com/sagernet/sing/common/format" + "github.com/sagernet/sing/service/pause" ) var _ adapter.Service = (*Box)(nil) @@ -48,6 +48,7 @@ func New(c *conf.CoreConfig) (vCore.Core, error) { Output: c.SingConfig.LogConfig.Output, } ctx := context.Background() + ctx = pause.ContextWithDefaultManager(ctx) createdAt := time.Now() experimentalOptions := common.PtrValueOrDefault(options.Experimental) applyDebugOptions(common.PtrValueOrDefault(experimentalOptions.Debug)) diff --git a/go.mod b/go.mod index 9526fc1..ea826dd 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/goccy/go-json v0.10.2 github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 - github.com/inazumav/sing-box v0.0.0-20230809093045-c5fd24fc8b60 + github.com/inazumav/sing-box v0.0.0-20230809113805-82b279719f5f github.com/juju/ratelimit v1.0.2 github.com/sagernet/sing v0.2.10-0.20230807080248-4db0062caa0a github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index e30a8d5..7fec864 100644 --- a/go.sum +++ b/go.sum @@ -367,6 +367,10 @@ github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df h1:MZf03xP9WdakyXhOWuAD5 github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/inazumav/sing-box v0.0.0-20230809093045-c5fd24fc8b60 h1:JbqaLf29NrjpAU1zY9Z1inQJiau8TcedLmHkZXd7lBI= github.com/inazumav/sing-box v0.0.0-20230809093045-c5fd24fc8b60/go.mod h1:3c9SPznRTGFV/3Cba2oyDLLQ44pqWW/9PzLXjvAaUec= +github.com/inazumav/sing-box v0.0.0-20230809113332-78bc5982ba80 h1:Qq5KmpKzCXSwu1ERBUmvqFCk+CH1rbN6vyUuo1raZHA= +github.com/inazumav/sing-box v0.0.0-20230809113332-78bc5982ba80/go.mod h1:3c9SPznRTGFV/3Cba2oyDLLQ44pqWW/9PzLXjvAaUec= +github.com/inazumav/sing-box v0.0.0-20230809113805-82b279719f5f h1:jfwKhScZeQHUkMxQpJZ6ow2e3k4UDbwau6AsCzXwauw= +github.com/inazumav/sing-box v0.0.0-20230809113805-82b279719f5f/go.mod h1:3c9SPznRTGFV/3Cba2oyDLLQ44pqWW/9PzLXjvAaUec= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=