mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-26 22:21:47 +03:00
Add ssm api server
This commit is contained in:
5
include/ssmapi.go
Normal file
5
include/ssmapi.go
Normal file
@@ -0,0 +1,5 @@
|
||||
//go:build with_ssm_api
|
||||
|
||||
package include
|
||||
|
||||
import _ "github.com/sagernet/sing-box/experimental/ssmapi"
|
||||
17
include/ssmapi_stub.go
Normal file
17
include/ssmapi_stub.go
Normal file
@@ -0,0 +1,17 @@
|
||||
//go:build !with_ssm_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.RegisterSSMServerConstructor(func(router adapter.Router, logger log.Logger, options option.SSMAPIOptions) (adapter.SSMServer, error) {
|
||||
return nil, E.New(`SSM api is not included in this build, rebuild with -tags with_ssm_api`)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user