### Installing Python-TLS-Client Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Command to install the Python-TLS-Client library using pip. ```bash pip install tls-client ``` -------------------------------- ### Using Python-TLS-Client with Preset Identifier Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Demonstrates how to create a TLS client session using a predefined client identifier (like Chrome 112) and make a GET request with headers and a proxy. ```python import tls_client # You can also use the following as `client_identifier`: # Chrome --> chrome_103, chrome_104, chrome_105, chrome_106, chrome_107, chrome_108, chrome109, Chrome110, # chrome111, chrome112, chrome_116_PSK, chrome_116_PSK_PQ, chrome_117, chrome_120 # Firefox --> firefox_102, firefox_104, firefox108, Firefox110, firefox_117, firefox_120 # Opera --> opera_89, opera_90 # Safari --> safari_15_3, safari_15_6_1, safari_16_0 # iOS --> safari_ios_15_5, safari_ios_15_6, safari_ios_16_0 # iPadOS --> safari_ios_15_6 # Android --> okhttp4_android_7, okhttp4_android_8, okhttp4_android_9, okhttp4_android_10, okhttp4_android_11, # okhttp4_android_12, okhttp4_android_13 # # more client identifiers can be found in settings.py session = tls_client.Session( client_identifier="chrome112", random_tls_extension_order=True ) res = session.get( "https://www.example.com/", headers={ "key1": "value1", }, proxy="http://user:password@host:port" ) ``` -------------------------------- ### Packaging Python-TLS-Client with Pyinstaller (Windows) Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Pyinstaller command to include the necessary TLS client binary dependency for Windows systems when packaging the application. ```bash --add-binary '{path_to_library}/tls_client/dependencies/tls-client-64.dll;tls_client/dependencies' ``` -------------------------------- ### Packaging Python-TLS-Client with Pyinstaller (Linux x86) Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Pyinstaller command to include the necessary TLS client binary dependency for Linux x86 systems when packaging the application. ```bash --add-binary '{path_to_library}/tls_client/dependencies/tls-client-x86.so:tls_client/dependencies' ``` -------------------------------- ### Packaging Python-TLS-Client with Pyinstaller (Linux Alpine AMD64) Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Pyinstaller command to include the necessary TLS client binary dependency for Linux Alpine AMD64 systems when packaging the application. ```bash --add-binary '{path_to_library}/tls_client/dependencies/tls-client-amd64.so:tls_client/dependencies' ``` -------------------------------- ### Packaging Python-TLS-Client with Pyinstaller (MacOS M2) Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Pyinstaller command to include the necessary TLS client binary dependency for MacOS M2 systems when packaging the application. ```bash --add-binary '{path_to_library}/tls_client/dependencies/tls-client-arm64.dylib:tls_client/dependencies' ``` -------------------------------- ### Packaging Python-TLS-Client with Pyinstaller (MacOS M1/older) Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Pyinstaller command to include the necessary TLS client binary dependency for MacOS M1 and older systems when packaging the application. ```bash --add-binary '{path_to_library}/tls_client/dependencies/tls-client-x86.dylib:tls_client/dependencies' ``` -------------------------------- ### Using Python-TLS-Client with Custom TLS Parameters Source: https://github.com/florianregaz/python-tls-client/blob/master/README.md Shows how to configure a TLS client session with detailed custom parameters like JA3 string, H2 settings, signature algorithms, and make a POST request with headers and JSON data. ```python import tls_client session = tls_client.Session( ja3_string="771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513,29-23-24,0", h2_settings={ "HEADER_TABLE_SIZE": 65536, "MAX_CONCURRENT_STREAMS": 1000, "INITIAL_WINDOW_SIZE": 6291456, "MAX_HEADER_LIST_SIZE": 262144 }, h2_settings_order=[ "HEADER_TABLE_SIZE", "MAX_CONCURRENT_STREAMS", "INITIAL_WINDOW_SIZE", "MAX_HEADER_LIST_SIZE" ], supported_signature_algorithms=[ "ECDSAWithP256AndSHA256", "PSSWithSHA256", "PKCS1WithSHA256", "ECDSAWithP384AndSHA384", "PSSWithSHA384", "PKCS1WithSHA384", "PSSWithSHA512", "PKCS1WithSHA512", ], supported_versions=["GREASE", "1.3", "1.2"], key_share_curves=["GREASE", "X25519"], cert_compression_algo="brotli", pseudo_header_order=[ ":method", ":authority", ":scheme", ":path" ], connection_flow=15663105, header_order=[ "accept", "user-agent", "accept-encoding", "accept-language" ] ) res = session.post( "https://www.example.com/", headers={ "key1": "value1", }, json={ "key1": "key2" } ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.