dls implementation in rust.
- Any os with redis
- rust stable toolchain
clone this repo
cd dls_rs
cargo build --release
copy target/release/nv_ls
to your dir.
and run with
./nv_ls
change config file ./data/config.json
as follows.
Once the configuration file has been modified, restart nv_ls to make it effective
The service listener addr.
The service listener port.
Automatic generation of ssl certificates for domain names.
If you have a certificate, you do not need to change anything.
The host filled in the client's token, it is also the address of the client request
The port filled in the client's token, it is also the port of the client request
Same as the name
How often to automatically clean up the client release inside redis.
Whatever, just let it as is, or ur can random some uuid v4, but keep in mind it only takes two
Whatever, just let it as is, or ur can random a new uuid v4
Client lease time, In second
The interval factor between client vm requests to the server, expressed as a percentage.
lease_time * lease_renewal_factor
e.g:
lease_time: 600s, lease_renewal_factor: 20, time now: 2022/12/03 10:00:00
It means, The time of the next client request time is: 2022/12/03 10:02:00, and next time is 2022/12/03 10:04:00 till the client lease renew
Same as the name
For vm client token encryption and vm-side verification of signatures, can delete the corresponding file and generate it again randomly
just access https://ur-ip-addr:server_port/genClientToken