it would be nice to have outgoing proxy support
This is surprisingly hard to do with h2, which this project uses.
It's easy with httpx.
Maybe I’m a bit late to the party, but I’ve made proof of concept for basic HTTP-proxies.
In a nutshell there’s a HttpProxyProtocol (https://github.com/chrigu/aioapns/blob/feature/http-proxy/aioapns/connection.py#L594) that sets up the connection to the proxy and then initiates the connection to the APNs host using the existing APNsClientProtocols.
As mentioned, it’s still work in progress (it needs types, more error handling and some refactoring). @Fatal1ty Before I start with a PR, could you please have a look and point out any improvements or obvious things that could lead to errors? Thanks!
Maybe I’m a bit late to the party, but I’ve made proof of concept for basic HTTP-proxies.
In a nutshell there’s a HttpProxyProtocol (https://github.com/chrigu/aioapns/blob/feature/http-proxy/aioapns/connection.py#L594) that sets up the connection to the proxy and then initiates the connection to the APNs host using the existing APNsClientProtocols.
As mentioned, it’s still work in progress (it needs types, more error handling and some refactoring). @Fatal1ty Before I start with a PR, could you please have a look and point out any improvements or obvious things that could lead to errors? Thanks!
My only wish is that you check on your own that the proxy connection will work. There are no tests in the repository, so that's the only way. Regardless, your implementation looks simple and straightforward. Sorry for the late response, I’m looking forward to the PR!
My only wish is that you check on your own that the proxy connection will work. There are no tests in the repository, so that's the only way. Regardless, your implementation looks simple and straightforward. Sorry for the late response, I’m looking forward to the PR!
Thanks for looking at it! I saw some smaller issues that I need to take care of before I'll make a PR. Maybe I'll make another PR with some tests, but then you decide if you wanted to introduce pytest in the library for testing.
Proxy support was added in #65
v3.3 is out: https://github.com/Fatal1ty/aioapns/releases/tag/v3.3