ptbcontrib icon indicating copy to clipboard operation
ptbcontrib copied to clipboard

Feat: Add socks

Open Poolitzer opened this issue 1 month ago • 2 comments

I didn't write the tests yet, I couldn't find them immediately in PTB and I really should do smth else now.

Poolitzer avatar Nov 13 '25 16:11 Poolitzer

I deployed the aiohttpSocks branch to my real application on Square Cloud, and it is working perfectly!

I saw in the aiohttp-socks documentation that they recommend special exception handling for ProxyConnectionError and ProxyTimeoutError (checking e.cause). Would it be worth adding this to the do_request method for more robust proxy error reporting?

https://pypi.org/project/aiohttp-socks/

joaoemanoelaho avatar Nov 13 '25 23:11 joaoemanoelaho

I think that should propagate correctly? We have the two excepts there because we raise different errors, but these you should be able to expect just like in the example

Poolitzer avatar Nov 15 '25 16:11 Poolitzer