-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,41 @@ | ||
# vnts | ||
[vnt](https://github.com/lbl8603/vnt)的服务端 | ||
|
||
[vnt](https://github.com/lbl8603/vnt)的服务端 | ||
|
||
查看参数 | ||
|
||
``` | ||
Options: | ||
--port <PORT> 指定端口 | ||
--port <PORT> 指定端口,默认29872 | ||
--white-token <WHITE_TOKEN> token白名单,例如 --white-token 1234 --white-token 123 | ||
--gateway <GATEWAY> 网关,例如 --gateway 10.10.0.1 | ||
--netmask <NETMASK> 子网掩码,例如 --netmask 255.255.255.0 | ||
-h, --help Print help | ||
--finger 开启指纹校验,开启后只会转发指纹正确的客户端数据包,增强安全性,这会损失一部分性能 | ||
--log-path <LOG_PATH> log路径,默认为当前程序路径,为/dev/null时表示不输出log | ||
--web-port <WEB_PORT> web后台端口,默认29870,如果设置为0则表示不启动web后台 | ||
--username <USERNAME> web后台用户名,默认为admin | ||
--password <PASSWORD> web后台用户密码,默认为admin | ||
-h, --help Print help information | ||
-V, --version Print version information | ||
``` | ||
|
||
## 说明 | ||
|
||
1. 修改服务端密钥后,客户端要重启才能正常链接(修改密钥后无法自动重连) | ||
2. 服务端密钥用于加密客户端和服务端之间传输的数据(使用rsa+aes256gcm加密),可以防止token被中间人窃取,如果客户端显示的密钥指纹和服务端的不一致,则表示可能有中间人攻击 | ||
2. 服务端密钥用于加密客户端和服务端之间传输的数据(使用rsa+aes256gcm加密) | ||
,可以防止token被中间人窃取,如果客户端显示的密钥指纹和服务端的不一致,则表示可能有中间人攻击 | ||
3. 服务端密钥在'./key/'目录下,可以替换成自定义的密钥对 | ||
4. 客户端的密码用于加密客户端之间传输的数据 | ||
5. 默认情况服务日志输出在 './log/'下,可通过编写'./log/log4rs.yaml'文件自定义日志配置,参考[log4rs](https://github.com/estk/log4rs) | ||
5. 默认情况服务日志输出在 './log/'下,可通过编写' | ||
./log/log4rs.yaml'文件自定义日志配置,参考[log4rs](https://github.com/estk/log4rs) | ||
|
||
## 编译 | ||
|
||
前提条件:安装rust编译环境([install rust](https://www.rust-lang.org/zh-CN/tools/install)) | ||
|
||
``` | ||
到项目根目录下执行 cargo build | ||
web是可选模块,如需编译则使用 cargo build --features web | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters