AlistGo / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
43.77k stars 5.67k forks source link

change filename_encoding in crypt config #5080

Closed flymin closed 1 year ago

flymin commented 1 year ago

Please make sure of the following things

Description of the feature / 需求描述

Currently, filename_encoding uses base64. However, this is not supported by some old versions of rclone. For example, in Truenas scale, the default version is

rclone v1.56.1
- os/version: debian 11.5 (64 bit)
- os/kernel: 5.15.107+truenas (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.8
- go/linking: static
- go/tags: none

which does not support changing filename_encoding. Even though we can update rclone, Truenas GUI does not support such a configuration. Also, base64 is not the default choice of rclone.

Why does Alist use a different default setting? Can Alist support changing filename_encoding in the configuration?

Suggested solution / 实现思路

No response

Additional context / 附件

No response

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the issue template!

SeanHeuc commented 1 year ago

you can find some answers in https://alist.nn.ci/guide/drivers/Crypt.html#advanced-usage opening a rarely used parameter in driver setting can lead to many problems/questions from many people who don't use such option. I personally want to make the usage of crypt as simple and stupid as possible, currently alist doesnot support hide some advanced configs, if the web have such "hide" feature i'll gladly put this option in the advanced area

flymin commented 1 year ago

you can find some answers in alist.nn.ci/guide/drivers/Crypt.html#advanced-usage opening a rarely used parameter in driver setting can lead to many problems/questions from many people who don't use such option. I personally want to make the usage of crypt as simple and stupid as possible, currently alist doesnot support hide some advanced configs, if the web have such "hide" feature i'll gladly put this option in the advanced area

Sure I noted that "base64" is used as default in alist. For one thing, if you need to specifically state the default change there, it is not "a rarely used parameter". At least you are changing it every time using the rclone. For another, aligning the default settings can improve the compatibility to rclone (and also the users of TrueNAS like me). Currently, there is no way to setup alist crypt with TrueNAS Cloud Sync Tasks to survive future updates due to the mismatch of defaults in encoding type.

I think it is better to add an option with defaults as "base64" and a comment to show that it is an advanced option. Non-professionals are still able to get noticed and use "base64".

SeanHeuc commented 1 year ago
  1. it does is a rarely used parameter for alist users, most alist users don't use rclone crypt at all.
  2. alist crypt is currently 100% compatible with with rclone crypt. rclone and alist support different storages, it makes no sense to use rclone's default base32.

with that being said, i'll put filename_encoding in config page in next version. but please note that only default option "base64" is tested/supported.

flymin commented 1 year ago

with that being said, i'll put filename_encoding in config page in next version. but please note that only default option "base64" is tested/supported.

That will be good enough. Looking forward to the new version.