From 7479535d8265ac7e1af919f6546c418af36ff92d Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Thu, 31 Jul 2025 08:01:28 +0000 Subject: [PATCH] Update README.md --- README.en.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 README.en.md create mode 100644 README.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..5332851 --- /dev/null +++ b/README.en.md @@ -0,0 +1,81 @@ + + +# dig-parent Project Documentation + +## Project Structure + +This project contains the following main modules: + +- `dig-client`: Client module, used to establish connection with the server and perform data interaction. +- `dig-server`: Server module, provides RESTful API and data processing capabilities. +- `dig-common`: Common module, contains generic classes and utility classes. + +## relay-server + +### Responsibilities + +The `relay-server` is responsible for relaying data between the client and the server, ensuring reliable data transmission. + +### Configuration Instructions + +- **Internal Access Listening IP**: Configure the IP address the server listens on. +- **Internal Access Listening Port**: Configure the port number the server listens on. +- **Internal Access Raw Message Logs**: Logs of received raw messages are recorded here. +- **Forwarding List**: Configure the list of data to be forwarded. +- **Forwarding Service ID**: Configure the unique identifier of the forwarding service. +- **Forwarding Service Name**: Configure the name of the forwarding service. +- **Server Listening IP**: Configure the IP address that the server side listens on. +- **Server Listening Port**: Configure the port number that the server side listens on. +- **Server Side Raw Message Logs**: Logs of raw messages received by the server side are recorded here. +- **Third-party IP for Client Connection**: Configure the third-party IP address the client connects to. +- **Third-party Port for Client Connection**: Configure the third-party port number the client connects to. + +## relay-client + +### Responsibilities + +The `relay-client` is responsible for establishing a connection with the `relay-server` and forwarding data to the designated third-party service. + +### Configuration Instructions + +- **Server IP**: Configure the IP address of the `relay-server`. +- **Server Port**: Configure the port number of the `relay-server`. + +## Data Interaction Process + +1. **Client Connection**: The `relay-client` establishes a connection with the `relay-server`. +2. **Data Forwarding**: The client sends data to the `relay-server`, which then forwards the data to the designated third-party service. +3. **Response Handling**: Data returned by the third-party service is forwarded back to the `relay-client` through the `relay-server`. + +## Protocol Description + +For details, please refer to the `protocol.md` file, which provides a detailed description of the communication protocol between the Server and Client, including message structure, control commands, and data commands. + +## Usage Instructions + +### Starting the Service + +1. **Start the Server**: Run the `Application` class in the `dig-server` module. +2. **Start the Client**: Run the `Application` class in the `dig-client` module. + +### Configuration Files + +- **Server Configuration**: `dig-server/src/main/resources/application.properties` +- **Client Configuration**: `dig-client/src/main/resources/application.properties` + +### Logs + +- **Log Configuration**: `dig-server/src/main/resources/logback-spring.xml` and `dig-client/src/main/resources/logback-spring.xml` + +## Contributing + +Code and documentation contributions are welcome. Please follow these steps: + +1. Fork this repository. +2. Create a new branch. +3. Commit your code changes. +4. Create a Pull Request. + +## License + +This project uses the MIT License. For details, please see the LICENSE file. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..935fc76 --- /dev/null +++ b/README.md @@ -0,0 +1,79 @@ +# dig-parent 项目文档 + +## 项目结构 + +本项目包含以下主要模块: + +- `dig-client`: 客户端模块,用于与服务器建立连接并进行数据交互。 +- `dig-server`: 服务端模块,提供 RESTful API 和数据处理功能。 +- `dig-common`: 公共模块,包含通用类和工具类。 + +## relay-server + +### 职责 + +`relay-server` 负责在客户端和服务端之间进行数据中继,确保数据的可靠传输。 + +### 配置说明 + +- **内部接入监听 IP**: 配置服务器监听的 IP 地址。 +- **内部接入监听端口**: 配置服务器监听的端口号。 +- **内部接入原始报文日志**: 记录接收到的原始报文日志。 +- **转发清单列表**: 配置需要转发的数据列表。 +- **转发服务 ID**: 配置转发服务的唯一标识。 +- **转发服务名称**: 配置转发服务的名称。 +- **Server 端监听的 IP**: 配置 Server 端监听的 IP 地址。 +- **Server 端监听的端口**: 配置 Server 端监听的端口号。 +- **Server 端的原始报文日志**: 记录 Server 端接收到的原始报文日志。 +- **Client 端连接的三方 IP**: 配置 Client 端连接的三方 IP 地址。 +- **Client 端连接的三方端口**: 配置 Client 端连接的三方端口号。 + +## relay-client + +### 职责 + +`relay-client` 负责与 `relay-server` 建立连接,并将数据转发到指定的三方服务。 + +### 配置说明 + +- **Server IP**: 配置 `relay-server` 的 IP 地址。 +- **Server 端口**: 配置 `relay-server` 的端口号。 + +## 数据交互流程 + +1. **客户端连接**: `relay-client` 与 `relay-server` 建立连接。 +2. **数据转发**: 客户端将数据发送到 `relay-server`,`relay-server` 将数据转发到指定的三方服务。 +3. **响应处理**: 三方服务返回的数据通过 `relay-server` 转发回 `relay-client`。 + +## 协议说明 + +详见 `protocol.md` 文件,详细描述了 Server/Client 之间的通讯协议,包括消息结构、控制类指令和数据类指令。 + +## 使用说明 + +### 启动服务 + +1. **启动 Server**: 运行 `dig-server` 模块的 `Application` 类。 +2. **启动 Client**: 运行 `dig-client` 模块的 `Application` 类。 + +### 配置文件 + +- **Server 配置**: `dig-server/src/main/resources/application.properties` +- **Client 配置**: `dig-client/src/main/resources/application.properties` + +### 日志 + +- **日志配置**: `dig-server/src/main/resources/logback-spring.xml` 和 `dig-client/src/main/resources/logback-spring.xml` + +## 贡献 + +欢迎贡献代码和文档。请遵循以下步骤: + +1. Fork 本仓库。 +2. 创建新分支。 +3. 提交代码更改。 +4. 创建 Pull Request。 + +## 许可证 + +本项目使用 MIT 许可证。详情请参阅 LICENSE 文件。 \ No newline at end of file -- Gitee