Files
sing-box-extended-mirror/include/wireguard_stub.go
T

21 lines
725 B
Go
Raw Normal View History

2024-11-02 00:39:02 +08:00
//go:build !with_wireguard
package include
import (
"context"
"github.com/sagernet/sing-box/adapter"
2024-11-21 18:10:41 +08:00
"github.com/sagernet/sing-box/adapter/endpoint"
2024-11-02 00:39:02 +08:00
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
)
2024-11-21 18:10:41 +08:00
func registerWireGuardEndpoint(registry *endpoint.Registry) {
endpoint.Register[option.WireGuardEndpointOptions](registry, C.TypeWireGuard, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.WireGuardEndpointOptions) (adapter.Endpoint, error) {
2024-11-02 00:39:02 +08:00
return nil, E.New(`WireGuard is not included in this build, rebuild with -tags with_wireguard`)
})
}