sing-box/common/tls/ech_stub.go

26 lines
727 B
Go
Raw Permalink Normal View History

2022-09-10 02:27:00 +00:00
//go:build !with_ech
package tls
import (
2023-08-29 05:43:42 +00:00
"context"
"github.com/sagernet/sing-box/log"
2022-09-10 02:27:00 +00:00
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
)
2023-08-29 11:28:26 +00:00
var errECHNotIncluded = E.New(`ECH is not included in this build, rebuild with -tags with_ech`)
2023-08-29 05:43:42 +00:00
func NewECHServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error) {
2023-08-29 11:28:26 +00:00
return nil, errECHNotIncluded
2023-08-29 05:43:42 +00:00
}
func NewECHClient(ctx context.Context, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
2023-08-29 11:28:26 +00:00
return nil, errECHNotIncluded
}
func ECHKeygenDefault(host string, pqSignatureSchemesEnabled bool) (configPem string, keyPem string, err error) {
return "", "", errECHNotIncluded
2022-09-10 02:27:00 +00:00
}