76 Commits

Author SHA1 Message Date
Kuingsmile
f4dcf4599c
fix: add error handling for webdav mkcol according to RFC 4918 (#5581)
* feat: add error handling for mkcol method in webdav.go

* feat: update rfc reference

* fix: fix issue with uncorrect error handling
2023-11-27 18:53:52 +08:00
Andy Hsu
352a6a741a feat(webdav): support copy directly without task (close #5206) 2023-09-13 15:45:57 +08:00
Andy Hsu
d5b68a91d2 fix(webdav): optimize HEAD request (close #5182) 2023-09-06 16:32:51 +08:00
Sean
a3748af772
feat: misc improvements about upload/copy/hash (#5045)
general: add createTime/updateTime support in webdav and some drivers
general: add hash support in some drivers
general: cross-storage rapid-upload support
general: enhance upload to avoid local temp file if possible
general: replace readseekcloser with File interface to speed upstream operations
feat(aliyun_open): same as above
feat(crypt): add hack for 139cloud

Close #4934 
Close #4819 

baidu_netdisk needs to improve the upload code to support rapid-upload
2023-08-27 21:14:23 +08:00
Sean
3c21a9a520
feat: Crypt driver, improve http/webdav handling (#4884)
this PR has several enhancements, fixes, and features:
- [x] Crypt: a transparent encryption driver. Anyone can easily, and safely store encrypted data on the remote storage provider.  Consider your data is safely stored in the safe, and the storage provider can only see the safe, but not your data.
  - [x] Optional: compatible with [Rclone Crypt](https://rclone.org/crypt/). More ways to manipulate the encrypted data.
  - [x] directory and filename encryption
  - [x] server-side encryption mode (server encrypts & decrypts all data, all data flows thru the server)
- [x] obfuscate sensitive information internally
- [x] introduced a server memory-cached multi-thread downloader.
  - [x] Driver: **Quark** enabled this feature, faster load in any single thread scenario. e.g. media player directly playing from the link, now it's faster.
- [x] general improvement on HTTP/WebDAV stream processing & header handling & response handling
  - [x] Driver: **Mega** driver support ranged http header
  - [x] Driver: **Quark** fix bug of not closing HTTP request to Quark server while user end has closed connection to alist

## Crypt, a transparent Encrypt/Decrypt Driver. (Rclone Crypt compatible)

e.g.  
Crypt mount path ->  /vault 
Crypt remote path -> /ali/encrypted
Aliyun mount paht -> /ali

when the user uploads a.jpg to /vault, the data will be encrypted and saved to /ali/encrypted/xxxxx. And when the user wants to access a.jpg,  it's automatically decrypted, and the user can do anything with it.
Since it's Rclone Crypt compatible, users can download /ali/encrypted/xxxxx  and decrypt it with rclone crypt tool. Or the user can mount this folder using rclone, then mount the decrypted folder in Linux...

NB.  Some breaking changes is made to make it follow global standard, e.g. processing the HTTP header properly.

close #4679 
close #4827 

Co-authored-by: Sean He <866155+seanhe26@users.noreply.github.com>
Co-authored-by: Andy Hsu <i@nn.ci>
2023-08-02 14:40:36 +08:00
Andy Hsu
8bdc67ec3d fix(webdav): return 404 if error happened on handlePropfind 2023-07-05 13:52:21 +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
Andy Hsu
8711f2a1c5 feat(quark): shard request file (close #4175) 2023-04-17 15:33:38 +08:00
Andy Hsu
0f8a84f67e perf(alias): disabled log on fs call (close #4054) 2023-04-07 00:02:07 +08:00
Andy Hsu
0d3146b51d fix(webdav): disable put with empty path (close #3569) 2023-02-23 21:19:50 +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 4e20daaf9e700da047000d4fd4900abbe05c3848.

* 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
Ovear
0838feeb82
fix:introduce buffered response writer for webdav, fix status/error return failed. (#2544)
* fix: introduce buffered response writer for webdav, fix webdav status/error return failed.

* fix: bypass buffered writer for GET/HEAD/POST requests
2022-12-02 17:59:59 +08:00
Noah Hsu
b5bf5f4325 fix: check if the req path is relative path (close #2531) 2022-11-30 21:38:00 +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
83644dab85 fix: mapping filename in GetName
some missed filename mapping
2022-11-30 20:46:54 +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
Gerhard Tan
00de9bf16d
fix!: sign with the raw path instead of filename (#2258) 2022-11-11 16:24:25 +08:00
Noah Hsu
18cd45d257 fix: disable cache for 302 redirect (close #2216) 2022-11-05 15:54:51 +08:00
Noah Hsu
8c69260972 fix(webdav): set mime by ext if it's empty 2022-10-09 19:29:55 +08:00
Noah Hsu
ca177cc3b9 fix: set default mimetype to empty string (close #1710) 2022-09-19 18:58:40 +08:00
Noah Hsu
7ad3748a46 feat: update cache after remove instead of clear 2022-09-14 20:28:52 +08:00
Noah Hsu
57bcd376b4 fix(webdav): incorrect href if base_path isn't root (close #1629) 2022-09-10 19:27:34 +08:00
Noah Hsu
0f2425ce53 feat: add teambition driver 2022-09-02 18:24:14 +08:00
Noah Hsu
06e15fc149 feat: encode path of url (close #1351) 2022-08-12 14:51:23 +08:00
Noah Hsu
af884010d1 feat: local storage image thumbnail 2022-08-11 20:32:17 +08:00
Noah Hsu
b51e664543 chore: go fmt 2022-08-03 14:26:59 +08:00
Noah Hsu
fc1204c914 chore: rename account to storage 2022-07-10 14:45:39 +08:00
Noah Hsu
4340a48633 fix: put as task from web 2022-07-01 15:11:18 +08:00
Noah Hsu
4d0ae6b1ef fix: webdav move contains rename 2022-06-30 22:55:23 +08:00
Noah Hsu
53416172e7 feat: clear cache after change 2022-06-30 22:51:49 +08:00
Noah Hsu
2b1726614b feat: webdav handle 2022-06-30 22:41:55 +08:00
Noah Hsu
dd013ac0b2 chore: add webdav package 2022-06-30 18:27:26 +08:00
Noah Hsu
b76060570e refactor: init v3 2022-06-06 16:28:37 +08:00
WntFlm
658fd5ad6e fix(webdav): empty mimeType
Now mimeType will always be a non-empty string, by defaulting it to "application/octet-stream".
2022-05-01 09:42:25 +08:00
Xhofe
75c98429bf fix(webdav): wrong MIMEType (close #1007) 2022-04-29 14:09:51 +08:00
Xhofe
27b7dae113 feat(webdav): support range get 2022-04-23 22:43:02 +08:00
Xhofe
c5d707cf0a fix: multilevel virtual path (close #904) 2022-04-06 15:23:10 +08:00
Xhofe
0537449335 fix(webdav): virtual path no account 2022-04-01 21:57:55 +08:00
Xhofe
df90311453 fix(webdav): alist path not found 2022-04-01 20:40:57 +08:00
Xhofe
ced61da33a feat: virtual path 2022-03-31 20:43:17 +08:00
Xhofe
83c377270e fix(webdav): add sign for webdav proxy 2022-03-29 16:34:22 +08:00
Xhofe
908cdd2c78 revert: undo delete upFileMap 2022-03-17 21:57:54 +08:00
Xhofe
f4f61a5787 fix(webdav): nil pointer error (close #749) 2022-03-17 21:23:10 +08:00
Xhofe
cb53ddc8e8 🐛 fix nil pointer 2022-02-16 16:10:39 +08:00
Xhofe
4371c470b3 webdav direct proxy 2022-02-13 15:57:42 +08:00
Xhofe
6827af3997 🎇 close #522 hide account for guest webdav 2022-02-11 16:19:55 +08:00
微凉
3201b6da76 🐛 fix #376 windows webdav upload 2022-02-02 18:48:34 +08:00
微凉
2434ac54d0 🐛 fix webdav 2022-01-29 18:36:22 +08:00