Skip to content

Commit

Permalink
config doc
Browse files Browse the repository at this point in the history
  • Loading branch information
TenderIronh committed Dec 30, 2021
1 parent ac454ec commit 16b937e
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 2 deletions.
43 changes: 42 additions & 1 deletion USAGE-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,48 @@
>* -protocol: 目标服务协议 tcp、udp
>* -peeruser: 目标用户,如果是同一个用户下的节点,则无需设置
>* -peerpassword: 目标密码,如果是同一个用户下的节点,则无需设置
>* -f: 配置文件,如果希望配置多个P2PApp参考[config.json](/config.json)
## 配置文件
一般保存在当前目录,安装模式下会保存到 `C:\Program Files\OpenP2P\config.json``/usr/local/openp2p/config.json`
希望修改参数,或者配置多个P2PApp可手动修改配置文件

配置实例
```
{
"network": {
"Node": "hhd1207-222",
"User": "USERNAME1",
"Password": "PASSWORD1",
"ShareBandwidth": -1,
"ServerHost": "api.openp2p.cn",
"ServerPort": 27182,
"UDPPort1": 27182,
"UDPPort2": 27183
},
"apps": [
{
"AppName": "OfficeWindowsPC",
"Protocol": "tcp",
"SrcPort": 23389,
"PeerNode": "OFFICEPC1",
"DstPort": 3389,
"DstHost": "localhost",
"PeerUser": "",
"PeerPassword": ""
},
{
"AppName": "OfficeServerSSH",
"Protocol": "tcp",
"SrcPort": 22,
"PeerNode": "OFFICEPC1",
"DstPort": 22,
"DstHost": "192.168.1.5",
"PeerUser": "",
"PeerPassword": ""
}
]
}
```

## 升级客户端
```
Expand Down
42 changes: 41 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,48 @@ Create multiple P2PApp by config file
>* -protocol: Target service protocol tcp, udp
>* -peeruser: The target user, if it is a node under the same user, no need to set
>* -peerpassword: The target password, if it is a node under the same user, no need to set
>* -f: Configuration file, if you want to configure multiple P2PApp refer to [config.json](/config.json)
## Config file
Generally saved in the current directory, in installation mode it will be saved to `C:\Program Files\OpenP2P\config.json` or `/usr/local/openp2p/config.json`
If you want to modify the parameters, or configure multiple P2PApps, you can manually modify the configuration file

Configuration example
```
{
"network": {
"Node": "hhd1207-222",
"User": "USERNAME1",
"Password": "PASSWORD1",
"ShareBandwidth": -1,
"ServerHost": "api.openp2p.cn",
"ServerPort": 27182,
"UDPPort1": 27182,
"UDPPort2": 27183
},
"apps": [
{
"AppName": "OfficeWindowsPC",
"Protocol": "tcp",
"SrcPort": 23389,
"PeerNode": "OFFICEPC1",
"DstPort": 3389,
"DstHost": "localhost",
"PeerUser": "",
"PeerPassword": ""
},
{
"AppName": "OfficeServerSSH",
"Protocol": "tcp",
"SrcPort": 22,
"PeerNode": "OFFICEPC1",
"DstPort": 22,
"DstHost": "192.168.1.5",
"PeerUser": "",
"PeerPassword": ""
}
]
}
```
## Client update
```
# update local client
Expand Down

0 comments on commit 16b937e

Please sign in to comment.