Giter Site home page Giter Site logo

imangomah / elex-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wizzwallet/elex-proxy

0.0 0.0 0.0 76 KB

EleX Proxy is a lightweight Rust implementation designed to proxy communication with the Atomicals ElectrumX server.

License: MIT License

Rust 100.00%

elex-proxy's Introduction

EleX Proxy ( English | 中文文档 )

GitHub release (with filter) License

EleX Proxy is a lightweight Rust implementation designed to proxy communication with Atomicals ElectrumX servers. The project aims to provide a simple and efficient solution for handling ElectrumX requests.

Installation

  1. Open the GitHub Releases page to download the latest version.
  2. Download the compressed package for your platform.
  3. Extract and run the executable file.

Configuration

Create a file named .env in the project's root directory with the following content:

# Host and port the proxy server listens on
PROXY_HOST=0.0.0.0:12321
# Default wss://electrumx.atomicals.xyz:50012, comma-separated for multiple servers
ELECTRUMX_WSS=wss://electrumx.atomicals.xyz:50012
# Default 1, add 1 allowed access every xx seconds
# IP_LIMIT_PER_SECOND=1
# Default 10, add 1 allowed access every xx milliseconds
IP_LIMIT_PER_MILLS=1
# Default 10, if this value is used up, new access will be limited.
IP_LIMIT_BURST_SIZE=10
# Default 1, concurrently running ws instances, can improve throughput, set as needed
ELECTRUMX_WS_INSTANCE=5
# Default 500, maximum concurrent connections
CONCURRENCY_LIMIT=500
# Default 10, timeout for receiving WebSocket messages
RESPONSE_TIMEOUT=10
RUST_LOG=info

Adjust these values as needed. Here's a brief explanation of the configuration parameters:

  • PROXY_HOST: Host and port the proxy server listens on.
  • ELECTRUMX_WSS: ElectrumX servers to connect to. Comma-separated for multiple servers.
  • IP_LIMIT_PER_SECOND: Add 1 allowed access every xx seconds.
  • IP_LIMIT_PER_MILLS: Add 1 allowed access every xx milliseconds.
  • IP_LIMIT_BURST_SIZE: If this value is used up, new access will be limited.
  • ELECTRUMX_WS_INSTANCE: Concurrently running ws instances, can improve throughput, set as needed.
  • CONCURRENCY_LIMIT: Maximum allowed concurrent connections.
  • RESPONSE_TIMEOUT: Timeout for receiving WebSocket messages.
  • RUST_LOG: Log level for Rust logging framework. Options include trace, debug, info, warn, and error.

Usage

Once the proxy server is running, it will forward ElectrumX requests to the specified server. If multiple servers are configured, it will switch to the next server after one server disconnects. Clients can connect to the configured PROXY_HOST.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Note: It is recommended to review and customize the configuration according to your specific requirements.

elex-proxy's People

Contributors

iota9star avatar

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.