-
Notifications
You must be signed in to change notification settings - Fork 286
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
Adding proxies #424
Comments
Master is safe. But what do you mean by proxy? |
Requests are made through a rotating proxy service. Common method to get around overly stringent rate limits. Solana mainnet allows 10 RPC calls per second. Each proxy IP is a multiplier of that. |
Oh. Like fallback endpoints? |
In this case, the client is passing requests through a proxy, in order to mask the original source. Let's use ProxyMesh as an example. Solana itself restricts RPC calls to 10 per second. Using ProxyMesh, I could use something like xxxx.proxymesh.com:1234, passing all my requests through a proxy first, and in turn have access to 10|20|50|100 distinct IPs making the requests for me. Other crypto libraries, like ccxt, have something similar. Consider chart data. Binance does the most volume of any CEX, therefore its price data is the best better barometer for the market. If your country isn't served by Binance but you still want to make REST calls, you can either use a VPN or pass the requests through something like ProxyMesh. Note: Not an endorsement of ProxyMesh. It just happens to be the service I'm looking at right now. |
I do not think that should be added to this library. Perhaps you can start your own package and wrap the cc @kevinheavey, he may have thoughts. |
I can absolutely appreciate that perspective. |
Yeah agreed with @michaelhly. But do let us know if something about solana-py's design makes it unnecessarily difficult to add proxy support in a new library |
I believe it is very necessary to add the feature of using a proxy because there are firewalls in this world, and using a proxy can bypass them. What we need to do is add an argument in the init() and pass it to the httpx.Client(), very simple. I can make a PR if this modification is allowed. |
Feel free! I can include it in the next release! |
Here you go. |
@Jonney Released in 🎉 |
I'm going to take a stab at adding proxy support. Is it safe to start with master or should I use v0.34.0?
The text was updated successfully, but these errors were encountered: