### Install TLS-Client (Go) Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/installation-and-quick-usage Instructions for installing the TLS-Client library in Go using go get. It also provides a troubleshooting tip for users experiencing issues with `go get -u`. ```go go get -u github.com/bogdanfinn/tls-client // or specific version: // go get github.com/bogdanfinn/tls-client@v1.7.2 ``` -------------------------------- ### Quick Usage Example (Go) Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/installation-and-quick-usage A basic example demonstrating how to use the TLS-Client in Go to make an HTTP GET request. It shows how to configure the client with options like timeout, client profile, redirect handling, and cookie jar. ```go package main import ( "fmt" "io" "log" http "github.com/bogdanfinn/fhttp" "github.com/bogdanfinn/tls-client/profiles" tls_client "github.com/bogdanfinn/tls-client" ) func main() { jar := tls_client.NewCookieJar() op tions := []tls_client.HttpClientOption{ tls_client.WithTimeoutSeconds(30), tls_client.WithClientProfile(profiles.Chrome_120), tls_client.WithNotFollowRedirects(), tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument //tls_client.WithProxyUrl("http://user:pass@host:port"), //tls_client.WithInsecureSkipVerify(), } client, err := tls_client.NewHttpClient(tls_client.NewNoopLogger(), options...) if err != nil { log.Println(err) return } req, err := http.NewRequest(http.MethodGet, "https://tls.peet.ws/api/all", nil) if err != nil { log.Println(err) return } req.Header = http.Header{ "accept": {"*/*"}, "accept-language": {"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7"}, "user-agent": {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"}, http.HeaderOrderKey: { "accept", "accept-language", "user-agent", }, } resp, err := client.Do(req) if err != nil { log.Println(err) return } defer resp.Body.Close() log.Println(fmt.Sprintf("status code: %d", resp.StatusCode)) readBytes, err := io.ReadAll(resp.Body) if err != nil { log.Println(err) return } log.Println(string(readBytes)) } ``` -------------------------------- ### NodeJS Examples for Open Source Oasis Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript/examples Provides various examples for interacting with the Open Source Oasis using NodeJS. Covers GET, POST, file uploads/downloads, asynchronous requests, custom clients, cookie usage, and FFI integration. ```NodeJS /* Examples for Open Source Oasis in NodeJS. Located in: cffi_dist/example_node/ Use cases: - GET Request - POST Request - Image Download - Image Upload - Async Request - Custom Client - Use Cookies - Use ffi-rs instead of ffi-napi */ // Example: GET Request (Conceptual) // const oasis = require('open-source-oasis'); // oasis.get('https://example.com/data').then(response => { // console.log(response.body); // }).catch(error => { // console.error('Error:', error); // }); // Example: POST Request (Conceptual) // const data = { key: 'value' }; // oasis.post('https://example.com/submit', { body: data }).then(response => { // console.log('Success:', response.statusCode); // }).catch(error => { // console.error('Error:', error); // }); ``` -------------------------------- ### C# Examples for Shared Library Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/c/examples Provides examples for loading and defining the shared library in C#. These examples are located in the `cffi_dist/example_csharp/` directory within the repository. ```C# // Example C# code for loading and defining the shared library // Located in: cffi_dist/example_csharp/ ``` -------------------------------- ### C# Examples for Shared Library Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/c Provides examples of how to use the Open Source Oasis Shared Library with C#. ```C# // Placeholder for C# examples related to the Shared Library. // This section would typically contain code demonstrating: // - Initialization of the library // - Usage of exposed methods // - Handling of payloads and responses // - Integration with other C# applications // Example structure: /* public class SharedLibraryExample { public static void Main(string[] args) { // Initialize the library // Call exposed methods // Process results } } */ ``` -------------------------------- ### TypeScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/typescript/examples Examples demonstrating GET requests and asynchronous requests using TypeScript. These examples focus on correct type definitions and usage within the Open Source Oasis framework. ```TypeScript // Examples for GET Request and Async Request can be found in the repository: cffi_dist/example_typescript/ ``` -------------------------------- ### Python Examples for Open Source Oasis Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/python/examples Provides examples for various use cases including GET and POST requests, image download and upload, async requests, custom clients, and cookie usage within the Open Source Oasis Python library. ```Python import requests # Example: GET Request response = requests.get('https://api.example.com/data') print(response.json()) # Example: POST Request payload = {'key': 'value'} response = requests.post('https://api.example.com/submit', json=payload) print(response.status_code) # Example: Image Download response = requests.get('https://example.com/image.jpg', stream=True) with open('image.jpg', 'wb') as f: for chunk in response.iter_content(chunk_size=8192): f.write(chunk) # Example: Image Upload files = {'file': open('image.jpg', 'rb')} response = requests.post('https://api.example.com/upload', files=files) print(response.text) # Example: Async Request (using a hypothetical async library) # import asyncio # async def fetch_data(): # async with httpx.AsyncClient() as client: # response = await client.get('https://api.example.com/data') # print(response.json()) # asyncio.run(fetch_data()) # Example: Custom Client (hypothetical) # from oasis_client import OasisClient # client = OasisClient(base_url='https://api.example.com', api_key='YOUR_API_KEY') # data = client.get_data() # print(data) # Example: Use Cookies # from oasis_client import OasisClient # client = OasisClient() # client.set_cookie('sessionid', 'your_session_id') # response = client.get('https://example.com/protected') # print(response.text) ``` -------------------------------- ### Standalone API Application: Configuration & Start Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/downloads Guidance on configuring and starting the standalone API application. ```APIDOC Standalone API Application: Configuration & Start: - Details on how to configure and launch the standalone API application. ``` -------------------------------- ### Standalone API Application - Download and Configuration Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/download Guide to downloading the Standalone API Application binaries for Linux, macOS, and Windows. It explains how to configure the application using the `config.dist.yml` file and start the service, along with details on endpoints, defaults, payload, and response handling. ```YAML config.dist.yml ``` -------------------------------- ### Shared Library C# Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Code examples demonstrating the usage of the shared library with C#. ```C# // C# examples for Shared Library usage would go here. ``` -------------------------------- ### Shared Library JavaScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Code examples demonstrating the usage of the shared library with JavaScript. ```JavaScript // JavaScript examples for Shared Library usage would go here. ``` -------------------------------- ### Shared Library: C# Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/payload Code examples demonstrating the usage of the shared library with C#. ```C# // C# Example Usage // using SharedLibrary; // var instance = new SomeClass(); // instance.SomeMethod(); ``` -------------------------------- ### Shared Library Python Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Code examples demonstrating the usage of the shared library with Python. ```Python # Python examples for Shared Library usage would go here. ``` -------------------------------- ### Shared Library C# Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/supported-and-tested-client-profiles Provides examples for using the Shared Library's exposed methods in C#. ```C# // C# Examples // ... (code examples would go here) ``` -------------------------------- ### TLS-Client Documentation Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript Details on supported client profiles, installation, quick usage, client options, cookiejar, defaults, request headers, pseudo header order, proxies, certificate pinning, response body encoding/decoding, custom client profiles, and examples. ```APIDOC TLS-Client: Supported Client Profiles: Details on various client profiles supported and tested. Installation & Quick Usage: Instructions for setting up and starting with the client. Client Options: Configuration parameters for customizing client behavior. Cookiejar: Management of cookies. Defaults: Default settings for the client. Request Headers: Handling of request headers. Pseudo Header Order: Specification of pseudo header order. Proxies: Configuration for using proxy servers. Certificate Pinning: Implementation of certificate pinning for security. Response Body Encoding / Decoding: Handling of response body encoding and decoding. Custom Client Profile: Creating and using custom client profiles. Examples: Practical examples demonstrating client usage. ``` -------------------------------- ### Shared Library: JavaScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/payload Code examples demonstrating the usage of the shared library with JavaScript. ```JavaScript // JavaScript Example Usage // const lib = require('shared-library'); // lib.someMethod(); ``` -------------------------------- ### TLS-Client: Installation & Usage Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/downloads Provides information on installing and quickly using the TLS-Client, including supported client profiles and various configuration options. ```APIDOC TLS-Client: Installation & Quick Usage: - 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 Python Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/supported-and-tested-client-profiles Provides examples for using the Shared Library's exposed methods in Python. ```Python # Python Examples # ... (code examples would go here) ``` -------------------------------- ### Shared Library JavaScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/supported-and-tested-client-profiles Provides examples for using the Shared Library's exposed methods in JavaScript. ```JavaScript // JavaScript Examples // ... (code examples would go here) ``` -------------------------------- ### JavaScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/typescript/examples General examples for using the Open Source Oasis shared library with JavaScript. ```JavaScript // General JavaScript examples are available in the repository. ``` -------------------------------- ### Shared Library: Python Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/payload Code examples demonstrating the usage of the shared library with Python. ```Python # Python Example Usage # import shared_library # shared_library.some_method() ``` -------------------------------- ### C# Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/typescript/examples Examples demonstrating the usage of the Open Source Oasis shared library with C#. ```C# // Examples for C# can be found in the repository. ``` -------------------------------- ### Shared Library TypeScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Code examples demonstrating the usage of the shared library with TypeScript. ```TypeScript // TypeScript examples for Shared Library usage would go here. ``` -------------------------------- ### TLS-Client: Supported Client Profiles and Usage Source: https://bogdanfinn.gitbook.io/open-source-oasis/antibots-and-captchas Details on supported and tested client profiles for the TLS-Client, including installation, quick usage, client options, cookiejar, defaults, request headers, pseudo header order, proxies, certificate pinning, response body encoding/decoding, custom client profiles, and examples. ```APIDOC TLS-Client Documentation: Overview: The TLS-Client is a tool designed to mimic specific client profiles for various web scraping and automation tasks. Key Features: - Supported and Tested Client Profiles: Mimics a wide range of browser and device profiles. - Installation & Quick Usage: Guides for setting up and starting with the TLS-Client. - Client Options: Configuration for various client behaviors. - Cookiejar: Manages cookies across requests. - Defaults: Default settings for client behavior. - Request Headers: Customization of HTTP request headers. - Pseudo Header Order: Control over the order of pseudo-headers. - Proxies: Support for proxy configurations. - Certificate Pinning: Securely pinning SSL certificates. - Response Body Encoding / Decoding: Handling of response content encoding. - Custom Client Profile: Ability to define unique client profiles. - Examples: Practical examples demonstrating the usage of TLS-Client features. ``` -------------------------------- ### Support and Community Resources Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Guidance on how to get support, including frequently asked questions, error troubleshooting, and community support channels. -------------------------------- ### Shared Library: TypeScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/payload Code examples demonstrating the usage of the shared library with TypeScript. ```TypeScript // TypeScript Example Usage // import * as lib from 'shared-library'; // lib.someMethod(); ``` -------------------------------- ### How to Get Support Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/downloads Information on how to obtain support, including frequently asked questions and community support channels. ```APIDOC How to get support: - Frequently Asked Questions / Errors - Community Support ``` -------------------------------- ### Shared Library TypeScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/supported-and-tested-client-profiles Provides examples for using the Shared Library's exposed methods in TypeScript. ```TypeScript // TypeScript Examples // ... (code examples would go here) ``` -------------------------------- ### Python Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/typescript/examples Examples demonstrating the usage of the Open Source Oasis shared library with Python. ```Python # Examples for Python can be found in the repository. ``` -------------------------------- ### JavaScript Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript Code examples demonstrating the usage of the shared library within a JavaScript environment. ```JavaScript // JavaScript Example Placeholder // console.log('Shared Library Usage Example'); ``` -------------------------------- ### C# Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript Code examples demonstrating the usage of the shared library within a C# environment. ```C# // C# Example Placeholder // Console.WriteLine("Shared Library Usage Example"); ``` -------------------------------- ### Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/defaults Provides examples for using the Shared Library across different programming languages. ```JavaScript Examples: // JavaScript examples for Shared Library usage ``` ```Python Examples: # Python examples for Shared Library usage ``` ```TypeScript Examples: // TypeScript examples for Shared Library usage ``` ```C# Examples: // C# examples for Shared Library usage ``` -------------------------------- ### Python Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript Code examples demonstrating the usage of the shared library within a Python environment. ```Python # Python Example Placeholder # print('Shared Library Usage Example') ``` -------------------------------- ### TypeScript Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript Code examples demonstrating the usage of the shared library within a TypeScript environment. ```TypeScript // TypeScript Example Placeholder // console.log('Shared Library Usage Example'); ``` -------------------------------- ### Shared Library - JavaScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/examples Provides examples for using the Shared Library with JavaScript, demonstrating its functionalities and integration. ```JavaScript // Example usage of the Shared Library in JavaScript // (Specific implementation details would depend on the library's API) // Assuming a function like 'processData' is exposed: // const result = sharedLibrary.processData({ key: 'value' }); // console.log(result); ``` -------------------------------- ### Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library Provides examples for using the Shared Library with various programming languages, including JavaScript, Python, TypeScript, and C#. ```JavaScript /* JavaScript Example Usage */ // Assuming 'sharedLibrary' is imported or available globally // Example: Calling an exposed method // const result = sharedLibrary.someMethod(arg1, arg2); // console.log(result); ``` ```Python # Python Example Usage # Assuming 'shared_library' is imported # Example: Calling an exposed method # result = shared_library.some_method(arg1, arg2) # print(result) ``` ```TypeScript // TypeScript Example Usage // Assuming 'sharedLibrary' is imported // Example: Calling an exposed method // const result: any = sharedLibrary.someMethod(arg1, arg2); // console.log(result); ``` ```C# // C# Example Usage // Assuming 'SharedLibrary' is instantiated or available // Example: Calling an exposed method // var result = SharedLibrary.SomeMethod(arg1, arg2); // Console.WriteLine(result); ``` -------------------------------- ### Standalone API Application Configuration and Endpoints Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Information on configuring and starting the standalone API application, including details on its endpoints, defaults, payload, and response handling. -------------------------------- ### C# Shared Library Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/python Examples demonstrating the usage of the Shared Library in C#. This section covers various functionalities and how to integrate them into C# projects. ```C# // Example usage of the Shared Library in C# // (Specific examples would be detailed here) System.Console.WriteLine("C# Shared Library examples"); ``` -------------------------------- ### Shared Library - C# Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/examples Provides examples for using the Shared Library with C#, demonstrating its functionalities and integration. ```C# // Example usage of the Shared Library in C# // (Specific implementation details would depend on the library's API) // Assuming a class like 'SharedLibrary' with a method 'ProcessData' is exposed: // using SharedLibrary; // var lib = new SharedLibrary(); // var result = lib.ProcessData(new { key = "value" }); // Console.WriteLine(result); ``` -------------------------------- ### C# Examples for Shared Library Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/typescript Provides examples for using the Shared Library with C#. This section details how to integrate and utilize the library's functionalities within a C# environment. ```C# // Example usage of the Shared Library in C# // (Specific code examples would be detailed here) System.Console.WriteLine("C# Shared Library Example"); ``` -------------------------------- ### Standalone API Application Download and Build Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/defaults Instructions for downloading and building the standalone API application from source. -------------------------------- ### TLS-Client Supported Profiles Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/response Details supported and tested client profiles for the TLS-Client, including installation, quick usage, client options, cookiejar, defaults, request headers, pseudo header order, proxies, certificate pinning, response body encoding/decoding, custom client profiles, and examples. ```APIDOC 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 ``` -------------------------------- ### TLS-Client: Supported Profiles and Usage Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/custom-client-profile Details supported and tested client profiles for TLS-Client, including installation, quick usage, client options, cookiejar, defaults, request headers, pseudo header order, proxies, certificate pinning, response body encoding/decoding, custom client profiles, and examples. ```APIDOC 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 ``` -------------------------------- ### TLS-Client Supported Profiles and Usage Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/download Details supported and tested client profiles for TLS-Client, including installation, quick usage, client options, cookiejar management, default settings, request headers, proxy configurations, certificate pinning, response body encoding/decoding, custom client profiles, and usage examples. -------------------------------- ### Support and Further Information Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/response Guidance on how to get support, including frequently asked questions/errors and community support. Also provides information on further topics like Antibots & Captchas and Community Projects. ```APIDOC How to get support: Frequently Asked Questions / Errors Community Support Further Information Antibots & Captchas Community Projects ``` -------------------------------- ### Standalone API Application: Download and Build Source: https://bogdanfinn.gitbook.io/open-source-oasis/standalone-api-application/payload Instructions for downloading and building the standalone API application from source. ```APIDOC Standalone API Application: Download: - Where to download the application. Build from source: - Guide to compiling the application from source code. ``` -------------------------------- ### Shared Library: Build from Source Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/downloads Instructions for building the shared library from source code. ```APIDOC Shared Library: Build from source: - Instructions for compiling the shared library from its source code. ``` -------------------------------- ### Support and Community Resources Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/custom-client-profile Guidance on how to get support, including frequently asked questions, common errors, and community support channels. It also points to further information and community projects. ```APIDOC How to get support: Frequently Asked Questions / Errors Community Support Further Information Antibots & Captchas Community Projects ``` -------------------------------- ### Standalone API Application Documentation Source: https://bogdanfinn.gitbook.io/open-source-oasis/shared-library/javascript Guidance on the standalone API application, covering downloads, building from source, configuration, start-up, endpoints, defaults, payload, and response handling. ```APIDOC Standalone API Application: Download: Instructions for downloading the application. Build from source: Steps to build the application from its source code. Configuration & Start: How to configure and launch the application. Endpoints: Description of the available API endpoints. Defaults: Default settings for the API application. Attention: Important notes and considerations. Payload: Details on the expected request payload format. Response: Information about the API response structure. ``` -------------------------------- ### Go TLS-Client Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/examples Demonstrates various use cases for the TLS-Client in Go, including GET/POST requests, proxy rotation, custom client profiles, SSL pinning, and file downloads. ```Go package main import ( "fmt" "io" "net/http" "os" ) func main() { // Example: GET Request resp, err := http.Get("https://example.com") if err != nil { fmt.Printf("Error making GET request: %v\n", err) return } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { fmt.Printf("Error reading response body: %v\n", err) return } fmt.Println("GET Request Response:") fmt.Println(string(body)) // Example: Downloading Image / Files fileURL := "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" fileName := "googlelogo.png" file, err := os.Create(fileName) if err != nil { fmt.Printf("Error creating file: %v\n", err) return } defer file.Close() fileResp, err := http.Get(fileURL) if err != nil { fmt.Printf("Error downloading file: %v\n", err) return } defer fileResp.Body.Close() _, err = io.Copy(file, fileResp.Body) if err != nil { fmt.Printf("Error saving file: %v\n", err) return } fmt.Printf("Successfully downloaded %s\n", fileName) } ``` -------------------------------- ### Shared Library - TypeScript Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/examples Provides examples for using the Shared Library with TypeScript, demonstrating its functionalities and integration. ```TypeScript // Example usage of the Shared Library in TypeScript // (Specific implementation details would depend on the library's API) // Assuming a function like 'processData' is exposed: // import { SharedLibrary } from 'shared-library'; // const lib = new SharedLibrary(); // const result = lib.processData({ key: 'value' }); // console.log(result); ``` -------------------------------- ### Shared Library - Python Examples Source: https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/examples Provides examples for using the Shared Library with Python, demonstrating its functionalities and integration. ```Python # Example usage of the Shared Library in Python # (Specific implementation details would depend on the library's API) # Assuming a function like 'process_data' is exposed: # import shared_library # result = shared_library.process_data({'key': 'value'}) # print(result) ```