Files
sing-box/include/naive_outbound_stub.go
2026-01-17 05:47:41 +08:00

21 lines
724 B
Go

//go:build !with_naive_outbound
package include
import (
"context"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/adapter/outbound"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
)
func registerNaiveOutbound(registry *outbound.Registry) {
outbound.Register[option.NaiveOutboundOptions](registry, C.TypeNaive, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.NaiveOutboundOptions) (adapter.Outbound, error) {
return nil, E.New(`naive outbound is not included in this build, rebuild with -tags with_naive_outbound`)
})
}