* 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>
from this commit, if you want reverse proxy to sub-directory like `alist` with `nginx`, you need config:
```nginx
location /alist/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_redirect off;
proxy_pass http://127.0.0.1:5244/alist/;
# the max size of file to upload
client_max_body_size 20000m;
}
```
* feat(qbittorrent): authorization and logging in support
* feat(qbittorrent/client): support `AddFromLink`
* refactor(qbittorrent/client): check authorization when getting a new client
* feat(qbittorrent/client): support `GetInfo`
* test(qbittorrent/client): update test cases
* feat(qbittorrent): init qbittorrent client on bootstrap
* feat(qbittorrent): support setting webui url via gin
* feat(qbittorrent/client): support deleting
* feat(qbittorrent/client): parse `TorrentStatus` enum when unmarshalling json in `GetInfo()`
* feat(qbittorrent/client): support getting files by id
* feat(qbittorrent): support adding qbittorrent tasks via gin
* refactor(qbittorrent/client): return a `Client` interface in `New()` instead of `*client`
* refactor: task handle
* chore: fix typo
* chore: change path
---------
Co-authored-by: Andy Hsu <i@nn.ci>