ja3x

package
v0.0.0-...-c1a18ae Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Package ja3x contains code to produce ja3 signatures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is an HTTP server that returns JA3 information. This server only supports HTTP/1.1 and HTTP/2.

This server will use its own internal CA. You should use Server.ClientConfig to obtain a suitable tls.Config or Server.CertPool to obtain a suitable x509.CertPool. If you use Server.CertPool keep in mind that you also need to specify a ServerName in the tls.Config for an handshake to complete successfully. By default [Server.Config] uses "example.com" as the server name but you can override that.

Please, use the NewServer factory to create a new instance: the zero-value Server is invalid and will panic if used.

func NewServer

func NewServer(alpn ...string) *Server

NewServer creates a new Server instance.

func (*Server) CertPool

func (p *Server) CertPool() *x509.CertPool

CertPool returns the internal CA as a cert pool.

func (*Server) ClientConfig

func (p *Server) ClientConfig() *tls.Config

ClientConfig returns a tls.Config where the ServerName is set to "example.com" and the RootCAs is set to the value returned by the Server.CertPool method.

func (*Server) Close

func (p *Server) Close() (err error)

Close terminates a running Server instance.

func (*Server) Endpoint

func (p *Server) Endpoint() string

Endpoint returns the server's TCP endpoint.

func (*Server) URL

func (p *Server) URL() string

URL returns the server's URL, which is guaranteed to contain an explicit port even in the very unlikely case in which the randomly selected port is 443/tcp.

Jump to

Keyboard shortcuts

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