12个版本

0.3.1 2024年1月18日
0.3.0 2024年1月18日
0.2.4 2023年9月2日
0.2.2 2023年5月23日
0.1.5 2023年4月18日

#752 in 加密学

Download history 1/week @ 2024-05-15 2/week @ 2024-06-26 47/week @ 2024-07-03 3/week @ 2024-07-24

每月 52 次下载

MIT/Apache

34KB
801

文件存储客户端

点击[文件存储服务器]

创建配置文件

fsc create
[server]
# server addr
addr="127.0.0.1:7556"
# used to verify whether the service_name
service_name="file-store-service"
# used to verify whether the verify_key
verify_key=""
# the timeout period for the client to request the server
request_out_time_ms=15000

# used to configure TLS communication encryption (optional).
# if not provided, TLS will not be used for communication encryption
[tls]
# ca file path (optional)
# if not provided, the server’s certificate will not be verified.
# ca = "./tls/ca.crt"

# cert file path
cert = "./tls/client-crt.pem"

# key file path
key = "./tls/client-key.pem"

帮助

Usage: fsc <COMMAND>

Commands:
  create  create config
  push    push file
  pull    pull file
  image   image path
  show    show remote directory contents
  info    show remote file info
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

推送

Usage: fsc push [OPTIONS] <FILE>

Arguments:
  <FILE>  local file

Options:
  -d, --dir <DIR>      save dir
  -a, --async          async write
  -b, --block <BLOCK>  transfer block size default 131072 [default: 131072]
  -o, --overwrite      if service exists file, over write file
  -h, --help           Print help

fsc镜像推送

Usage: fsc image push [OPTIONS] <PATH>

Arguments:
  <PATH>  local path

Options:
  -d, --dir <DIR>      save dir
  -a, --async          async write
  -b, --block <BLOCK>  transfer block size default 131072 [default: 131072]
  -o, --overwrite      if service exists file, over write file
  -h, --help           Print help

fsc拉取

Usage: fsc pull [OPTIONS] <FILE>

Arguments:
  <FILE>  remote file path

Options:
  -s, --save <SAVE>    save file path
  -b, --block <BLOCK>  transfer block size default 131072 [default: 131072]
  -o, --overwrite      if exists file, over write file
  -h, --help           Print help

示例

fsc push ./file
fsc image push ./dirctory
fsc pull ./file
fsc pull ./file -s ./save_file

依赖项

~20–31MB
~563K SLoC