Commit Graph

73 Commits (f646d2a699c8a73612ab91d374b913b36a5307c6)

Author SHA1 Message Date
Andy Hsu b2f5757f8d fix(copy): copy from driver that return `writer` (close #4291) 2023-05-26 21:57:43 +08:00
XYUU a3446720a2
fix: make `TlsInsecureSkipVerify` enable for all request (#4386) 2023-05-14 17:05:47 +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
Andy Hsu 3b07c72f88 fix(proxy): ignore `Referer` if got redirect (close #3996) 2023-03-31 20:29:55 +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
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
Andy Hsu 43de823058 fix: path `IsApply` check (close #3784) 2023-03-09 21:03:56 +08:00
Andy Hsu 12a095a1d6 fix: slice bounds out of range on `CanAccess` check 2023-03-05 15:29:53 +08:00
Andy Hsu ca9e739465 fix: hide apply to sub path without enable (close #3661) 2023-02-28 18:43:52 +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
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
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
EzraRT 146619134d
feat: customize proxy ignore headers (close #2763 pr #2766)
* clean referer when use proxy

* feat: customize proxy ignore headers

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-20 16:08:32 +08:00
浅秋枫影 ae791c8634
fix: hide check in `canAccess` (#2556)
修复 meta.Password 和 meta.Hide 都为空的情况下,会导致无权限访问
2022-12-02 17:44:29 +08:00
Noah Hsu ff0bcfef8a feat: optional sign all files 2022-11-30 22:10:07 +08:00
Noah Hsu 4980b71ba3 fix: add hide check to `canAccess` (close #2532) 2022-11-30 22:01:33 +08:00
SiHuaN f9788ea7cf
feat(webdav): delete privacy header and optimize 302 (#2534)
* fix: delete set-cookie from sharepoint webdav response header

* fix: avoid two redirects when using webdav

* fix: return the correct Content-Type instead of just `application/octet-stream`

* feat: webdav backend localOnly -> proxyOnly
2022-11-30 20:52:33 +08:00
Noah Hsu ddcba93eea
feat: multiple search indexes (#2514)
* refactor: abstract search interface

* wip: ~

* fix cycle import

* objs update hook

* wip: ~

* Delete search/none

* auto update index while cache changed

* db searcher

TODO: bleve init issue

cannot open index, metadata missing

* fix size type

why float64??

* fix typo

* fix nil pointer using

* api adapt ui

* bleve: fix clear & change struct
2022-11-28 13:45:25 +08:00
Noah Hsu 85e1350af8 fix: check password while upload (close #2444) 2022-11-22 16:14:01 +08:00
Noah Hsu 3b6d8987db chore: add id to resp of create storage 2022-11-13 20:17:10 +08:00
Gerhard Tan 00de9bf16d
fix!: sign with the raw path instead of filename (#2258) 2022-11-11 16:24:25 +08:00
BoYanZh 5f79d665d9
feat: add alist v3 driver (close #1833 pr #2129)
* feat: add alist v3 driver (close #1833)

* chore: use generics

Co-authored-by: Noah Hsu <i@nn.ci>
2022-10-27 10:54:49 +08:00
Noah Hsu dc73c2e97d fix: custom token expires in doesn't work 2022-09-27 14:23:56 +08:00
Noah Hsu 9d9c79179b feat: custom token expires in 2022-09-27 14:05:00 +08:00
Noah Hsu 7c32af4649 refactor!: move `api_url` and `base_path` to config file 2022-09-25 17:57:54 +08:00
Noah Hsu 77a6aa487b chore: cancel sign if no password 2022-09-11 14:14:14 +08:00
Noah Hsu a24dfddc2a feat: add 189cloud driver 2022-09-06 14:39:21 +08:00
Noah Hsu 7da9e33c4d fix: hide access_token in error message of `baidu_netdisk` 2022-09-03 19:48:11 +08:00
Noah Hsu 74007a1d45 chore: add pagination settings 2022-08-27 23:07:48 +08:00
Noah Hsu 02e2c809a8 chore: rename some request param 2022-08-14 23:52:14 +08:00
Noah Hsu af884010d1 feat: local storage image thumbnail 2022-08-11 20:32:17 +08:00
Noah Hsu 2b04cf4ac3 feat: custom hide error message by regexp (close #1468) 2022-08-08 12:53:53 +08:00
Noah Hsu d6437a337f feat: add provider to obj get api 2022-08-08 00:58:32 +08:00
Noah Hsu 0df3473337 feat: use cobra and add some command 2022-08-07 13:09:59 +08:00
Noah Hsu b51e664543 chore: go fmt 2022-08-03 14:26:59 +08:00
Noah Hsu a16da3b45e chore: fix typo 2022-07-12 18:41:16 +08:00
Noah Hsu 9ba7cf0835 chore: add base path setting 2022-07-02 16:43:07 +08:00
Noah Hsu 2b1726614b feat: webdav handle 2022-06-30 22:41:55 +08:00
Noah Hsu 40548926e6 feat: fs link api 2022-06-29 16:08:55 +08:00
Noah Hsu 96380a50da feat: file proxy handle 2022-06-28 21:58:46 +08:00
Noah Hsu d1efec4539 chore: common err resp log 2022-06-28 18:12:53 +08:00
Noah Hsu 67bc66fedf feat: file down handle 2022-06-28 18:00:11 +08:00
Noah Hsu 7c0b86a9cd feat: obj list api 2022-06-27 19:51:23 +08:00
Noah Hsu 6b9bca893b chore: change whether print log 2022-06-26 19:20:19 +08:00
Noah Hsu c67f128f15 chore: move server package to root 2022-06-26 19:10:14 +08:00