Giter Club home page Giter Club logo

Comments (5)

MatMaul avatar MatMaul commented on September 1, 2024 2

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.

from sygnal.

reivilibre avatar reivilibre commented on September 1, 2024

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)

from sygnal.

MatMaul avatar MatMaul commented on September 1, 2024

The google-auth lib seems to support a custom urllib3 pool: https://googleapis.dev/python/google-auth/latest/user-guide.html#urllib3

To my understanding we can replace an urllib3 PoolManager by a ProxyManager: https://urllib3.readthedocs.io/en/stable/advanced-usage.html#proxies

I guess it would be the straightest way to support a proxy here, what do you think ?

from sygnal.

MatMaul avatar MatMaul commented on September 1, 2024

Oh urllib3 is blocking, but it seems we are using the requests backend for now, which is also blocking, hence the fact that there is no await I think.

We can also customize the requests Session, and use a proxy there: https://docs.python-requests.org/en/latest/user/advanced/#proxies

from sygnal.

MatMaul avatar MatMaul commented on September 1, 2024

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.

from sygnal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.