Skip to content

Commit

Permalink
🔖 Release v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iota9star committed Dec 20, 2023
1 parent 7deedcf commit 9c0504d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 30 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ jobs:
name: elex-proxy-Darwin-aarch64.tar.gz
skip_tests: true
toolchain:
- stable
# - stable
# - beta
# - nightly
- nightly
steps:
- uses: actions/checkout@v3
- name: Cache cargo & target directories
Expand Down Expand Up @@ -129,26 +129,18 @@ jobs:
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi
cd -
if: |
matrix.toolchain == 'stable' &&
( startsWith( github.ref, 'refs/tags/v' ) ||
github.ref == 'refs/tags/test-release' )
if: startsWith( github.ref, 'refs/tags/v' )
- name: Publish release artifacts
uses: actions/upload-artifact@v3
with:
name: elex-proxy-${{ matrix.platform.os_name }}
path: "elex-proxy-*"
if: matrix.toolchain == 'stable' && github.ref == 'refs/tags/test-release'
- name: Generate SHA-256
run: shasum -a 256 ${{ matrix.platform.name }}
if: |
matrix.toolchain == 'stable' &&
matrix.platform.os == 'macOS-latest' &&
( startsWith( github.ref, 'refs/tags/v' ) ||
github.ref == 'refs/tags/test-release' )
if: matrix.platform.os == 'macOS-latest' && startsWith( github.ref, 'refs/tags/v' )
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "elex-proxy-*"
if: matrix.toolchain == 'stable' && startsWith( github.ref, 'refs/tags/v' )
if: startsWith( github.ref, 'refs/tags/v' )
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.2

- Add `/proxy/health`.

## 0.1.1

- Allowing without parameter.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "elex-proxy"
version = "0.1.1"
version = "0.1.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
11 changes: 7 additions & 4 deletions README-ZH.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### EleX Proxy ( [English](README.md) | 中文文档 )

