Skip to main content

A library for using HTTP and SOCKS5 proxies with solana clients

Project description

solana-proxy

Telegram channel

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solana_proxy-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

solana_proxy-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file solana_proxy-0.1.0.tar.gz.

File metadata

  • Download URL: solana_proxy-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for solana_proxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a53e3dd1ead8b7bba3b10a6a7546c258dd6b2f58e9b2bc44ef7b882b8061c790
MD5 3e999d826b8a010a98fcac67e1b981ca
BLAKE2b-256 4b6d9f92c85eff13d0dbde7298e1ffc07cfe2f29c513c65e4bf3214375408f48

See more details on using hashes here.

File details

Details for the file solana_proxy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: solana_proxy-0.1.0-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

Hashes for solana_proxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0508b16c96d2ca371b2fa2654d861212fb9162d8a1affa34b94785a2db670872
MD5 b9901d19165d2b1e7e4a17d8464ac807
BLAKE2b-256 e1844c6bd588a9f5f9eab6324ac324bcda0846ee15e8c0c875a39ad571d6eb91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page