1
0

v2rayapi_stub.go 515 B

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