### Perform GET Request with JA3Client Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP GET request to the specified URL using the JA3Client. This is a convenience method for simple GET operations. ```go func (c *JA3Client) Get(targetURL string) (*http.Response, error) ``` -------------------------------- ### JA3Client.Get Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP GET request to the specified URL using the JA3Client. ```APIDOC ## JA3Client.Get ### Description Get issues a GET to the specified URL. ### Method Signature ```go func (c *JA3Client) Get(targetURL string) (*http.Response, error) ``` ### Parameters * **targetURL** (string) - The URL to send the GET request to. ``` -------------------------------- ### Create JA3Client from JA3 String Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates a new JA3Client using only a JA3 string. This is a convenient way to initialize the client when only the JA3 signature is known. ```go func NewWithString(ja3 string) (*JA3Client, error) ``` -------------------------------- ### Create JA3Client from Browser Struct Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates a new JA3Client based on a provided Browser struct. This function initializes the client with specific JA3 and User-Agent details. ```go func New(b Browser) (*JA3Client, error) ``` -------------------------------- ### JA3Client.New Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates a new JA3Client based on a provided Browser struct. ```APIDOC ## JA3Client.New ### Description New creates a JA3Client based on a Browser struct. ### Function Signature ```go func New(b Browser) (*JA3Client, error) ``` ### Parameters * **b** (Browser) - The Browser struct containing JA3 and User-Agent information. ``` -------------------------------- ### JA3Client.NewWithString Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates a JA3Client using only a JA3 string. ```APIDOC ## JA3Client.NewWithString ### Description NewWithString creates a JA3 client with the specified JA3 string. ### Function Signature ```go func NewWithString(ja3 string) (*JA3Client, error) ``` ### Parameters * **ja3** (string) - The JA3 signature string. ``` -------------------------------- ### Create HTTP Transport with JA3 and TLS Config Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates an http.Transport object with a specified JA3 signature and a custom tls.Config. This allows for more granular control over TLS settings. ```go func NewTransportWithConfig(ja3 string, config *tls.Config) (*http.Transport, error) ``` -------------------------------- ### JA3Client.Do Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Sends an HTTP request using the JA3Client, following configured policies. ```APIDOC ## JA3Client.Do ### Description Do sends an HTTP request and returns an HTTP response, following policy (such as redirects, cookies, auth) as configured on the client. ### Method Signature ```go func (c *JA3Client) Do(req *http.Request) (*http.Response, error) ``` ### Parameters * **req** (*http.Request) - The HTTP request to send. ``` -------------------------------- ### Define Safari Browser JA3 Signature Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Defines a Browser struct with JA3 and UserAgent strings to mock Safari 604.1. This can be used to initialize a JA3Client. ```go var SafariAuto = Browser{ JA3: "771,4865-4866-4867-49196-49195-49188-49187-49162-49161-52393-49200-49199-49192-49191-49172-49171-52392-157-156-61-60-53-47-49160-49170-10,65281-0-23-13-5-18-16-11-51-45-43-10-21,29-23-24-25,0", UserAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1", } ``` -------------------------------- ### Define Browser Struct Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Defines the Browser struct, which holds the JA3 string and User-Agent string for a specific browser client. ```go type Browser struct { JA3 string UserAgent string } ``` -------------------------------- ### NewTransportWithConfig Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates an http.Transport object with a specified JA3 signature and TLS configuration. ```APIDOC ## NewTransportWithConfig ### Description Creates an http.Transport object given a utls.Config. ### Function Signature ```go func NewTransportWithConfig(ja3 string, config *tls.Config) (*http.Transport, error) ``` ### Parameters * **ja3** (string) - The JA3 signature string to mock. * **config** (*tls.Config) - The TLS configuration to use. ``` -------------------------------- ### Create HTTP Transport with JA3 Signature Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates an http.Transport that mocks a given JA3 signature for HTTPS connections. This is useful for simulating specific client behaviors. ```go func NewTransport(ja3 string) (*http.Transport, error) ``` -------------------------------- ### Define Chrome Browser JA3 Signature Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Defines a Browser struct with JA3 and UserAgent strings to mock Chrome 78. This can be used to initialize a JA3Client. ```go var ChromeAuto = Browser{ JA3: "769,47–53–5–10–49161–49162–49171–49172–50–56–19–4,0–10–11,23–24–25,0", UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36", } ``` -------------------------------- ### Perform HEAD Request with JA3Client Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP HEAD request to the specified URL using the JA3Client. This is useful for retrieving headers without the response body. ```go func (c *JA3Client) Head(url string) (resp *http.Response, err error) ``` -------------------------------- ### Perform POST Request with JA3Client Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP POST request to the specified URL with the given content type and request body using the JA3Client. ```go func (c *JA3Client) Post(url, contentType string, body io.Reader) (*http.Response, error) ``` -------------------------------- ### Implement Error Interface for ErrExtensionNotExist Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Implements the Error() method for the ErrExtensionNotExist type, providing a string representation of the error. ```go func (e ErrExtensionNotExist) Error() string ``` -------------------------------- ### JA3Client.Head Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP HEAD request to the specified URL using the JA3Client. ```APIDOC ## JA3Client.Head ### Description Head issues a HEAD to the specified URL. ### Method Signature ```go func (c *JA3Client) Head(url string) (resp *http.Response, err error) ``` ### Parameters * **url** (string) - The URL to send the HEAD request to. ``` -------------------------------- ### NewTransport Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Creates an http.Transport that mocks the given JA3 signature for HTTPS connections. ```APIDOC ## NewTransport ### Description Creates an http.Transport which mocks the given JA3 signature when HTTPS is used. ### Function Signature ```go func NewTransport(ja3 string) (*http.Transport, error) ``` ### Parameters * **ja3** (string) - The JA3 signature string to mock. ``` -------------------------------- ### JA3Client.Post Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP POST request to the specified URL using the JA3Client. ```APIDOC ## JA3Client.Post ### Description Post issues a POST to the specified URL. ### Method Signature ```go func (c *JA3Client) Post(url, contentType string, body io.Reader) (*http.Response, error) ``` ### Parameters * **url** (string) - The URL to send the POST request to. * **contentType** (string) - The content type of the request body. * **body** (io.Reader) - The request body. ``` -------------------------------- ### JA3Client Struct Definition Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Defines the JA3Client struct, which embeds http.Client and includes fields for tls.Config and Browser. It is used for making HTTP requests with JA3 fingerprinting. ```go type JA3Client struct { *http.Client Config *tls.Config Browser Browser } ``` -------------------------------- ### Perform Form POST Request with JA3Client Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP POST request with form data to the specified URL using the JA3Client. This is a convenience method for submitting form data. ```go func (c *JA3Client) PostForm(url string, data url.Values) (resp *http.Response, err error) ``` -------------------------------- ### JA3Client.PostForm Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues an HTTP POST request with form data using the JA3Client. ```APIDOC ## JA3Client.PostForm ### Description PostForm issues a POST to the specified URL. ### Method Signature ```go func (c *JA3Client) PostForm(url string, data url.Values) (resp *http.Response, err error) ``` ### Parameters * **url** (string) - The URL to send the POST request to. * **data** (url.Values) - The form data to send. ``` -------------------------------- ### Send HTTP Request with JA3Client Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Sends an HTTP request using the JA3Client, respecting configured policies like redirects and cookies. This method is the core for making requests with JA3 fingerprinting. ```go func (c *JA3Client) Do(req *http.Request) (*http.Response, error) ``` -------------------------------- ### JA3Client.PostForm Source: https://pkg.go.dev/github.com/CUCyber/ja3transport Issues a POST to the specified URL, with data's keys and values URL-encoded as the request body. ```APIDOC ## PostForm ### Description Issues a POST to the specified URL, with data's keys and values URL-encoded as the request body. ### Method POST ### Endpoint [URL provided as argument] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **data** (url.Values) - Required - URL-encoded form data. ### Request Example ```go import ( "net/url" "github.com/cucyber/ja3transport" ) client := ja3transport.NewJA3Client() data := url.Values{} data.Set("key1", "value1") data.Set("key2", "value2") resp, err := client.PostForm("http://example.com/submit", data) ``` ### Response #### Success Response (200) - **resp** (*http.Response) - The HTTP response from the server. - **err** (error) - An error if the request failed. #### Response Example (Standard http.Response structure) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.