2022-09-26 19:37:06 +08:00
|
|
|
//go:build !with_clash_api
|
|
|
|
|
|
|
|
package include
|
|
|
|
|
|
|
|
import (
|
2023-04-21 17:29:00 +08:00
|
|
|
"context"
|
|
|
|
|
2022-09-26 19:37:06 +08:00
|
|
|
"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() {
|
2023-04-21 17:29:00 +08:00
|
|
|
experimental.RegisterClashServerConstructor(func(ctx context.Context, router adapter.Router, logFactory log.ObservableFactory, options option.ClashAPIOptions) (adapter.ClashServer, error) {
|
2022-09-26 19:37:06 +08:00
|
|
|
return nil, E.New(`clash api is not included in this build, rebuild with -tags with_clash_api`)
|
|
|
|
})
|
|
|
|
}
|