gokhttp_ja3spoof

package module
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 18 Imported by: 0

README

gOkHttp ja3spoof

JA3 spoofing addon for gOkHttp.

Installation

go get -u github.com/BRUHItsABunny/gOkHttp-ja3spoof

Usage

package main

import (
	"context"
	"fmt"
	gokhttp "github.com/BRUHItsABunny/gOkHttp"
	gokhttp_ja3spoof "github.com/BRUHItsABunny/gOkHttp-ja3spoof"
	gokhttp_requests "github.com/BRUHItsABunny/gOkHttp/requests"
	gokhttp_responses "github.com/BRUHItsABunny/gOkHttp/responses"
	device_utils "github.com/BRUHItsABunny/go-device-utils"
	utls "github.com/refraction-networking/utls"
)

func main() {
	browser := device_utils.AvailableBrowsers["brave"]["1.50.114"]
	hClient, err := gokhttp.NewHTTPClient(
		gokhttp_ja3spoof.NewJa3SpoofingOption(browser, &utls.Config{InsecureSkipVerify: true}),
	)
	if err != nil {
		panic(err)
	}

	req, err := gokhttp_requests.MakeGETRequest(context.Background(), "https://tls.peet.ws/api/clean")
	if err != nil {
		panic(err)
	}
	
	resp, err := hClient.Do(req)
	if err != nil {
		panic(err)
	}
	
	result, err := gokhttp_responses.ResponseText(resp)
	if err != nil {
		panic(err)
	}
	
	fmt.Println(result)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserToClientHelloSpec added in v0.0.2

func BrowserToClientHelloSpec(browser *device_utils.Browser, extensionMapFunc ExtensionMapFunc) (*utls.ClientHelloSpec, error)

func CreateSpecWithJA3Str added in v0.0.5

func CreateSpecWithJA3Str(ja3Str string) (clientHelloSpec utls.ClientHelloSpec, err error)

func CreateSpecWithTLSFingerprint added in v0.0.10

func CreateSpecWithTLSFingerprint(fingerprint *device_utils.Browser_TLSFingerprint) (clientHelloSpec utls.ClientHelloSpec, err error)

func DefaultExtensionMapV2 added in v0.0.2

func DefaultExtensionMapV2() map[int32]utls.TLSExtension

func IsGREASEUint16 added in v0.0.5

func IsGREASEUint16(v uint16) bool

Types

type ExtensionMapFunc added in v0.0.2

type ExtensionMapFunc func() map[int32]utls.TLSExtension

type HTTP2ParametersOption added in v0.0.20

type HTTP2ParametersOption struct {
	HeaderTableSize      int64
	EnablePush           int64
	MaxConcurrentStreams int64
	InitialWindowSize    int64
	MaxFrameSize         int64
	MaxHeaderListSize    int64
	AdditionalValues     []int64

	WindowUpdateIncrement uint32

	HTTP2PriorityFrameSettings *oohttp.HTTP2PriorityFrameSettings
}

func (*HTTP2ParametersOption) Execute added in v0.0.20

func (o *HTTP2ParametersOption) Execute(client *http.Client) error

type Ja3SpoofingOptionV2 added in v0.0.2

type Ja3SpoofingOptionV2 struct {
	TLSConfig                *tls.Config
	ClientHelloSpec          *utls.ClientHelloSpec
	Browser                  *device_utils.Browser
	ClientHelloID            *utls.ClientHelloID
	ExtensionMap             func() map[int32]utls.TLSExtension
	IsHTTP1                  bool
	ECHConfig                *utls.GREASEEncryptedClientHelloExtension
	TrackResponseHeaderOrder bool
}

func NewJa3SpoofingOptionV2 added in v0.0.2

func NewJa3SpoofingOptionV2(clientHelloSpec *utls.ClientHelloSpec, clientHelloId *utls.ClientHelloID) *Ja3SpoofingOptionV2

func (*Ja3SpoofingOptionV2) Execute added in v0.0.2

func (o *Ja3SpoofingOptionV2) Execute(client *http.Client) error

func (*Ja3SpoofingOptionV2) ExecuteV2 added in v0.0.4

func (o *Ja3SpoofingOptionV2) ExecuteV2(client *oohttp.Client) error

type ProxyOption deprecated added in v0.0.2

type ProxyOption struct {
	ProxyURL string
}

ProxyOption sets a proxy on your HTTP transport, supports http, https, socks4 and socks5.

Deprecated: This option was needed to handle oohttp Transports in the past, reflection now handles both in one function. Use github.com/BRUHItsABunny/gOkHttp/client instead.

func NewProxyOption deprecated added in v0.0.2

func NewProxyOption(proxyURL string) *ProxyOption

NewProxyOption Creates an ProxyOption that sets a proxy on your HTTP transport, supports http, https, socks4 and socks5.

Deprecated: This option was needed to handle oohttp Transports in the past, reflection now handles both in one function. Use github.com/BRUHItsABunny/gOkHttp/client instead.

func (*ProxyOption) Execute added in v0.0.2

func (o *ProxyOption) Execute(client *http.Client) error

func (*ProxyOption) ExecuteV2 added in v0.0.4

func (o *ProxyOption) ExecuteV2(client *oohttp.Client) error

Directories

Path Synopsis
compat

Jump to

Keyboard shortcuts

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