Documentation ¶
Index ¶
- Constants
- func GenerateKeyPair(serverName string) (*tls.Certificate, error)
- func NewDialer(dialer N.Dialer, config Config) N.Dialer
- func NewDialerFromOptions(router adapter.Router, dialer N.Dialer, serverAddress string, ...) (N.Dialer, error)
- func ParseTLSVersion(version string) (uint16, error)
- type Config
- func NewClient(router adapter.Router, serverAddress string, options option.OutboundTLSOptions) (Config, error)
- func NewECHClient(router adapter.Router, serverAddress string, options option.OutboundTLSOptions) (Config, error)
- func NewSTDClient(serverAddress string, options option.OutboundTLSOptions) (Config, error)
- func NewUTLSClient(router adapter.Router, serverAddress string, options option.OutboundTLSOptions) (Config, error)
- type Conn
- type Dialer
- type STDClientConfig
- func (s *STDClientConfig) Client(conn net.Conn) Conn
- func (s *STDClientConfig) Clone() Config
- func (s *STDClientConfig) Config() (*STDConfig, error)
- func (s *STDClientConfig) NextProtos() []string
- func (s *STDClientConfig) ServerName() string
- func (s *STDClientConfig) SetNextProtos(nextProto []string)
- func (s *STDClientConfig) SetServerName(serverName string)
- type STDConfig
- type STDConn
- type STDServerConfig
- func (c *STDServerConfig) Client(conn net.Conn) Conn
- func (c *STDServerConfig) Clone() Config
- func (c *STDServerConfig) Close() error
- func (c *STDServerConfig) Config() (*STDConfig, error)
- func (c *STDServerConfig) NextProtos() []string
- func (c *STDServerConfig) Server(conn net.Conn) Conn
- func (c *STDServerConfig) ServerName() string
- func (c *STDServerConfig) SetNextProtos(nextProto []string)
- func (c *STDServerConfig) SetServerName(serverName string)
- func (c *STDServerConfig) Start() error
- type ServerConfig
Constants ¶
View Source
const ( VersionTLS10 = 0x0301 VersionTLS11 = 0x0302 VersionTLS12 = 0x0303 VersionTLS13 = 0x0304 // Deprecated: SSLv3 is cryptographically broken, and is no longer // supported by this package. See golang.org/issue/32716. VersionSSL30 = 0x0300 )
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
func GenerateKeyPair(serverName string) (*tls.Certificate, error)
func NewDialerFromOptions ¶
func ParseTLSVersion ¶
Types ¶
type Config ¶
type Config interface { ServerName() string SetServerName(serverName string) NextProtos() []string SetNextProtos(nextProto []string) Config() (*STDConfig, error) Client(conn net.Conn) Conn Clone() Config }
func NewECHClient ¶
func NewSTDClient ¶
func NewSTDClient(serverAddress string, options option.OutboundTLSOptions) (Config, error)
func NewUTLSClient ¶
type Conn ¶
type Conn interface { net.Conn HandshakeContext(ctx context.Context) error ConnectionState() tls.ConnectionState }
func ClientHandshake ¶
func ServerHandshake ¶
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
func (*Dialer) DialContext ¶
func (*Dialer) ListenPacket ¶
type STDClientConfig ¶
type STDClientConfig struct {
// contains filtered or unexported fields
}
func (*STDClientConfig) Clone ¶
func (s *STDClientConfig) Clone() Config
func (*STDClientConfig) Config ¶
func (s *STDClientConfig) Config() (*STDConfig, error)
func (*STDClientConfig) NextProtos ¶
func (s *STDClientConfig) NextProtos() []string
func (*STDClientConfig) ServerName ¶
func (s *STDClientConfig) ServerName() string
func (*STDClientConfig) SetNextProtos ¶
func (s *STDClientConfig) SetNextProtos(nextProto []string)
func (*STDClientConfig) SetServerName ¶
func (s *STDClientConfig) SetServerName(serverName string)
type STDServerConfig ¶
type STDServerConfig struct {
// contains filtered or unexported fields
}
func (*STDServerConfig) Clone ¶
func (c *STDServerConfig) Clone() Config
func (*STDServerConfig) Close ¶
func (c *STDServerConfig) Close() error
func (*STDServerConfig) Config ¶
func (c *STDServerConfig) Config() (*STDConfig, error)
func (*STDServerConfig) NextProtos ¶
func (c *STDServerConfig) NextProtos() []string
func (*STDServerConfig) ServerName ¶
func (c *STDServerConfig) ServerName() string
func (*STDServerConfig) SetNextProtos ¶
func (c *STDServerConfig) SetNextProtos(nextProto []string)
func (*STDServerConfig) SetServerName ¶
func (c *STDServerConfig) SetServerName(serverName string)
func (*STDServerConfig) Start ¶
func (c *STDServerConfig) Start() error
type ServerConfig ¶
func NewSTDServer ¶
func NewSTDServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error)
func NewServer ¶
func NewServer(ctx context.Context, logger log.Logger, options option.InboundTLSOptions) (ServerConfig, error)
Click to show internal directories.
Click to hide internal directories.