First Commmit
This commit is contained in:
17
include/v2rayapi_stub.go
Normal file
17
include/v2rayapi_stub.go
Normal file
@@ -0,0 +1,17 @@
|
||||
//go:build !with_v2ray_api
|
||||
|
||||
package include
|
||||
|
||||
import (
|
||||
"github.com/sagernet/sing-box/adapter"
|
||||
"github.com/sagernet/sing-box/experimental"
|
||||
"github.com/sagernet/sing-box/log"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
E "github.com/sagernet/sing/common/exceptions"
|
||||
)
|
||||
|
||||
func init() {
|
||||
experimental.RegisterV2RayServerConstructor(func(logger log.Logger, options option.V2RayAPIOptions) (adapter.V2RayServer, error) {
|
||||
return nil, E.New(`v2ray api is not included in this build, rebuild with -tags with_v2ray_api`)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user