Skip to content

support for TLS in TLS Warning #8

@KRRT7

Description

@KRRT7

using aiohttp with an http proxy with an https request shows an
path\to\venv\Lib\site-packages\aiohttp\connector.py:899: RuntimeWarning: An HTTPS request is being sent through an HTTPS proxy. This support for TLS in TLS is known to be disabled in the stdlib asyncio. This is why you'll probably see an error in the log below.
this warning only shows when i install the winloop event policy

import winloop
import aiohttp
import asyncio


async def make_request():
    async with aiohttp.ClientSession() as session:
        async with session.get("https://www.google.com", proxy="http://ip:port") as response:
            print(response.status)


if __name__ == "__main__":
    winloop.install()
    asyncio.run(make_request())

if i comment out the winloop.install() then i don't get the error with the same code
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions