| 1234567891011121314151617181920 |
- //go:build !with_cloudflared
- package include
- import (
- "context"
- "github.com/sagernet/sing-box/adapter"
- "github.com/sagernet/sing-box/adapter/inbound"
- 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 registerCloudflaredInbound(registry *inbound.Registry) {
- inbound.Register[option.CloudflaredInboundOptions](registry, C.TypeCloudflared, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.CloudflaredInboundOptions) (adapter.Inbound, error) {
- return nil, E.New(`Cloudflared is not included in this build, rebuild with -tags with_cloudflared`)
- })
- }
|