1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-06-01 11:35:11 +00:00
Commit Graph

34 Commits

Author SHA1 Message Date
feiniks
95f4fb3809
Set max conn and add read and write timeout (#682)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-22 18:06:15 +08:00
feiniks
738716496a
Fix security issue and add go linter (#677)
* Fix security issue and add go linter

* Fix error checked by golangci-lint

* Delete jwt-go pkg

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-12 14:59:45 +08:00
feiniks
49c860b50d
Get nickname use seahub API (#670)
* Get nickname use seahub API

* Add parse site_root

* Use regex to match SECRET_KEY

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-30 17:58:18 +08:00
feiniks
d51591d8f7
get nickname from seahub database (#663)
* Add parse seahub database config

* Get nickname from seahub database

* Go get nickname from seahub database

* Save output of script to memory and fix some errors

* Add exec permission and free child_output

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-10 16:34:33 +08:00
feiniks
9f5fcdfe4d
Add trace of pprof (#655)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-26 18:04:00 +08:00
feiniks
bd6b87c2e5
Support error log rotate and notification log rotate (#649)
* Support error log rotate and notification log rotate

* Add comment

* Modify log name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-12 22:47:43 +08:00
feiniks
864cef1c22
Support unix_socket option of database (#623)
* Support unix_socket option of database

* Set default auth plugin when use unix_socket

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-06-27 16:59:19 +08:00
feiniks
29e48dafa9
Allow comment sybols # and ; inside values (#615)
Co-authored-by: heran yang <heran.yang@seafile.com>
2023-05-31 15:11:44 +08:00
feiniks
b558426da8
Add ca_path and skip_verify option for mysql (#610)
* Add ca_path and skip_verify option for mysql

* Add comment

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-04-23 14:39:40 +08:00
feiniks
760e805fa0
Add skip_verify for go tls (#608)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-04-21 12:13:33 +08:00
feiniks
9173f217a4
Send repo update event to notification server (#602)
* Send repo update event to notification server

* Add option to manage configuration

* Init default options at start

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-03-11 12:14:39 +08:00
feiniks
47efb16c92
Set fixed_block_size unit to M (#589)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-01-05 17:06:34 +08:00
feiniks
d6f6127641
Add notification server (#535)
* Add notification server of go

Modify path of pkg

Send notification for update-repo event

Delete client pkg and use reflect select to send message

Modify output of log

Add formatter of log

Add jwt authentication

go add get jwt token api

CI support compile libjwt

Get group users from database

* Add ping to test mysql is alive

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-16 15:29:01 +08:00
feiniks
df78d10ec1 Reuse zlib ReadCloser and add timeout for get fs id list (#508)
* Reuse zlib ReadCloser and add timeout for get fs id list

* Reuse zlib reader

* Get seafile and seafdir with zlib reader

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Use json-iterator/go to parse fs objects (#510)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Add cache for seafdir (#511)

* Add cache for seafile and seafdir

* Add ttl for fs cache

* Use MB unit and add a comment

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Close object after reading finished (#512)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-06 10:45:39 +08:00
feiniks
be260e4c6a
Clear error when retry upload (#568)
* Clear error when retry upload

* Add go_log_level option

* Fix type mismatch

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-07-21 16:29:47 +08:00
feiniks
e14e820d5e
Modify profile option (#566)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-07-15 16:03:31 +08:00
feiniks
2be8f28df6
Add enable_profiling option (#563) 2022-07-13 17:58:48 +08:00
feiniks
625957bbf9
Add profile for go fileserver (#554) 2022-05-23 17:38:51 +08:00
feiniks
96b33251ce
Modify log format and don't print network error (#546)
* Modify log format and don't print network error

* Don't print network error and content canceled error

* Modify function name
2022-03-02 16:03:16 +08:00
feiniks
c461250dfa
Delete upload tmp file (#542)
* Delete upload tmp file

* Delete tmp file when upload finished

* Modify tmp_file_path to resumable_tmp_file
2022-02-12 11:29:39 +08:00
feiniks
8027161e1a
Add log rotate for go fileserver (#534) 2021-12-22 17:03:15 +08:00
feiniks
fc57f6a3ae
Replace Dup2 with Dup3 (#514) 2021-11-18 18:01:29 +08:00
Xiangyue Cai
086327d369
fix parse fileserver option (#510) 2021-11-04 14:59:46 +08:00
sun20121818
cb6cf3764f
Add a config for go fileserver (#497)
* Add a config for go fileserver

* Change after review.

* Change after review
2021-10-15 16:11:26 +08:00
Xiangyue Cai
0556b641a3
fix url (#499) 2021-09-29 17:09:02 +08:00
Xiangyue Cai
c2006c5443
improve log (#498)
* improve log

* write header after internal server error
2021-09-29 17:08:39 +08:00
Xiangyue Cai
f92331de80
fix typo (#494) 2021-09-26 10:31:18 +08:00
Xiangyue Cai
7f09cff78c
stderr to log (#488) 2021-08-31 17:52:33 +08:00
Xiangyue Cai
bd6b693ab5
add recover (#483)
* add recover

* improve code

* improve code

* use go routine
2021-08-10 10:43:08 +08:00
Xiangyue Cai
537226aca7
create merge virtual repo task pool (#473)
* create merge virtual repo task pool

* use for range
2021-06-30 11:21:57 +08:00
Xiangyue Cai
be4e0096cf
load default quota when start (#472)
* load default quota when start

* improve code
2021-06-26 18:40:00 +08:00
Xiangyue Cai
1a81f671e3
compatible with httpserver (#470) 2021-06-18 15:23:36 +08:00
Xiangyue Cai
d1e57781b5
add block map cache (#452) 2021-02-26 18:09:04 +08:00
Jiaqiang Xu
7420b8d738
Go fileserver (#437)
* Initial commit for fileserver written in golang.

[gofileserver] Fix some syntaxt errors.

Add fs backend and objstore test (#352)

* Add fs backend and objstore test

* modify test case and optimize fs backend

* Modify function name and first write temporary files

* Don't need to reopen the temp files

Add comment for objstore (#354)

* Add comment for objstore

* Modify comment

Add commitmgr and test case (#356)

* Add commitmgr and test case

* Redefine the interface

* Modify comment and interface

* Modify parameter and del unused method

* Add comment for FromData and ToData

Add blockmgr and test case (#357)

* Add blockmgr and test case

* Modify comment and interface

Add fsmgr and test case (#358)

* Add fsmgr and test case

* Add save interface and error details

* Modify errors and comments

Add searpc package and test case (#360)

* Add searpc package

* Add searpc test case

* Add return error and add Request struct

* Modify returned error

* Modify comments

add checkPerm (#369)

Add file and block download (#363)

* Add file and block download

* Modify init and use aes algorithm

* Get block by offset and add stat method

* Modify objID's type

* Fix reset pos after add start

* Add http error handing and record log when failed to read block or write block to response

* Modify http return code and value names

* Modify http return code and add log info

* Block read add comment and only repeat once

load ccnetdb and support sqlite (#371)

Add zip download (#372)

* Add zip download

* Modify pack dir and log info

* Modify http return code and use Deflate zip compression methods

add /repo/<repo-id>/permission-check (#375)

add /<repo-id>/commit/HEAD (#377)

add  /repo/<repo-id>/commit/<id> (#379)

add /repo/<repo-id>/block/<id> (#380)

add /repo/<repo-id>/fs-id-list (#383)

add /repo/head-commits-multi (#388)

Add file upload api (#378)

* Add file upload api

* Upload api implements post multi files and create relative path

* Modify handle error and save files directly

* Fix rebase conflict

* index block use channel and optimize mkdir with parents

* Handle jobs and results in a loop

* Mkdir with parents use postMultiFiles and use pointer of SeafDirent

* Del diff_simple size_sched virtual_repo

* Need to check the path with and without slash

* Modify merge trees and add merge test case

* Del postFile and don't close results channel

* Close the file and remove multipart temp file

* Modify merge test case and compare the first name of path

* Use pointer of Entries for SeafDir

* Add test cases for different situations

add /repo/<repo-id>/pack-fs (#389)

add POST /<repo-id>/check-fs and /<repo-id>/check-blocks (#396)

Merge compute repo (#397)

* Add update repo size and merge virtual repo

* Eliminate lint warnings

* Uncomment merge virtual repo and compute repo size

* Need init the dents

* Use interface{} param and modify removeElems

* Move update dir to file.go and modify logs

* Del sync pkg

add PUT /<repo-id>/commit/<commit-id> (#400)

add PUT /<repo-id>/block/<id> (#401)

add POST /<repo-id>/recv-fs (#398)

add PUT /<repo-id>/commit/HEAD (#402)

Add http return code (#403)

Add file update API (#399)

* Add file update API

* Add GetObjIDByPath and fix change size error

* Add traffic statistics for update api

add diffTrees unit test (#391)

add GET /accessible-repos (#406)

add GET /<repo-id>/block-map/<file-id> (#405)

Add test update repo size and merge virtual repo (#409)

* Update dir need update repo size

* Add test update repo size and merge virtual repo

* Add delay for test ajax

* Add delay before get repo size and modify comment

Use go fileserver for unit test (#410)

* Use go fileserver for unit test

* Blocking scheduling update repo size

* Add delay because of sqlite doesn't support concurrency

* Post use multipart form encode

* Del mysql database when test finished

* Fix merge virtual repo failed when use sqlite3

Add upload block API (#412)

fixed error

Add quota-check API (#426)

use diff package

* Use central conf for go fileserver (#428)

* Use central conf for go fileserver

* Fix log error

* use store id and remove share get repo owner (#430)

* Fix permission error (#432)

Co-authored-by: feiniks <36756310+feiniks@users.noreply.github.com>
Co-authored-by: Xiangyue Cai <caixiangyue007@gmail.com>
2021-01-04 11:41:53 +08:00