j2rong4cn
6de15b6310
feat(stream): enhance GetRangeReaderFromLink rate limiting ( #1528 )
...
* feat(stream): enhance GetRangeReaderFromLink rate limiting
* refactor(stream): update GetRangeReaderFromMFile to return *model.FileRangeReader
* refactor(stream): simplify context error handling in RateLimitReader, RateLimitWriter, and RateLimitFile
* refactor(net): replace custom LimitedReadCloser with readers.NewLimitedReadCloser
* fix(model): update Link.ContentLength JSON tag for correct serialization
* docs(model): add clarification to FileRangeReader usage comment
2025-11-04 23:56:09 +08:00
jenfonro
d88f0e8f3c
feat(net): support proxy configuration via config file ( #1359 )
...
* support proxy
* debug
* debug2
* del debug
* add proxy configuration with env var fallback
* comments to en
* refactor(env): fallback env
---------
Co-authored-by: jyxjjj <773933146@qq.com >
2025-11-04 09:01:35 +08:00
ILoveScratch
febbcd6027
feat(cache): improve cache management ( #1339 )
...
* feat(cache): improve cache management
* feat(disk-usage): add cache
* feat(disk-usage): add refresh
* fix(disk-usage): cache with ttl
* feat(cache): implement KeyedCache and TypedCache for improved caching mechanism
* fix(copy): update object retrieval to use Get instead of GetUnwrap
* refactor(cache): simplify DirectoryCache structure and improve object management
* fix(cache): correct cache entry initialization and key deletion logic in TypedCache
* refactor(driver): remove GetObjInfo interface and simplify Link function logic
https://github.com/OpenListTeam/OpenList/pull/888/files#r2430925783
* fix(link): optimize link retrieval and caching logic
* refactor(cache): consolidate cache management and improve directory cache handling
* fix(cache): add cache control based on storage configuration in List function
* .
* refactor: replace fmt.Sprintf with strconv for integer conversions
* refactor(cache): enhance cache entry management with Expirable interface
* fix(cache): improve link reference acquisition logic to handle expiration
* refactor: replace OnlyLinkMFile with NoLinkSF in driver configurations and logic
* refactor(link): enhance link caching logic with dynamic type keys based on IP and User-Agent
* feat(drivers): add LinkCacheType to driver configurations for enhanced caching
* refactor(cache): streamline directory object management in cache operations
* refactor(cache): remove unnecessary 'dirty' field from CacheEntry structure
* refactor(cache): replace 'dirty' field with bitwise flags
* refactor(io): 调高SyncClosers.AcquireReference的优先级
* refactor(link): 优化链接获取逻辑,增加重
* refactor(link): 添加RequireReference字段以增强链接管理
* refactor(link): 移除MFile字段,改用RangeReader
* refactor: 移除不必要的NoLinkSF字段
* refactor(cache): 修改目录缓存的脏标志定义和更新逻辑
* feat(cache): add expiration gc
---------
Co-authored-by: KirCute <951206789@qq.com >
Co-authored-by: KirCute <kircute@foxmail.com >
Co-authored-by: j2rong4cn <j2rong@qq.com >
2025-10-18 21:47:18 +08:00
j2rong4cn
da0c734aa3
fix(net): unable to pass HttpStatusCode ( #1397 )
2025-10-01 00:16:36 +08:00
KirCute
3936e736e6
feat(drivers): add a driver that divides large files into multiple chunks ( #1153 )
2025-09-19 19:27:35 +08:00
j2rong4cn
016ed90efa
feat(stream): fast buffer freeing for large cache ( #1053 )
...
Signed-off-by: j2rong4cn <36783515+j2rong4cn@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-08-16 17:19:52 +08:00
j2rong4cn
8cf15183a0
perf: optimize upload ( #554 )
...
* pref(115,123): optimize upload
* chore
* aliyun_open, google_drive
* fix bug
* chore
* cloudreve, cloudreve_v4, onedrive, onedrive_app
* chore(conf): add `max_buffer_limit` option
* 123pan multithread upload
* doubao
* google_drive
* chore
* chore
* chore: 计算分片数量的代码
* MaxBufferLimit自动挡
* MaxBufferLimit自动挡
* 189pc
* errorgroup添加Lifecycle
* 查缺补漏
* Conf.MaxBufferLimit单位为MB
* 。
---------
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top >
2025-08-05 21:42:54 +08:00
Seven
e93ab76036
feat(task-group): introduce TaskGroupCoordinator for coordinated task execution ( #721 )
...
* feat(task): add task hook,batch task
refactor(move): move use CopyTask
* Update internal/task/batch_task/refresh.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Signed-off-by: Seven <53081179+Seven66677731@users.noreply.github.com >
* fix: upload task allFinish judge
* Update internal/task/batch_task/refresh.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Signed-off-by: Seven <53081179+Seven66677731@users.noreply.github.com >
* feat: enhance concurrency safety
* 优化代码
* 解压缩
* 修复死锁
* refactor(move): move as task
* 重构,优化
* .
* 优化,修复bug
* .
* 修复bug
* feat: add task retry judge
* 代理Task.SetState函数来判断Task的生命周期
* chore: use OnSucceeded、OnFailed、OnBeforeRetry functions
* 优化
* 优化,去除重复代码
* .
* 优化
* .
* webdav
* Revert "fix(fs):After the file is copied or moved, flush the cache of the directory that was copied or moved to."
This reverts commit 5f03edd683 .
---------
Signed-off-by: Seven <53081179+Seven66677731@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: j2rong4cn <j2rong@qq.com >
2025-07-24 16:15:24 +08:00
j2rong4cn
0c461991f9
chore: standardize context keys with custom ContextKey type ( #697 )
...
* chore: standardize context keys with custom ContextKey type
* fix bug
* 使用Request.Context
2025-07-14 23:55:17 +08:00
j2rong4cn
cc01b410a4
perf(link): optimize concurrent response ( #641 )
...
* fix(crypt): bug caused by link cache
* perf(crypt,mega,halalcloud,quark,uc): optimize concurrent response link
* chore: 删除无用代码
* ftp
* 修复bug;资源释放
* 添加SyncClosers
* local,sftp,smb
* 重构,优化,增强
* Update internal/stream/util.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Signed-off-by: j2rong4cn <36783515+j2rong4cn@users.noreply.github.com >
* chore
* chore
* 优化,修复bug
* .
---------
Signed-off-by: j2rong4cn <36783515+j2rong4cn@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-12 17:57:54 +08:00
j2rong4cn
9557834342
[skip ci] chore(net): update test
2025-07-04 18:44:52 +08:00
j2rong4cn
f3920b02f7
fix(net): goroutine deadlock
2025-07-04 12:52:21 +08:00
j2rong4cn
ffb6c2a180
refactor: optimize stream, link, and resource management ( #486 )
...
* refactor: optimize stream, link, and resource management
* Link.MFile改为io.ReadSeeker类型
* fix (crypt): read on closed response body
* chore
* chore
* chore
2025-07-03 10:39:34 +08:00
itsHenry
c166fe6127
chore: remove exp and go mod tidy ( #440 )
2025-07-02 15:30:53 +08:00
MadDogOwner
874dc292ae
fix(gomod): go modules with tagged versions ( #499 )
...
fix: go modules with tagged versions
2025-07-01 09:54:50 +08:00
j2rong4cn
862b1c3c53
chore(net): remove unnecessary goroutine
2025-07-01 00:28:26 +08:00
j2rong4cn
103abc942e
refactor: pass api_url through context ( #457 )
...
* refactor: pass `api_url` through context
* 移除 LinkArgs.HttpReq
* pref(alias): 减少不必要下载代理
* 修复bug
* net: 支持1并发 分片下载
2025-06-30 15:48:05 +08:00
j2rong4cn
6d0d3ac612
fix: crypt: file already closed; net: concurrent download deadlock
2025-06-30 01:49:27 +08:00
j2rong4cn
23cfe8090b
pref(net): improve concurrent read and write buffer ( #416 )
...
* pref(net): improve concurrent read and write buffer
* chore
2025-06-27 15:18:11 +08:00
hshpy
639b5cf7c2
fix(net):empty file download error ( #282 )
2025-06-22 14:21:45 +08:00
Pikachu Ren
ca55b89322
remove alist from repo ( #230 )
...
* remove alist from repo
* remove alist from repo
* remove alist from repo
2025-06-20 17:41:16 +08:00
Kuingsmile
fdcc2f136e
chore: change module name to OpenListTeam/OpenList ( #2 )
...
* Enable blank issue
* chore(README.md): update docs (temporally)
* Update FUNDING.yml
* chore: purge README.md
* chore: change module name to OpenListTeam/OpenList
* fix: fix link errors
* chore: remove v3 in module name
* fix: resolve some conficts
* fix: resolve conficts
* docs: update with latest file
---------
Co-authored-by: ShenLin <773933146@qq.com >
Co-authored-by: Hantong Chen <cxwdyx620@gmail.com >
Co-authored-by: joshua <i@joshua.su >
Co-authored-by: Hantong Chen <70561268+cxw620@users.noreply.github.com >
2025-06-12 22:02:46 +08:00
j2rong4cn
a2f266277c
fix(net): unexpected write ( #8291 close #8281 )
2025-04-12 17:01:52 +08:00
j2rong4cn
ddffacf07b
perf: optimize IO read/write usage ( #8243 )
...
* perf: optimize IO read/write usage
* .
* Update drivers/139/driver.go
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top >
---------
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top >
2025-04-12 16:55:31 +08:00
j2rong4cn
a6304285b6
fix: revert "refactor(net): pass request header" ( #8269 )
...
5be50e77d9
2025-04-03 20:35:52 +08:00
j2rong4cn
b4e6ab12d9
refactor: FilterReadMeScripts ( #8154 close #8150 )
...
* refactor: FilterReadMeScripts
* .
2025-03-18 22:02:33 +08:00
j2rong4cn
4145734c18
refactor(net): pass request header ( #8031 close #8008 )
...
* refactor(net): pass request header
* feat(proxy): add `Etag` to response header
* refactor
2025-03-01 18:35:34 +08:00
KirCute_ECT
3b71500f23
feat(traffic): support limit task worker count & file stream rate ( #7948 )
...
* feat: set task workers num & client stream rate limit
* feat: server stream rate limit
* upgrade xhofe/tache
* .
2025-02-16 12:22:11 +08:00
j2rong4cn
2be0c3d1a0
feat(alias): add DownloadConcurrency and DownloadPartSize option ( #7829 )
...
* fix(net): goroutine logic bug (AlistGo/alist#7215 )
* Fix goroutine logic bug
* Fix bug
---------
Co-authored-by: hpy hs <hshpy.pengyu@gmail.com >
* perf(net): sequential and dynamic concurrency
* fix(net): incorrect error return
* feat(alias): add `DownloadConcurrency` and `DownloadPartSize` option
* feat(net): add `ConcurrencyLimit`
* pref(net): create `chunk` on demand
* refactor
* refactor
* fix(net): `r.Closers.Add` has no effect
* refactor
---------
Co-authored-by: hpy hs <hshpy.pengyu@gmail.com >
2025-01-27 20:08:39 +08:00
hshpy
331885ed64
fix(net): close of closed channel ( #7580 )
2024-12-17 22:04:27 +08:00
j2rong4cn
4c0cffd29b
fix(net): close of closed channel ( #7529 )
2024-11-21 22:39:14 +08:00
Mmx
34ada81582
fix(webdav): memory leak in HttpServer ( #7123 close #7088 )
...
* chore(webdav): fix warnings in HttpServe
* fix(webdav): HttpServe memory leak
2024-09-03 20:02:13 +08:00
1-1-2
51c95ee117
fix: decode body if enable gzip ( #7003 )
2024-08-15 22:25:53 +08:00
Mmx
b95df1d745
perf: use io copy with buffer pool ( #6389 )
...
* feat: add io methods with buffer
* chore: move io.Copy calls to utils.CopyWithBuffer
2024-04-25 20:11:15 +08:00
guangwu
2880ed70ce
fix: some typos ( #6283 )
...
Signed-off-by: guoguangwu <guoguangwug@gmail.com >
2024-04-02 16:50:30 +08:00
Rammiah
4448e08f5b
fix(net): Buf use Mutex ( #5823 )
...
Co-authored-by: Andy Hsu <i@nn.ci >
2024-01-05 12:20:08 +08:00
Andy Hsu
8020d42b10
fix: panic due to send on closed channel ( close #5729 )
2024-01-05 11:41:53 +08:00
guangwu
f904596cbc
chore: remove refs to deprecated io/ioutil ( #5519 )
...
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com >
2023-11-16 05:16:15 -06:00
Andy Hsu
f2f312b43a
fix: http response body not close on status >= 400 ( close #5163 )
2023-09-05 15:46:16 +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
Andy Hsu
1e3950c847
fix: copy tasks using multi-thread downloader can't be canceled ( #5028 )
...
#4981 related
2023-08-19 14:06:59 +08:00
Andy Hsu
5606c23768
perf(copy): use multi-thread downloader ( close #5000 )
2023-08-13 15:31:49 +08:00
Sean
15b7169df4
perf: multi-thread downloader, Content-Disposition ( #4921 )
...
general: enhance multi-thread downloader with cancelable context, immediately stop all stream processes when canceled;
feat(crypt): improve stream closing;
general: fix the bug of downloading files becomes previewing stream on modern browsers;
Co-authored-by: Sean He <866155+seanhe26@users.noreply.github.com >
Co-authored-by: Andy Hsu <i@nn.ci >
2023-08-04 15:29:54 +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