-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FCM API Credential refresh mechanism doesn't support HTTP proxies and blocks the event loop #371
Comments
aiohttp supports proxies: https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support as does HTTPX, which sounds like it could be the next big thing in Python, or maybe that's just some inflated hype — would need consideration: https://www.python-httpx.org/ (Either of these would probably be preferable to us hacking our own CONNECT proxy support into Twisted and asyncio using two similar but different bits of code. Realistically it doesn't make that much sense for us to be using Twisted in Sygnal anymore) |
The google-auth lib seems to support a custom To my understanding we can replace an urllib3 I guess it would be the straightest way to support a proxy here, what do you think ? |
Oh urllib3 is blocking, but it seems we are using the We can also customize the requests |
google-auth has an aiohttp backend even if it seems undocumented. And it seems that it can support a custom Session which easily supports a proxy, so we may have an easy-ish async way forward. |
To be clear so we don't double the work, we need proxy support on our deploy so I am currently working on that, I should be able to send a PR this week. |
title says it all: it doesn't look like we support HTTP proxies here and given no
await
I suspect this also blocks the event loop:sygnal/sygnal/gcmpushkin.py
Line 480 in c025ac1
The text was updated successfully, but these errors were encountered: