modify
golang.org/x/net/http2
fingerprint for mimicry purposes
patches
directory contains patches for each tag.github/workflows/patch.yml
patch all tags automatically
- replace
golang.org/x/net
withgithub.heygears.com/hellodword/http2-custom-fingerprint
ingo.mod
, you can find the generated versions inrevision.txt
- use custom functions in
http2.Transport
:
http2.Transport{
CustomInitialTransportConnFlow: func(u uint32) uint32 {
fmt.Println("original InitialTransportConnFlow", u)
return 15663105
},
CustomInitialSettings: func(s []http2.Setting) []http2.Setting {
fmt.Println("original InitialSettings", s)
return []http2.Setting{
{ID: http2.SettingHeaderTableSize, Val: 65536},
{ID: http2.SettingEnablePush, Val: 0},
{ID: http2.SettingInitialWindowSize, Val: 6291456},
{ID: http2.SettingMaxHeaderListSize, Val: 262144},
}
},
CustomFirstHeadersFrameParam: func(hfp http2.HeadersFrameParam) http2.HeadersFrameParam {
fmt.Println("original FirstWriteHeaders", hfp)
hfp.Priority = http2.PriorityParam{
Weight: 255,
StreamDep: 0,
Exclusive: true,
}
return hfp
},
CustomHeaders: func(s [][2]string) [][2]string {
fmt.Println("original Headers", s)
// sort headers as you want
return s
},
}