feat:完善项目
This commit is contained in:
34
rpc/README.md
Normal file
34
rpc/README.md
Normal file
@ -0,0 +1,34 @@
|
||||
## GRPC
|
||||
|
||||
### 生成proto
|
||||
|
||||
```javasrript
|
||||
protoc --go_out=plugins=grpc:. *.proto
|
||||
```
|
||||
### 完整示例:
|
||||
|
||||
```javasrript
|
||||
protoc --go_out=plugins=grpc,Mfoo/bar.proto=bar,import_prefix=,import_path=foo/bar:. ./*.proto
|
||||
```
|
||||
|
||||
### TLS私钥和公钥
|
||||
- TLS私钥和公钥
|
||||
- 制作私钥 (.key)
|
||||
```sh
|
||||
openssl genrsa -out server.key 2048
|
||||
```
|
||||
```sh
|
||||
openssl ecparam -genkey -name secp384r1 -out server.key
|
||||
```
|
||||
```sh
|
||||
openssl req -new -x509 -sha256 -key server.key -out server.pem -days 3650
|
||||
```
|
||||
```sh
|
||||
Country Name (2 letter code) [AU]:CN
|
||||
State or Province Name (full name) [Some-State]:Anhui
|
||||
Locality Name (eg, city) []:Hefei
|
||||
Organization Name (eg, company) [Internet Widgits Pty Ltd]:IPEACE.ORG.CN
|
||||
Organizational Unit Name (eg, section) []:DEVELOPER
|
||||
Common Name (e.g. server FQDN or YOUR name) []:TOKYO_HOT.RPC
|
||||
Email Address []:email@ipeace.org.cn
|
||||
```
|
Reference in New Issue
Block a user