github.com/sagernet/sing-box@v1.9.0-rc.20/include/v2rayapi_stub.go (about) 1 //go:build !with_v2ray_api 2 3 package include 4 5 import ( 6 "github.com/sagernet/sing-box/adapter" 7 "github.com/sagernet/sing-box/experimental" 8 "github.com/sagernet/sing-box/log" 9 "github.com/sagernet/sing-box/option" 10 E "github.com/sagernet/sing/common/exceptions" 11 ) 12 13 func init() { 14 experimental.RegisterV2RayServerConstructor(func(logger log.Logger, options option.V2RayAPIOptions) (adapter.V2RayServer, error) { 15 return nil, E.New(`v2ray api is not included in this build, rebuild with -tags with_v2ray_api`) 16 }) 17 }