[Python] How can I change the server name indication in a Python request?

Discussão em 'Python' iniciado por Stack, Julho 2, 2025.

  1. Stack

    Stack Membro Participativo

    I have been looking around the Internet, and have only been able to find solutions to set the SNI in other languages, but was not able to find a solution for Python.

    I want to be able to change the SNI for a standard Python request like this, but I am not sure if it is achievable

    import requests
    session = requests.session()
    response = session.get("https://www.google.com/")


    For example, the SNI for this request would show that the host is "www.google.com", however I would like to find a way to change that.

    Continue reading...

Compartilhe esta Página