Make clash api and gVisor optional

This commit is contained in:
世界
2022-07-20 07:12:40 +08:00
parent c5b3e8b042
commit 6ac1b395cf
9 changed files with 49 additions and 16 deletions

14
experimental/clashapi.go Normal file
View File

@@ -0,0 +1,14 @@
//go:build with_clash_api
package experimental
import (
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/experimental/clashapi"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
)
func NewClashServer(router adapter.Router, logFactory log.ObservableFactory, options option.ClashAPIOptions) (adapter.ClashServer, error) {
return clashapi.NewServer(router, logFactory, options), nil
}