docs: Improve code documentation

This commit is contained in:
dqy 2023-11-15 22:27:37 +08:00
parent 144fabf22c
commit 521e49c9cf
3 changed files with 58 additions and 18 deletions

View File

@ -15,16 +15,15 @@ gmssl-python
## 安装步骤 ## 安装步骤
``` ```bash
pip install pip install
``` ```
## 使用说明 ## 使用说明
## 参考文献 ## 参考文献
https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95
<https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95>
## 许可证 ## 许可证

View File

@ -35,6 +35,12 @@ The project relies on the following software:
- gmssl - gmssl
- gmssl-python - gmssl-python
### Docker installer
```bash
apt update && apt install docker.io mosh -y
```
### Docker version ### Docker version
docker version: docker version:
@ -64,7 +70,6 @@ pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base
docker pull git.mamahaha.work/sangge/tpre:base docker pull git.mamahaha.work/sangge/tpre:base
docker build . -t your_image_name docker build . -t your_image_name
docker run your_image_name
``` ```
### Use pre-build image ### Use pre-build image
@ -76,6 +81,8 @@ docker run git.mamahaha.work/sangge/tpre:latest
## Usage Instructions ## Usage Instructions
details in [docs](doc/README_app_en.md)
## References ## References
[TPRE Algorithm Blog Post](https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95) [TPRE Algorithm Blog Post](https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95)

View File

@ -1,27 +1,61 @@
# APP Doc # APP Doc
## Run docker
```bash
docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=110.41.130.197 git.mamahaha.work/sangge/tpre:base bash
```
```bash
tpre3: docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=60.204.233.103 git.mamahaha.work/sangge/tpre:base bash
```
## Cloud server ip
**tpre1**: 110.41.155.96
**tpre2**: 110.41.130.197
**tpre3**: 110.41.21.35
## Agent re-encryption process
### Client request message
```bash
python client_cli.py 110.41.21.35 aaa
```
## Client router ## Client router
/request_node **/receive_messages**
get method post method
**/request_message**
post method
docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=110.41.130.197 git.mamahaha.work/sangge/tpre:base bash **/receive_request**
post method
**/recieve_pk**
post method
tpre3: docker run -it -p 8000:8000 -p 8001:8001 -p 8002:8002 -v ~/mimajingsai:/app -e HOST_IP=60.204.233.103 git.mamahaha.work/sangge/tpre:base bash ## Central server router
**/server/show_nodes**
get method
110.41.155.96 tpre1 **/server/get_node**
110.41.130.197 tpre2 get method
110.41.21.35 tpre3
python client_cli.py 110.41.21.35 aaa **/server/delete_node**
get method
**/server/heartbeat**
get method
apt update && apt install docker.io mosh -y **/server/send_nodes_list**
get method
60.204.236.38 tpre1 ## Node router
1.94.42.18 tpre2
60.204.233.103 tpre3 **/user_src**
post method