Code Monkey home page Code Monkey logo

http2-custom-fingerprint's Introduction

http2-custom-fingerprint

modify golang.org/x/net/http2 fingerprint for mimicry purposes

layout

  • patches directory contains patches for each tag
  • .github/workflows/patch.yml patch all tags automatically

usage

  1. replace golang.org/x/net with github.com/hellodword/http2-custom-fingerprint in go.mod, you can find the generated versions in revision.txt
  2. 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
	},
}

http2-custom-fingerprint's People

Contributors

hellodword avatar github-actions[bot] avatar

Stargazers

Verum Haeresis avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.