Commit Graph

141 Commits (d428eeb737edfca0d10839d2225733fdabbd2137)

Author SHA1 Message Date
Andy Hsu 0f8a84f67e perf(alias): disabled log on fs call (close #4054) 2023-04-07 00:02:07 +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
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
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
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 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
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
BoYanZh be8a9c5f07
fix: mark progress as done after clear (#3086) 2023-01-18 09:39:32 +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
BoYanZh 3af23f6792
feat: batch reload all storages (close #2762 pr #2775) 2022-12-21 19:21:18 +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
foxxorcat 62a06fa0f9
feat: optimize file operation interface (#2757)
* feat: optimize file operation interface

* chore: fix typo

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-20 15:02:40 +08:00
foxxorcat 6024e8d832
refactor: split the db package hook and cache to the op package (#2747)
* refactor:separate the setting method from the db package to the op package and add the cache

* refactor:separate the meta method from the db package to the op package

* fix:setting not load database data

* refactor:separate the user method from the db package to the op package

* refactor:remove user JoinPath error

* fix:op package user cache

* refactor:fs package list method

* fix:tile virtual paths (close #2743)

* Revert "refactor:remove user JoinPath error"

This reverts commit 4e20daaf9e.

* clean path directly may lead to unknown behavior

* fix: The path of the meta passed in must be prefix of reqPath

* chore: rename all virtualPath to mountPath

* fix: `getStoragesByPath` and `GetStorageVirtualFilesByPath`

is_sub_path:

/a/b isn't subpath of /a/bc

* fix: don't save setting if hook error

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-18 19:51:20 +08:00
foxxorcat fb64f00640
refactor: obj name mapping and internal path processing (#2733)
* refactor:Prepare to remove the get interface

* feat:add obj Unwarp interface

* refactor:obj name mapping and program internal path processing

* chore: fix typo

* feat: unwrap get

* fix: no use op.Get to get parent id

* fix: set the path uniformly

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-17 19:49:05 +08:00
BoYanZh 6f1aeb47fd
feat: index enhancement (close #2632 pr #2636)
* feat: index paths as setting

* feat: clear index (#2632)

* feat: check indexMQ more frequently
2022-12-09 10:02:13 +08:00
Noah Hsu 2dd30f2b77 feat(search): support with password 2022-12-07 10:45:02 +08:00
BoYanZh 6e23c8b4c0
feat: partial update index (close #2593 close #2621 pr #2624) 2022-12-07 10:41:52 +08:00
Noah Hsu e65e8be59e fix(search): missed base_path of user for parent (close #2611) 2022-12-06 17:28:39 +08:00
Noah Hsu bf8b6f4c2c feat: customize ignore paths of indexes 2022-12-05 16:45:11 +08:00
Noah Hsu bd33c200dc feat: optimize index build 2022-12-05 16:07:36 +08:00
BoYanZh 8c0dfe2f3d
feat: Search enhancement (#2562)
* feat: ignore AList storage on indexing

* fix: remove unused err in `walkFn`

* chore(ci): fix auto_lang trigger and run it

* feat: batch index

* feat: quit index & init index

* feat: set DocType for bleve data

* fix: build index cleanup check origin err
2022-12-05 13:28:39 +08:00
BoYanZh 4c5be5f07f
feat: only show `CanAccess` search results (#2548)
* feat: only show `CanAccess` search results

* have done in frontend

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-02 10:09:39 +08:00
Noah Hsu 4980b71ba3 fix: add hide check to `canAccess` (close #2532) 2022-11-30 22:01:33 +08:00
Noah Hsu b5bf5f4325 fix: check if the req path is relative path (close #2531) 2022-11-30 21:38:00 +08:00
Noah Hsu 83644dab85 fix: mapping filename in `GetName`
some missed filename mapping
2022-11-30 20:46:54 +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
BoYanZh 330a767fd7
feat: build index & search with bleve (close #1740 pr #2386)
* feat: build index & search with bleve (#1740)

* delete unused struct

Co-authored-by: Noah Hsu <i@nn.ci>
2022-11-24 11:46:47 +08:00
Noah Hsu 85e1350af8 fix: check password while upload (close #2444) 2022-11-22 16:14:01 +08:00
Noah Hsu c09800790b feat: custom filename char mapping
fixes #2447 #2446 #2440 #2409 #2006 #1979 #1507 #324 #691 #518 #430
2022-11-22 15:54:18 +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
Noah Hsu 26a29f20c3 fix: missed encode path while use down proxy (close #2208) 2022-11-06 14:46:47 +08:00
Noah Hsu 18cd45d257 fix: disable cache for 302 redirect (close #2216) 2022-11-05 15:54:51 +08:00
Noah Hsu e75f19e9c0 feat: add `Referrer-Policy` while redirect (pr #2160) 2022-11-01 19:19:08 +08:00
Noah Hsu 4d6ab53336 feat: add form upload api (close #1693 #1709) 2022-09-22 16:53:58 +08:00
Noah Hsu c7f6684eed chore: add `provider` to fs list resp 2022-09-22 16:04:10 +08:00
Noah Hsu 5548ab62ac fix: write does not take effect on the current dir (close #1711) 2022-09-19 13:35:37 +08:00
Noah Hsu d6d82c3138 fix: page crashes if ipa name contains chinese (close #1712) 2022-09-19 13:33:23 +08:00
Noah Hsu 2185839236 chore: safe base64 decode ipa name 2022-09-18 20:17:24 +08:00
Noah Hsu f80be96cf9 chore: replace sep `_` with `@` of ipa name 2022-09-18 16:53:39 +08:00
Noah Hsu b74b55fa4a feat: support custom `bundle-identifier` by filename 2022-09-17 21:33:39 +08:00
Noah Hsu d436a6e676 fix: use base64 encode for ipa install 2022-09-17 17:06:08 +08:00
Noah Hsu 7ad3748a46 feat: update cache after remove instead of clear 2022-09-14 20:28:52 +08:00
Noah Hsu 66b2562d03 fix: allow force root while fetch dirs (close #1671) 2022-09-14 19:57:39 +08:00
Noah Hsu 54ae6dce0b fix(fs/get): rawURL if use proxy (close #1664) 2022-09-13 20:02:57 +08:00
foxxorcat 6b5236f52e feat: add baidu_photo driver 2022-09-12 17:10:02 +08:00
Noah Hsu 77a6aa487b chore: cancel sign if no password 2022-09-11 14:14:14 +08:00
Noah Hsu 5ad3849bb6 fix: if use down proxy url 2022-09-09 20:54:11 +08:00
Noah Hsu a24dfddc2a feat: add 189cloud driver 2022-09-06 14:39:21 +08:00
Noah Hsu 0f2425ce53 feat: add teambition driver 2022-09-02 18:24:14 +08:00
Noah Hsu 7ac1d14eeb style: shorten name `operations` to `op` 2022-08-31 21:01:15 +08:00
Noah Hsu 59ec17a353 feat: add driver config in driver info 2022-08-30 14:39:10 +08:00
Noah Hsu 68a125491b chore: add refresh arg in list func 2022-08-29 19:15:52 +08:00
Noah Hsu d267c43556 feat: static file router 2022-08-28 23:13:03 +08:00
Noah Hsu e5480b99be chore: decode filePath in header 2022-08-28 20:46:33 +08:00
Noah Hsu 5ab5cc327f feat: generate plist for ipa 2022-08-28 15:23:00 +08:00
Noah Hsu e9927806d4 fix(local): return `ObjectNotFound` if can't find file 2022-08-19 11:02:00 +08:00
Noah Hsu 02e2c809a8 chore: rename some request param 2022-08-14 23:52:14 +08:00
Noah Hsu 06e15fc149 feat: encode path of url (close #1351) 2022-08-12 14:51:23 +08:00
Noah Hsu 74f1154e5e feat: add disable option for storage (close #1476) 2022-08-11 21:08:50 +08:00
Noah Hsu af884010d1 feat: local storage image thumbnail 2022-08-11 20:32:17 +08:00
Noah Hsu 669ccc40a1 chore: change related of fs get api 2022-08-10 10:48:14 +08:00
Noah Hsu d6437a337f feat: add provider to obj get api 2022-08-08 00:58:32 +08:00
Noah Hsu 61fa6f38a8 feat: add type to fs read api 2022-08-08 00:51:05 +08:00
Noah Hsu 1fd4ebe53e feat: add related objs while get obj 2022-08-07 21:01:29 +08:00
Noah Hsu 2b5da3ef34 feat: cancel 2fa api 2022-08-07 11:59:33 +08:00
Noah Hsu d01958a6bf chore: and otp to current user resp 2022-08-06 17:21:32 +08:00
Noah Hsu a6ed4afdae feat: 2fa/otp support 2022-08-06 01:22:13 +08:00
Noah Hsu b51e664543 chore: go fmt 2022-08-03 14:26:59 +08:00
Noah Hsu 721f18a7f4 feat: fs other api 2022-08-03 14:14:37 +08:00
Noah Hsu 2a68c3cc7b feat: add thumbnail to list resp 2022-08-03 13:03:45 +08:00
Noah Hsu c7128133d6 chore: rename remove to delete 2022-07-31 21:42:01 +08:00
Noah Hsu cb06d3a19a feat: remove and clear task 2022-07-31 21:21:54 +08:00
Noah Hsu be452aafde chore: fix err nil pointer 2022-07-30 22:04:21 +08:00
Noah Hsu 53fd09814a feat: user and meta get api 2022-07-27 17:41:25 +08:00
Noah Hsu 9d92834ee3 chore: password can be empty when update me 2022-07-23 20:49:16 +08:00
Noah Hsu 4f3129ec28 feat: change current user's profile 2022-07-23 20:42:12 +08:00
Noah Hsu 184b9d1e6c feat: get storage by id api 2022-07-18 23:02:14 +08:00
Noah Hsu a16da3b45e chore: fix typo 2022-07-12 18:41:16 +08:00
Noah Hsu fbc858b43c chore: optimize get settings 2022-07-12 14:03:03 +08:00
Noah Hsu 4ac312fd07 chore: add version to aria handle 2022-07-12 14:02:29 +08:00
Noah Hsu dc38f21294 chore: rename controllers to handles 2022-07-11 17:12:50 +08:00