可以使用 BitTorrent Sync CLI 创建共享吗?

Ila*_*ste 4 command-line bittorrent-sync

BitTorrent Sync可以从命令行执行,但--help参数显示的选项很少。执行btsync使 web ui 可用(在端口 8888),可用于配置。

BitTorrent Sync 1.2.73
Usage:
      btsync [--config <path>] [--nodaemon] [--generate-secret] [--dump-sample-config] [--help] [--get-ro-secret <secret>]
Options:
    --config - location and name of configuration file
    --nodaemon - do not use daemon mode
    --generate-secret - generate shared secret
    --get-ro-secret - get read only secret for existing master secret
    --dump-sample-config - dump sample config file
    --help - print this message and exit
Run Code Online (Sandbox Code Playgroud)

这些选项似乎不包括创建新的共享文件夹。

我可以仅使用命令行通过 BitTorrent Sync 创建新共享吗?

我也对非常笨拙的解决方案感兴趣,例如编辑配置文件并重新启动服务,或将特定的 HTTP 请求发布到 localhost:8888。

Jou*_*eek 10

您需要为此使用配置文件。

您可以使用btsync --dump-sample-config(或者--get-sample-config如果您使用的是旧版本)来获取样本,在“共享文件夹”下提供必要的路径和由秘密生成--generate的秘密。

然后保存配置文件,然后告诉 btsync 通过启动它来使用该配置文件--config

您可以在此版本手册的第 10 页中找到所有这些内容。请注意,这将禁用 Web UI。

我把它作为一个练习,让用户以他内心渴望的任何方式编写所有这些脚本。