![GitHub release (with filter)](https://img.shields.io/github/v/release/AstroxNetwork/elex-proxy)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/AstroxNetwork/elex-proxy/blob/main/LICENSE)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

**EleX Proxy** 代理是一个轻量级的 Rust 实现,用于代理与 [ElectrumX](https://github.com/atomicals/atomicals-electrumx) 服务器的通信。该项目旨在为处理 ElectrumX 请求提供简单而高效的解决方案。
**EleX Proxy** 代理是一个轻量级的 Rust 实现,用于代理与 [Atomicals ElectrumX](https://github.com/atomicals/atomicals-electrumx) 服务器的通信。该项目旨在为处理 ElectrumX 请求提供简单而高效的解决方案。

#### 安装

Expand All @@ -26,6 +26,8 @@ IP_LIMIT_PER_SECOND=1
IP_LIMIT_BURST_SIZE=10
# 默认 500,最大并发连接数
CONCURRENCY_LIMIT=500
# 默认 10,接收 WebSocket 消息的超时时间
RESPONSE_TIMEOUT=10
RUST_LOG=info
```

Expand All @@ -34,8 +36,9 @@ RUST_LOG=info
- `PROXY_HOST`:代理服务器监听的主机和端口。
- `ELECTRUMX_WSS`:要连接的 ElectrumX 服务器。使用逗号分隔多个服务器。
- `IP_LIMIT_PER_SECOND`:间隔几秒添加新的容量。
- `IP_LIMIT_BURST_SIZE`:如果在 `IP_LIMIT_PER_SECOND` 设置的时间内突发超过这个值,将会被限制
- `IP_LIMIT_BURST_SIZE`:如果在 `IP_LIMIT_PER_SECOND` 设置的时间内突发超过这个值,将会被限制
- `CONCURRENCY_LIMIT`:允许的最大并发连接数。
- `RESPONSE_TIMEOUT`:接收 WebSocket 消息的超时时间。
- `RUST_LOG`:Rust 日志框架的日志级别。选项包括 `trace``debug``info``warn``error`

#### 使用
Expand All @@ -44,6 +47,6 @@ RUST_LOG=info

### 许可

本项目采用 MIT 许可证 - 有关详细信息,请参阅 [LICENSE](https://github.com/atomicals/electrumx-proxy/blob/main/LICENSE) 文件。
本项目采用 MIT 许可证 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。

**注意:** 建议审查并根据您的特定需求定制配置。
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
### EleX Proxy ( English | [中文文档](README-ZH.md) )

![GitHub release (with filter)](https://img.shields.io/github/v/release/AstroxNetwork/elex-proxy)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/AstroxNetwork/elex-proxy/blob/main/LICENSE)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

**EleX Proxy** stands as a sophisticated Rust implementation, meticulously crafted to serve as a proxy for seamless communication with [ElectrumX](https://github.com/atomicals/atomicals-electrumx) servers. This software project has been developed with precision to offer an advanced and efficient solution for managing ElectrumX requests.
**EleX Proxy** is a lightweight Rust implementation designed to proxy communication with the [Atomicals ElectrumX](https://github.com/atomicals/atomicals-electrumx) server. This project aims to provide a simple and efficient solution for handling ElectrumX requests.

#### Installation

1. Visit the [GitHub Releases](https://github.com/AstroxNetwork/elex-proxy/releases) page to acquire the latest release.
2. Download the compressed archive tailored for your platform.
3. Extract the archive and execute the provided binary.
1. Open the [GitHub Releases](https://github.com/AstroxNetwork/elex-proxy/releases) page to download the latest version.
2. Download the compressed archive for your platform.
3. Extract and run the executable file.

#### Configuration

Create a `.env` file in the project's root directory, populating it with the following configuration:
Create a file named `.env` in the project's root directory with the following content:

```dotenv
# Host and port on which the proxy server will listen
Expand All @@ -26,24 +26,27 @@ IP_LIMIT_PER_SECOND=1
IP_LIMIT_BURST_SIZE=10
# Default 500, maximum concurrent connections
CONCURRENCY_LIMIT=500
# Default 10, timeout for receiving WebSocket messages
RESPONSE_TIMEOUT=10
RUST_LOG=info
```

Adjust the values to align with your requirements. Below is a concise explanation of the configuration parameters:
Adjust these values as needed. Here's a brief explanation of the configuration parameters:

- `PROXY_HOST`: The host and port on which the proxy server will listen.
- `ELECTRUMX_WSS`: ElectrumX server(s) to connect to. Use commas to separate multiple servers.
- `IP_LIMIT_PER_SECOND`: The interval in seconds to add new capacity.
- `IP_LIMIT_BURST_SIZE`: The burst size; if bursts exceed this value within the time set in `IP_LIMIT_PER_SECOND`, it will be restricted.
- `IP_LIMIT_PER_SECOND`: Interval in seconds to add new capacity.
- `IP_LIMIT_BURST_SIZE`: Burst size; if bursts exceed this value within the time set in `IP_LIMIT_PER_SECOND`, it will be restricted.
- `CONCURRENCY_LIMIT`: The maximum number of concurrent connections allowed.
- `RESPONSE_TIMEOUT`: Timeout for receiving WebSocket messages.
- `RUST_LOG`: Log level for Rust's logging framework. Options include `trace`, `debug`, `info`, `warn`, and `error`.

#### Usage

Once the proxy server is operational, it adeptly forwards ElectrumX requests to the specified server(s). If multiple servers are configured, it seamlessly switches to the next server after a disconnection. Clients can effortlessly connect to the configured `PROXY_HOST`.
Once the proxy server is running, it adeptly forwards ElectrumX requests to the specified server(s). If multiple servers are configured, it seamlessly switches to the next server after a disconnection. Clients can effortlessly connect to the configured `PROXY_HOST`.

### License

This project operates under the MIT License - refer to the [LICENSE](https://github.com/atomicals/electrumx-proxy/blob/main/LICENSE) file for comprehensive details.
This project is released under the MIT License - for detailed information, please refer to the [LICENSE](LICENSE) file.

**Note:** It is advised to scrutinize and tailor the configuration according to your specific demands.
**Note:** It is advised to review and customize the configuration according to your specific requirements.

0 comments on commit 9c0504d

Please sign in to comment.