utls_stub.go 965 B

123456789101112131415161718192021222324
  1. //go:build !with_utls
  2. package tls
  3. import (
  4. "context"
  5. "github.com/sagernet/sing-box/log"
  6. "github.com/sagernet/sing-box/option"
  7. E "github.com/sagernet/sing/common/exceptions"
  8. "github.com/sagernet/sing/common/logger"
  9. )
  10. func NewUTLSClient(ctx context.Context, logger logger.ContextLogger, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
  11. return nil, E.New(`uTLS is not included in this build, rebuild with -tags with_utls`)
  12. }
  13. func NewRealityClient(ctx context.Context, logger logger.ContextLogger, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
  14. return nil, E.New(`uTLS, which is required by reality is not included in this build, rebuild with -tags with_utls`)
  15. }
  16. func NewRealityServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error) {
  17. return nil, E.New(`uTLS, which is required by reality is not included in this build, rebuild with -tags with_utls`)
  18. }