Documentation ¶
Overview ¶
Package `fingerprint` reads `metadata` and calculate the JA3, JA4, HTTP2 fingerprints, etc.
It also implements `header_injector` interface from package `reverseproxy`, which allows passing fingerprints to the backend through the forwarding request headers.
Index ¶
- Variables
- func HTTP2Fingerprint(data *metadata.Metadata) (string, error)
- func JA3Fingerprint(data *metadata.Metadata) (string, error)
- func JA4Fingerprint(data *metadata.Metadata) (string, error)
- func RegisterDurationMetric(registry *prometheus.Registry, buckets []float64, prefix string)
- type FingerprintFunc
- type FingerprintHeaderInjector
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VerboseLogs bool Logger *log.Logger )
Functions ¶
func HTTP2Fingerprint ¶
HTTP2Fingerprint is a FingerprintFunc, it output the Akamai HTTP2 fingerprint as the suggested format: S[;]|WU|P[,]#|PS[,]
func JA3Fingerprint ¶
JA3Fingerprint is a FingerprintFunc
func JA4Fingerprint ¶
JA4Fingerprint is a FingerprintFunc
func RegisterDurationMetric ¶
func RegisterDurationMetric(registry *prometheus.Registry, buckets []float64, prefix string)
Types ¶
type FingerprintHeaderInjector ¶
type FingerprintHeaderInjector struct { HeaderName string FingerprintFunc FingerprintFunc FingerprintDurationSucceedMetric prometheus.Observer FingerprintDurationErrorMetric prometheus.Observer }
FingerprintHeaderInjector implements reverseproxy.HeaderInjector
func NewFingerprintHeaderInjector ¶
func NewFingerprintHeaderInjector(headerName string, fingerprintFunc FingerprintFunc) *FingerprintHeaderInjector
func (*FingerprintHeaderInjector) GetHeaderName ¶
func (i *FingerprintHeaderInjector) GetHeaderName() string
func (*FingerprintHeaderInjector) GetHeaderValue ¶
func (i *FingerprintHeaderInjector) GetHeaderValue(req *http.Request) (string, error)
Click to show internal directories.
Click to hide internal directories.