put.io

put.io

路径指定为 remote:path

put.io 的路径可以按需设置深度,例如 remote:directory/subdirectory

配置

put.io 的初始设置需要从 put.io 获取一个令牌,你需要在浏览器中完成此操作。rclone config 会引导你完成整个过程。

以下是一个如何创建名为 remote 的远程存储的示例。首先运行:

 rclone config

这将引导你完成一个交互式的设置过程:

No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> putio
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
[snip]
XX / Put.io
   \ "putio"
[snip]
Storage> putio
** See help for putio backend at: https://rclone.cn/putio/ **

Remote config
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
y) Yes
n) No
y/n> y
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
--------------------
[putio]
type = putio
token = {"access_token":"XXXXXXXX","expiry":"0001-01-01T00:00:00Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:

Name                 Type
====                 ====
putio                putio

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

请参考 远程设置文档 了解如何在没有互联网浏览器的机器上进行设置。

请注意,如果使用网页浏览器自动进行身份验证,rclone 会在本地机器上运行一个 Web 服务器来收集 put.io 返回的令牌。这个 Web 服务器仅在打开浏览器到你获取到验证码的这段时间内运行。它运行在 http://127.0.0.1:53682/ 上,如果你正在运行主机防火墙,可能需要临时解除对该地址的阻止,或者使用手动模式。

然后你可以像下面这样使用它:

列出你的 put.io 顶级目录:

rclone lsd remote:

列出你的 put.io 中的所有文件:

rclone ls remote:

将本地目录复制到 put.io 上名为 backup 的目录:

rclone copy /home/source remote:backup

受限文件名的字符

除了 默认的受限字符集 之外,以下字符也会被替换:

字符 编码值 替换字符
\ 0x5C

无效的 UTF-8 字节也会被 替换,因为它们不能用于 JSON 字符串。

标准选项

以下是 put.io 特有的标准选项。

–putio-client-id

OAuth 客户端 ID。

通常留空。

属性:

  • 配置项:client_id
  • 环境变量:RCLONE_PUTIO_CLIENT_ID
  • 类型:字符串
  • 是否必需:否

–putio-client-secret

OAuth 客户端密钥。

通常留空。

属性:

  • 配置项:client_secret
  • 环境变量:RCLONE_PUTIO_CLIENT_SECRET
  • 类型:字符串
  • 是否必需:否

高级选项

以下是 put.io 特有的高级选项。

–putio-token

以 JSON 格式表示的 OAuth 访问令牌。

属性:

  • 配置项:token
  • 环境变量:RCLONE_PUTIO_TOKEN
  • 类型:字符串
  • 是否必需:否

–putio-auth-url

认证服务器 URL。

留空则使用提供商的默认值。

属性:

  • 配置项:auth_url
  • 环境变量:RCLONE_PUTIO_AUTH_URL
  • 类型:字符串
  • 是否必需:否

–putio-token-url

令牌服务器 URL。

留空则使用提供商的默认值。

属性:

  • 配置项:token_url
  • 环境变量:RCLONE_PUTIO_TOKEN_URL
  • 类型:字符串
  • 是否必需:否

–putio-client-credentials

使用客户端凭证 OAuth 流程。

这将使用 RFC 6749 中描述的 OAUTH2 客户端凭证流程。

属性:

  • 配置项:client_credentials
  • 环境变量:RCLONE_PUTIO_CLIENT_CREDENTIALS
  • 类型:布尔值
  • 默认值:false

–putio-encoding

后端的编码方式。

有关更多信息,请参阅 概述中的编码部分

属性:

  • 配置项:encoding
  • 环境变量:RCLONE_PUTIO_ENCODING
  • 类型:编码方式
  • 默认值:斜杠、反斜杠、删除符、控制字符、无效 UTF-8、点号

–putio-description

远程存储的描述。

属性:

  • 配置项:description
  • 环境变量:RCLONE_PUTIO_DESCRIPTION
  • 类型:字符串
  • 是否必需:否

限制

put.io 有速率限制。当你达到限制时,rclone 会在等待服务器要求的时间后自动重试。

如果你想避免达到这些限制,可以使用 --tpslimit 标志并设置一个较小的数值。请注意,不同操作的限制可能不同,并且可能会随时间变化。