scribe

package module
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 9 Imported by: 0

README

TLS-scribe

Go Reference

A tool to show the remote TLS certificate.

Build

CGO_ENABLED=0 make build

Usage

$ tlscribe --help
Usage of tlscribe:
  -4    Only use IPv4
  -6    Only use IPv6
  -f duration
        Fragment interval
  -q value
        QUIC version. example: -q 2,1. Default: 1,2
  -sni string
        Server name
  -timeout duration
        Timeout (default 10s)
  -v    Print version
  -x string
        Proxy

Example:

  • tlscribe -f 1s https://nginx.org

  • tlscribe -timeout 3s quic://http3.ooo

  • tlscribe -f 1s -sni www.pixiv.com https://www.cloudflare.com:8443

  • tlscribe -x "socks5://user:pass@127.0.0.1:1080" quic://quic.ngix.org"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCert added in v0.5.0

func GetCert(ctx context.Context, option Option) ([]*x509.Certificate, error)

GetCert gets the certificate from the target.

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

func GetCertQuic(ctx context.Context, option Option) ([]*x509.Certificate, error)

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
}

func NewOption added in v0.7.0

func NewOption(target M.Socksaddr, sni string, dialer N.Dialer, fragmentInterval time.Duration) Option

NewOption creates a new Option.

Directories

Path Synopsis
cmd
tlscribe command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL