Documentation
¶
Overview ¶
Package `metadata` has a struct that stores information captured by `proxyserver`. Package `fingerprint` uses these information to create fingerprints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
FingerproxyContextKey = &contextKey{"fingerproxy-metadata"}
)
Functions ¶
This section is empty.
Types ¶
type HTTP2FingerprintingFrames ¶
type HTTP2FingerprintingFrames struct {
// Data from SETTINGS frame
Settings []Setting
// Increment of WINDOW_UPDATE frame
WindowUpdateIncrement uint32
// PRIORITY frame(s)
Priorities []Priority
// HEADERS frame
Headers []HeaderField
}
func (*HTTP2FingerprintingFrames) Marshal ¶
func (f *HTTP2FingerprintingFrames) Marshal(maxPriorityFrames uint) string
TODO: add tests
func (*HTTP2FingerprintingFrames) OrderedHeaders ¶ added in v1.2.5
func (f *HTTP2FingerprintingFrames) OrderedHeaders() []string
OrderedHeaders returns the HTTP/2 header names in the order they were received. Pseudo headers (starting with a colon) are skipped. Header names are lower-cased and duplicates are preserved.
func (*HTTP2FingerprintingFrames) String ¶
func (f *HTTP2FingerprintingFrames) String() string
type HeaderField ¶
type Metadata ¶
type Metadata struct {
// ClientHelloRecord is the raw TLS ClientHello bytes that
// include TLS record header and handshake header
ClientHelloRecord []byte
// ConnectionState represents the TLS connection state
ConnectionState tls.ConnectionState
// HTTP2Frames includes certain HTTP2 frames data
HTTP2Frames HTTP2FingerprintingFrames
// IsQUIC indicates the handshake came over QUIC/UDP.
IsQUIC bool
// OrderedHTTP1Headers lists request header names in the order they
// were received for HTTP/1.x connections. Names are lower-case and
// may appear multiple times if the client sent duplicates.
OrderedHTTP1Headers []string
}
Metadata is the data we captured from the connection for fingerprinting. Currently only TLS ClientHello and certain HTTP2 frames included, more can be added in the future.
func (*Metadata) OrderedHeaders ¶
OrderedHeaders returns the HTTP header names in the order they were received. If HTTP/1.x ordered headers are available they are returned directly; otherwise the order is determined from captured HTTP/2 frames.