UNPKG

@jeembo/cycletls

Version:

Spoof TLS/JA3 fingerprint in JS with help from Go

52 lines (51 loc) 1.31 kB
export interface InitOptions { port?: number; debug?: boolean; workers?: number; } export declare type AllowedMethods = 'head' | 'get' | 'post' | 'put' | 'delete' | 'trace' | 'options' | 'connect' | 'patch'; export interface CycleTLSClient { (url: string, options: CycleTLSRequestOptions, method?: AllowedMethods): Promise<CycleTLSResponse>; exit(): Promise<undefined>; } export interface Cookie { name: string; value: string; path?: string; domain?: string; expires?: string; rawExpires?: string; maxAge?: number; secure?: boolean; httpOnly?: boolean; sameSite?: string; unparsed?: string; } export interface CycleTLSRequestOptions { url?: string; headers?: { [key: string]: any; }; cookies?: Array<object> | { [key: string]: string; }; body?: string; ja3?: string; userAgent?: string; proxy?: string; timeout?: number; disableRedirect?: boolean; headerOrder?: string[]; method?: AllowedMethods; } export interface CycleTLSResponse { status: number; body: string | { [key: string]: any; }; headers: { [key: string]: any; }; } declare const initCycleTLS: (initOptions: InitOptions) => Promise<CycleTLSClient>; export default initCycleTLS;