A library for using HTTP and SOCKS5 proxies with solana clients
Project description
solana-proxy
A library for using HTTP and SOCKS5 proxies with solana clients
The library provides Client and AsyncClient classes, which override the initialization of the original classes. Apart from these two classes, the library does not offer any additional features, and in all other cases, the original solana library, included as part of the installation package, should be used.
pip install solana-proxy
Depencies: solana, httpx, httpx-socks, proxystr
Simple usage
from solana_proxy import Client
RPC_URL = 'https://api.mainnet-beta.solana.com'
client = Client(RPC_URL, proxy='login:password@ip:port') # or 'socks5://login:password@ip:port'
client.is_connected()
...
client.close()
Client and AsyncClient take proxy in any popular format because they use proxystr lib. Also they take a Proxy obj from that lib.
Context manager
import asyncio
from solana_proxy import Client, AsyncClient
RPC_URL = 'https://api.mainnet-beta.solana.com'
PROXY = 'login:password@ip:port' # or 'socks5://login:password@ip:port'
with Client(RPC_URL, proxy=PROXY) as client:
client.is_connected()
async def is_connected():
async with AsyncClient(RPC_URL, proxy=PROXY) as client:
return await client.is_connected()
Support
Developed by MrSmith06: telegram | gtihub
If you find this project helpful, feel free to leave a tip!
- EVM address (metamask):
0x6201d7364F01772F8FbDce67A9900d505950aB99
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solana_proxy-0.1.1.tar.gz.
File metadata
- Download URL: solana_proxy-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf60e6a272faf6cb63ab41762f9811531731b3b4ec515d47fdbd736fab2fa669
|
|
| MD5 |
0c88123ab08fc6e78d79f7a889662385
|
|
| BLAKE2b-256 |
671fbfada8d0db3b108f7171e56eae19d9127da2cd0b7ffe2036544e9e624ee1
|
File details
Details for the file solana_proxy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: solana_proxy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7617b9f5846136005fae9f92348cde91c6fd7744b9fad0f7e577c0703eec7971
|
|
| MD5 |
1b67bbff344098373a2deba4deabcc9b
|
|
| BLAKE2b-256 |
d2868f7b76625246d6e13ac9c6d1d35da1b6707137fa51d765a69d2b2cd6c1d1
|