alist/server/handles
BaiYi 112363031a
feat: add fine-grained control for link signing (#3924)
* Determine whether the URL requires Sign

* Add File and Mem based KV

NOT TESTED: TokenKV Function

* Change Token KV func to common func.

Add File based KV func

* Remove KV, Remove Token

I found that the original Sign function is enough to complete the link signature, and only need to add simple configuration items to meet the requirements.

* Add IsStorageSigned func to judge if Signing is enabled in the storage settings.

It should be working now.

* Add a SIGN button to the management panel.

* Add enable_sign to the basic storage struct.

Can enable sign for every driver now.

Bug: When sign enabled, in download page, Copy link doesn't contain a sign.

(Not done yet)

* Fix a bug from commit 8f6c25f.

Response of fsread function does not contain sign.

* Optimize code and follow advices.

- Add back public/dist/README.md

- Enable sign when DownProxyUrl is enabled

- Merge needSign() to isEncrypt() in fsread.go

* simplify code

---------

Co-authored-by: Andy Hsu <i@nn.ci>
2023-03-24 22:44:33 +08:00
..
aria2.go refactor: split the db package hook and cache to the op package (#2747) 2022-12-18 19:51:20 +08:00
auth.go feat: rebuild Single sign-on system (#3649 close #3571) 2023-03-02 17:55:33 +08:00
down.go feat(alias): support proxy and direct together 2023-03-14 13:46:27 +08:00
driver.go style: shorten name `operations` to `op` 2022-08-31 21:01:15 +08:00
fsmanage.go feat(alias): support proxy and direct together 2023-03-14 13:46:27 +08:00
fsread.go feat: add fine-grained control for link signing (#3924) 2023-03-24 22:44:33 +08:00
fsup.go feat: optimize file operation interface (#2757) 2022-12-20 15:02:40 +08:00
helper.go fix: page crashes if ipa name contains chinese (close #1712) 2022-09-19 13:33:23 +08:00
index.go fix: mark progress as done after clear (#3086) 2023-01-18 09:39:32 +08:00
meta.go refactor: split the db package hook and cache to the op package (#2747) 2022-12-18 19:51:20 +08:00
qbittorrent.go feat(qbittorrent): add offline download seed time (#3842 close #3588) 2023-03-14 12:13:23 +08:00
search.go refactor: split the db package hook and cache to the op package (#2747) 2022-12-18 19:51:20 +08:00
setting.go refactor: split the db package hook and cache to the op package (#2747) 2022-12-18 19:51:20 +08:00
ssologin.go feat: rebuild Single sign-on system (#3649 close #3571) 2023-03-02 17:55:33 +08:00
storage.go feat: batch reload all storages (close #2762 pr #2775) 2022-12-21 19:21:18 +08:00
task.go feat(task): add clear succeeded and retry (#3856 close #3776) 2023-03-16 15:56:27 +08:00
user.go feat!: allow disable user (close #3241) 2023-02-04 11:44:17 +08:00