ech_stub.go 727 B

12345678910111213141516171819202122232425
  1. //go:build !with_ech
  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. var errECHNotIncluded = E.New(`ECH is not included in this build, rebuild with -tags with_ech`)
  10. func NewECHServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error) {
  11. return nil, errECHNotIncluded
  12. }
  13. func NewECHClient(ctx context.Context, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
  14. return nil, errECHNotIncluded
  15. }
  16. func ECHKeygenDefault(host string, pqSignatureSchemesEnabled bool) (configPem string, keyPem string, err error) {
  17. return "", "", errECHNotIncluded
  18. }