github.com/sagernet/sing-box@v1.9.0-rc.20/common/tls/ech_stub.go (about) 1 //go:build !with_ech 2 3 package tls 4 5 import ( 6 "context" 7 8 "github.com/sagernet/sing-box/log" 9 "github.com/sagernet/sing-box/option" 10 E "github.com/sagernet/sing/common/exceptions" 11 ) 12 13 var errECHNotIncluded = E.New(`ECH is not included in this build, rebuild with -tags with_ech`) 14 15 func NewECHServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error) { 16 return nil, errECHNotIncluded 17 } 18 19 func NewECHClient(ctx context.Context, serverAddress string, options option.OutboundTLSOptions) (Config, error) { 20 return nil, errECHNotIncluded 21 } 22 23 func ECHKeygenDefault(host string, pqSignatureSchemesEnabled bool) (configPem string, keyPem string, err error) { 24 return "", "", errECHNotIncluded 25 }