Documentation
¶
Index ¶
- func GetCert(ctx context.Context, option Option) ([]*x509.Certificate, error)
- func GetCertConn(ctx context.Context, conn net.Conn, serverName string) ([]*x509.Certificate, error)
- func GetCertQuic(ctx context.Context, option Option) ([]*x509.Certificate, error)
- func GetCertQuicConn(ctx context.Context, conn net.PacketConn, addr net.Addr, sni string, ...) ([]*x509.Certificate, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertConn ¶ added in v0.6.0
func GetCertConn(ctx context.Context, conn net.Conn, serverName string) ([]*x509.Certificate, error)
GetCertConn gets the certificate from the target using TLS with pre-connected connection.
func GetCertQuic ¶ added in v0.5.0
GetCertQuic gets the certificate from the target using QUIC.
func GetCertQuicConn ¶ added in v0.6.0
func GetCertQuicConn(ctx context.Context, conn net.PacketConn, addr net.Addr, sni string, versions []quic.Version) ([]*x509.Certificate, error)
GetCertQuicConn gets the certificate from the target using QUIC with pre-connected packet conn.
Types ¶
type Option ¶ added in v0.7.0
type Option struct {
// Target is the target address to connect.
Target M.Socksaddr
// SNI is the server name indication.
// It will override Fqdn in Target.
SNI string
// Dialer is the dialer to use.
// If not specified, will use the default dialer.
Dialer N.Dialer
// FragmentInterval is the interval of send two fragment of TLS package.
// If set, will enable TLS fragment. This can help to probe the server error
// with post-quantum cryptography.
//
// Not suitable for QUIC.
//
// See: https://tldr.fail/
FragmentInterval time.Duration
// QUICVersions is the QUIC versions to use.
//
// Note: Cloudflare's different servers has different behavior when facing different sort of QUIC versions.
QUICVersions []quic.Version
}
Click to show internal directories.
Click to hide internal directories.