utls_stub.go 865 B

1234567891011121314151617181920212223
  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. )
  9. func NewUTLSClient(ctx context.Context, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
  10. return nil, E.New(`uTLS is not included in this build, rebuild with -tags with_utls`)
  11. }
  12. func NewRealityClient(ctx context.Context, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
  13. return nil, E.New(`uTLS, which is required by reality is not included in this build, rebuild with -tags with_utls`)
  14. }
  15. func NewRealityServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error) {
  16. return nil, E.New(`uTLS, which is required by reality is not included in this build, rebuild with -tags with_utls`)
  17. }