diff --git a/app/proxyman/outbound/handler_test.go b/app/proxyman/outbound/handler_test.go index 2fc723e91..7072f63e3 100644 --- a/app/proxyman/outbound/handler_test.go +++ b/app/proxyman/outbound/handler_test.go @@ -22,8 +22,8 @@ func TestInterfaces(t *testing.T) { _ = (outbound.Manager)(new(Manager)) } -//go:linkname mustToContextForced github.com/v2fly/v2ray-core/v4.mustToContext -func mustToContextForced(ctx context.Context, v *core.Instance) context.Context +//go:linkname toContext github.com/v2fly/v2ray-core/v4.toContext +func toContext(ctx context.Context, v *core.Instance) context.Context func TestOutboundWithoutStatCounter(t *testing.T) { config := &core.Config{ @@ -41,7 +41,7 @@ func TestOutboundWithoutStatCounter(t *testing.T) { v, _ := core.New(config) v.AddFeature((outbound.Manager)(new(Manager))) - ctx := mustToContextForced(context.Background(), v) + ctx := toContext(context.Background(), v) h, _ := NewHandler(ctx, &core.OutboundHandlerConfig{ Tag: "tag", ProxySettings: serial.ToTypedMessage(&freedom.Config{}), @@ -70,7 +70,7 @@ func TestOutboundWithStatCounter(t *testing.T) { v, _ := core.New(config) v.AddFeature((outbound.Manager)(new(Manager))) - ctx := mustToContextForced(context.Background(), v) + ctx := toContext(context.Background(), v) h, _ := NewHandler(ctx, &core.OutboundHandlerConfig{ Tag: "tag", ProxySettings: serial.ToTypedMessage(&freedom.Config{}),