Maximilian Blochberger added the comment:
Yes. There should be at least an explanation of this behaviour in the
documentation of the wrap_socket() function.
I would additionally raise an exception if wrap_socket() is called and a socket
is passed that is already wrapped. But I'm not sure
Maximilian Blochberger added the comment:
Okay, I see, thanks for the hint. That worked perfectly – I found
`asyncio.sslproto._SSLPipe` very useful for that purpose.
I personally consider the behaviour of `ssl.SSLContext.wrap_socket()`
unexpected and would raise an exception if that method
New submission from Maximilian Blochberger:
I have the following scenario: Client → Proxy → Target.
The following two scenarios are working perfectly fine:
1) Establishing a TLS-secured connection to the proxy and then tunnel traffic
through that connection to the target. This results