Commit Graph

386 Commits (feat/dropbox)

Author SHA1 Message Date
BoYanZh f646d2a699 feat!: listen to both http & https (#4536)
Co-authored-by: Andy Hsu <i@nn.ci>
2023-06-11 18:17:37 +08:00
Mg Pig 881d6e271e
feat: add OIDC single sign-on (#4496)
close #3914
close #4315
2023-06-02 18:22:07 +08:00
Andy Hsu b2f5757f8d fix(copy): copy from driver that return `writer` (close #4291) 2023-05-26 21:57:43 +08:00
Noah Hsu 571bcf07b0 fix(alias): add api prefix for proxy url (close #4392) 2023-05-19 00:12:57 +08:00
XYUU a3446720a2
fix: make `TlsInsecureSkipVerify` enable for all request (#4386) 2023-05-14 17:05:47 +08:00
Andy Hsu 5be79eb26e feat: add `robots.txt` setting (close #4303) 2023-05-12 16:53:15 +08:00
hsluoyz f8fb48fb32
fix: cannot connect to Casdoor SSO (close #4266 in #4274) 2023-05-01 15:32:34 +08:00
longxu0509 2bae8e129e
feat: add Casdoor single sign-on (#4222) 2023-04-26 16:01:40 +08:00
Andy Hsu 8711f2a1c5 feat(quark): shard request file (close #4175) 2023-04-17 15:33:38 +08:00
Andy Hsu 7f35aab071 revert(quark): remove preset range header 2023-04-17 14:39:21 +08:00
Andy Hsu ecd167d2f9 feat(quark): add preset range header (close #4166) 2023-04-16 19:26:03 +08:00
varg1714 220fd30830
fix: the recursive subdirectory moving bug (#4171) 2023-04-16 16:08:12 +08:00
varg1714 46f9aefb04
feat: empty folder clear API [ckip ci] (#4132)
* 增加清理空文件夹API

* 修复嵌套文件夹删除Bug

 Author:    varg247 <varg247@gmail.com>

---------

Co-authored-by: varg247 <varg247@qq.com>
2023-04-13 15:39:21 +08:00
Andy Hsu 0f8a84f67e perf(alias): disabled log on fs call (close #4054) 2023-04-07 00:02:07 +08:00
Andy Hsu 3b07c72f88 fix(proxy): ignore `Referer` if got redirect (close #3996) 2023-03-31 20:29:55 +08:00
Andy Hsu 86beadc0ed fix: missed sign with enable `sign_all` (close #3957) 2023-03-26 16:19:01 +08:00
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
XZB-1248 0eab31bdf5
fix(local): filename with whitespace issue (#3928)
* fix(local): filename whitespace problem

* fix(deps): remove deprecated package io/ioutil

---------

Co-authored-by: XZB <i@1248.ink>
2023-03-23 15:18:37 +08:00
zhengxiexie c6af22b97e
feat: add thumbnail to `fs/get` api (#3927) 2023-03-23 13:59:39 +08:00
Brian 8c0defce09
feat(task): add clear succeeded and retry (#3856 close #3776) 2023-03-16 15:56:27 +08:00
Andy Hsu d9795ff22f feat(alias): support proxy and direct together 2023-03-14 13:46:27 +08:00
XZB-1248 c4108007cd
fix: spaces in filename will be replaced with plus sign (#3841)
Co-authored-by: XZB <i@1248.ink>
2023-03-14 12:27:42 +08:00
Brian f3db23a41e
feat(qbittorrent): add offline download seed time (#3842 close #3588) 2023-03-14 12:13:23 +08:00
varg1714 1091e1b740
feat: file aggregation and regular rename api (#3788)
* 增加文件聚合接口,将给定文件夹下所有文件移动到目标文件夹。

* 增加文件正则重命名接口。

---------

Co-authored-by: varg247 <varg247@qq.com>
2023-03-10 19:01:49 +08:00
Andy Hsu 43de823058 fix: path `IsApply` check (close #3784) 2023-03-09 21:03:56 +08:00
Andy Hsu ebcbb29a0f feat: ping api (close #3752) 2023-03-07 19:05:52 +08:00
Andy Hsu 3d3f23ec9e fix: upload check if disable sub folder (close #3741) 2023-03-07 14:13:39 +08:00
NewbieOrange d484219c48
fix(security): compare auth token in constant time (#3740 close #3739) 2023-03-06 23:41:06 +08:00
Andy Hsu 12a095a1d6 fix: slice bounds out of range on `CanAccess` check 2023-03-05 15:29:53 +08:00
itsHenry 603681fbe6
feat: rebuild Single sign-on system (#3649 close #3571)
* rebuild single sign on system

* perf: use cache

* fix: codefactor check

---------

Co-authored-by: Andy Hsu <i@nn.ci>
2023-03-02 17:55:33 +08:00
Andy Hsu ca9e739465 fix: hide apply to sub path without enable (close #3661) 2023-02-28 18:43:52 +08:00
Karbob 93dd768234
fix(webdav): `disabled` is not working in webdav (#3659)
A disabled user with webdav permission can use webdav normally, which is not allowed.
2023-02-28 18:26:13 +08:00
Andy Hsu 0d3146b51d fix(webdav): disable put with empty path (close #3569) 2023-02-23 21:19:50 +08:00
Andy Hsu 28aee8c493
feat: add aliyundrive open driver (#3437)
close #3533 
close #3521 
close #3459 
close #3375 

* feat: add aliyundrive open driver

* feat: adapt alist api

* fix: trailing spaces

* feat(aliyundrive_open): video preview api
2023-02-23 20:45:57 +08:00
Andy Hsu c08fdfc868 fix: missed assignment [skip ci] 2023-02-22 20:20:28 +08:00
Andy Hsu 8655e33e60 fix: incorrect api if not set site_url (6c2f348) 2023-02-21 19:57:50 +08:00
Andy Hsu 50579fef84 fix: cancel api replace to avoid missing host 2023-02-21 19:45:09 +08:00
Andy Hsu 6c2f3486fc fix!: reverse proxy to sub-directory (#3483)
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;
}
```
2023-02-18 19:03:07 +08:00
Andy Hsu ae2ee1821a chore: change qBittorrent setting [skip ci] 2023-02-15 16:51:29 +08:00
Andy Hsu 805b1e4fa3 fix: different url encoding (close #3423) 2023-02-15 16:20:30 +08:00
kdxcxs c28168c970
feat: support qbittorrent (close #3087 in #3333)
* 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>
2023-02-14 15:20:45 +08:00
Andy Hsu 43a8ed472b fix: can't login by github after disable guest (close #3314) 2023-02-09 20:12:04 +08:00
Noah Hsu a181b56ea7 feat: optional forward direct link params (close #3123) 2023-02-07 16:39:14 +08:00
Andy Hsu 3d0065bdcf feat!: allow disable user (close #3241)
From this commit, the guest user will be disabled by default
2023-02-04 11:44:17 +08:00
Noah Hsu ce4a295008 fix!: check https with `X-Forwarded-Proto`
not read old setting `api_url` and `base_path` from this commit
2023-01-19 12:16:42 +08:00
BoYanZh be8a9c5f07
fix: mark progress as done after clear (#3086) 2023-01-18 09:39:32 +08:00
Wuxuan 530e74c70b
fix: avoid regular expression match current directory (#3078)
* fix: avoid regular expression match current directory

* fix: optimize and regexp exclude slash

Co-authored-by: wuxuan <refused@wuxuan.eu.org>
2023-01-17 21:54:25 +08:00
Noah Hsu 26fe0a7684 feat: customize index max depth
Because some driver's issue may cause infinite loop
2023-01-17 17:33:18 +08:00
itsHenry 83fe17c6ec
feat: support github login (#2639)
* Support Github Login

* improve according to codefactor

* fix due to last updates

* optimization

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-27 22:11:22 +08:00
Noah Hsu e118f4a3b9 feat: update index by `req.Paths` 2022-12-24 20:23:04 +08:00