qwj / python-proxy

HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
MIT License
1.93k stars 323 forks source link

HTTPS request #182

Open sdv75 opened 3 months ago

sdv75 commented 3 months ago

Helo. I have code

import asyncio, pproxy

async def test_tcp(proxy_uri):
    conn = pproxy.Connection(proxy_uri)
    reader, writer = await conn.tcp_connect('www.google.com', 443)
    writer.write(b'GET / HTTP/1.1\r\n\r\n')
    data = await reader.read(1024*16)
    print(data.decode())

asyncio.run(test_tcp('ss://aes-256-cfb:password@remote_host:remote_port'))

I want to make a request https to the 443 port. But I have an empty response. How can I make a request with https to the 403 port? Also, I am interested in requests to the SMTP server (SSL and STARTTLS)