docs: Improve code documentation
This commit is contained in:
parent
144fabf22c
commit
521e49c9cf
@ -15,16 +15,15 @@ gmssl-python
|
||||
|
||||
## 安装步骤
|
||||
|
||||
```
|
||||
```bash
|
||||
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>
|
||||
|
||||
## 许可证
|
||||
|
||||
|
@ -35,6 +35,12 @@ The project relies on the following software:
|
||||
- gmssl
|
||||
- gmssl-python
|
||||
|
||||
### Docker installer
|
||||
|
||||
```bash
|
||||
apt update && apt install docker.io mosh -y
|
||||
```
|
||||
|
||||
### 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 pull git.mamahaha.work/sangge/tpre:base
|
||||
docker build . -t your_image_name
|
||||
docker run your_image_name
|
||||
```
|
||||
|
||||
### Use pre-build image
|
||||
@ -76,6 +81,8 @@ docker run git.mamahaha.work/sangge/tpre:latest
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
details in [docs](doc/README_app_en.md)
|
||||
|
||||
## References
|
||||
|
||||
[TPRE Algorithm Blog Post](https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95)
|
||||
|
@ -1,27 +1,61 @@
|
||||
# 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
|
||||
|
||||
/request_node
|
||||
get method
|
||||
|
||||
**/receive_messages**
|
||||
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
|
||||
110.41.130.197 tpre2
|
||||
110.41.21.35 tpre3
|
||||
**/server/get_node**
|
||||
get method
|
||||
|
||||
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
|
||||
1.94.42.18 tpre2
|
||||
60.204.233.103 tpre3
|
||||
## Node router
|
||||
|
||||
**/user_src**
|
||||
post method
|
||||
|
Loading…
x
Reference in New Issue
Block a user