💻
Open Source Oasis
  • TLS-Client
    • Supported and tested Client Profiles
    • Installation & Quick Usage
    • Client Options
    • Cookiejar
    • Defaults
    • Request Headers
    • Pseudo Header Order
    • Proxies
    • Certificate Pinning
    • Response Body Encoding / Decoding
    • Custom Client Profile
    • Examples
  • Shared Library
    • Node Version
    • Downloads
    • Build from source
    • Exposed Methods
    • JavaScript
      • Examples
    • Python
      • Examples
    • TypeScript
      • Examples
    • C#
      • Examples
    • Defaults
    • Payload
    • Response
    • Memory Issues
  • Standalone API Application
    • Download
    • Build from source
    • Configuration & Start
    • Endpoints
    • Defaults
    • Attention
    • Payload
    • Response
  • How to get support
    • Frequently Asked Questions / Errors
    • Community Support
  • Further Information
  • Antibots & Captchas
  • Community Projects
Powered by GitBook
On this page
  1. TLS-Client

Cookiejar

PreviousClient OptionsNextDefaults

Last updated 2 years ago

Since version 1.0.0 the TLS-Client uses the custom cookiejar implemented which can be found here: Before it was more or less golangs default cookiejar:

The custom cookiejar is designed for some specific (sneaker)botting related use cases when it comes to cookie overwriting or sharing cookies across different TLD. Often these use cases were about overwriting exisiting cookies in the jar with newer values or something like that.

When using the TLS-Client in go you can easilly switch between both jars just by instantiating the specific cookiejar you need:

Default Go Cookiejar

jar, _ := cookiejar.New(nil)
options := []tls_client.HttpClientOption{
   tls_client.WithCookieJar(jar),
}

client, err := tls_client.NewHttpClient(tls_client.NewNoopLogger(), options...)

Custom Cookiejar

jar := tls_client.NewCookieJar()

options := []tls_client.HttpClientOption{
   tls_client.WithCookieJar(jar),
}

client, err := tls_client.NewHttpClient(logger, options...)

Shared Library & Standalone API

If you are using the shared library or standalone api you can either completely deactiavte cookie jar handling by setting "withoutCookieJar" to true or you can switch to the default Go cookiejar by setting "withDefaultCookieJar" to true. By default the Custom Cookiejar will always be used.

https://github.com/bogdanfinn/tls-client/blob/master/jar.go
https://github.com/bogdanfinn/fhttp/blob/master/cookiejar/jar.go