Compare commits

..

140 Commits

Author SHA1 Message Date
Xhofe 4e6a44253c chore: Merge pull request #958 from Xhofe/dev
Dev 2.4.0
2022-04-17 17:29:02 +08:00
Xhofe ebda77cd43 docs: add sharepoint to webdav 2022-04-17 17:16:39 +08:00
Xhofe 1a1e86521f fix(quark): lost files while number of files > 100 (fix #947) 2022-04-16 21:06:33 +08:00
Xhofe 1b4740dae3 fix: file deduplication (fix #941) 2022-04-16 17:28:16 +08:00
Xhofe 91fc8df84e build: cancel static link for darwin 2022-04-16 17:08:48 +08:00
Xhofe e6ecf1fa30 feat(189): add tips get page 2022-04-16 17:08:21 +08:00
Xhofe 183a6f1b3a build: static link for compile 2022-04-16 16:55:55 +08:00
Xhofe 3c2d59e272 build: use crazymax/xgo 2022-04-16 16:43:21 +08:00
Xhofe fd80e3eaf7 build: Use -buildvcs=false to disable VCS stamping 2022-04-16 15:23:21 +08:00
Xhofe 4928c331a8 build: upgrade go version 2022-04-16 15:04:28 +08:00
foxxorcat 3ad75e54cb refactor(baidu): add a crack api of download
* 修复百度网盘API文件大于20M问题

* refactor: keep the official api

Co-authored-by: Xhofe <i@nn.ci>
2022-04-16 14:52:36 +08:00
Xhofe a2cf3ab42e workflow: add checkboxes for issue template 2022-04-14 22:16:15 +08:00
Xhofe e24814ee2f chore: Merge pull request #938 from Xhofe/feature/search
Feature/search
2022-04-13 21:57:59 +08:00
Xhofe 37b42e6e17 fix(sftp): add port 2022-04-12 20:22:09 +08:00
Xhofe 30ebb0f4d4 feat: support other region sharepoint with webdav 2022-04-12 09:54:22 +08:00
Xhofe 8e059c64b5 feat: webdav for sharepoint online (#460) 2022-04-11 21:32:38 +08:00
Xhofe 395de069c2 fix: extract_folder causes sorting confusion (close #929) 2022-04-11 16:50:47 +08:00
Xhofe 4c22f37d54 fix(search): file type 2022-04-08 22:47:04 +08:00
Xhofe a73a40133d feat: search api 2022-04-08 22:03:26 +08:00
Xhofe 6591af58ea feat: store search file index 2022-04-08 21:51:21 +08:00
Xhofe 58568d4ef6 fix(189cloud): remove empty Authorization 2022-04-07 16:56:50 +08:00
Xhofe 5295593bf8 fix(189cloudpc): wrong modified time (close #910) 2022-04-06 17:59:45 +08:00
Xhofe 24d031d578 feat: clear temp file while start 2022-04-06 16:24:31 +08:00
Xhofe 7141bf0358 build: static compilation for musl 2022-04-06 16:19:15 +08:00
Xhofe c5d707cf0a fix: multilevel virtual path (close #904) 2022-04-06 15:23:10 +08:00
Xhofe dfcf66b43e fix(native): set size of folder to 0 2022-04-06 15:11:03 +08:00
Xhofe fa6ee62cf0 feat: global readme url 2022-04-05 20:17:27 +08:00
Xhofe 1428d90361 feat: meta readme 2022-04-05 20:17:16 +08:00
Xhofe c413c22201 fix(quark): denied by Referer ACL 2022-04-04 20:55:48 +08:00
Xhofe 9b6adecd62 feat: sharepoint webdav (unfinished) 2022-04-04 20:55:22 +08:00
Xhofe b3540cf539 docs: add SFTP in readme [skip ci] 2022-04-03 18:20:33 +08:00
Xhofe f8650c9c0b fix(webdav): remove default Authorization header (close #893) 2022-04-03 18:19:15 +08:00
foxxorcat bf2e5768d6 feat: add rapid upload switch for 189pc and alidrive (#892)
* 189PC增加快传开关

* alidrive增加快传开关
2022-04-03 17:56:21 +08:00
Xhofe 18c82e79b5 feat: sftp support 2022-04-02 19:28:43 +08:00
Xhofe d69d24a5b2 fix(alidrive): judge status of delete folder (close #886) 2022-04-02 14:34:34 +08:00
Xhofe 342729179d chore: Merge pull request #884 from Xhofe/dev
fix: some issues of webdav due to virtual path
2022-04-01 22:02:39 +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 876579ea3b chore: Merge pull request #874 from Xhofe/dev
support mount to root path
2022-04-01 09:42:37 +08:00
Xhofe e83081380e workflow: cancel build docker for pr 2022-04-01 09:40:53 +08:00
Xhofe 9daeaf7562 fix: virtual path, support mount to root path 2022-04-01 09:40:08 +08:00
Xhofe e6be11c17f chore: Merge pull request #873 from Xhofe/dev
fix: load balance
2022-03-31 22:04:37 +08:00
Xhofe b52e1e8be3 fix: load balance 2022-03-31 21:52:19 +08:00
Xhofe 948bbe9136 chore: Merge pull request #872 from Xhofe/dev
fix quark cookie, virtual path
2022-03-31 20:58:56 +08:00
Xhofe ced61da33a feat: virtual path 2022-03-31 20:43:17 +08:00
Xhofe a0f4383d41 feat(quark): set status 2022-03-30 14:06:50 +08:00
Xhofe 5a527dfa2c feat(xunlei): set timeout 2022-03-30 00:18:20 +08:00
Xhofe 49fc475f9f feat(s3): create placeholder file for mkdir 2022-03-30 00:18:00 +08:00
Xhofe 83c377270e fix(webdav): add sign for webdav proxy 2022-03-29 16:34:22 +08:00
Xhofe 7ffaef0de6 fix: audio and video types 2022-03-28 21:53:57 +08:00
Xhofe dd151480a8 fix(alidrive): change response of move and copy 2022-03-28 21:51:24 +08:00
Xhofe ad3121d367 fix(quark): __puus expired (close #830) 2022-03-28 21:38:05 +08:00
Xhofe c1525ebc69 feat: cookie operate util 2022-03-28 21:10:20 +08:00
Xhofe 30277cd81f docs: change blog address [skip ci] 2022-03-27 20:23:18 +08:00
Xhofe 466ec27ffe chore: Merge pull request #825 from Xhofe/dev
docs: add disclaimer
2022-03-27 20:17:36 +08:00
Xhofe 85c757b035 docs: add disclaimer 2022-03-27 20:16:06 +08:00
Xhofe 712687370a chore: Merge pull request #823 from Xhofe/dev
fix some issues
2022-03-26 23:54:17 +08:00
Xhofe b68ba22df3 workflow: issue invalid bot 2022-03-26 23:51:25 +08:00
Xhofe d9652e2a0b fix(189cloud): link force https (close #821) 2022-03-26 21:59:18 +08:00
Xhofe a5b757b251 feat: customize audio/video types (close #819) 2022-03-26 17:10:37 +08:00
Xhofe 0bc05a60b0 feat(189pc): override upload 2022-03-23 18:51:07 +08:00
Xhofe db275f885a fix: DProxyTypes judge 2022-03-22 19:53:26 +08:00
Xhofe 9e483d902f feat: adapt postgres (close #740) 2022-03-22 16:41:38 +08:00
Xhofe 801f843f8a workflow: reproduction is required [skip ci] 2022-04-05 03:24:51 +08:00
Xhofe 77ffb93cbe feat: multiple down proxy urls (close #793) 2022-03-20 16:53:30 +08:00
Xhofe bf73ea7f5d chore: Merge pull request #787 from Xhofe/dev
fix some issues of webdav
2022-03-19 14:57:38 +08:00
Xhofe 9b23d0ab29 docs: add sponsors [skip ci] 2022-03-18 17:08:43 +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
foxxorcat 6db09a2736 fix: xunlei upload error (#749) 2022-03-17 21:13:13 +08:00
Xhofe b21801d505 fix: clear cookie for 189 cloud login 2022-03-16 18:02:11 +08:00
foxxorcat 2dbedc245c fix: 189 family cloud upload (#761) 2022-03-16 14:22:42 +08:00
Xhofe 58426613f6 feat: add tls config for mysql (fix #758) 2022-03-15 17:05:54 +08:00
Xhofe ef19e851e3 fix: check local ip for 123pan 2022-03-15 14:48:39 +08:00
Xhofe 5a1b16a601 feat: set overwrite for aliyundrive upload 2022-03-14 22:43:27 +08:00
Xhofe 4eef9cd9bc fix: nil pointer while delete baidu account (close #751) 2022-03-14 20:40:42 +08:00
Xhofe 79b5c018ea workflow: add translation for duplicate issue [skip ci] 2022-03-14 18:09:38 +08:00
Xhofe 15651a4356 feat: only show files (close #735) 2022-03-13 19:37:58 +08:00
Xhofe 7be476cce0 fix: wrong dockerfile 2022-03-13 19:00:19 +08:00
Xhofe bb017c5f6d feat: remove env prefix for docker 2022-03-13 17:01:45 +08:00
Xhofe c51dc4594d chore: add tips for announcement 2022-03-13 16:46:06 +08:00
Xhofe 8e30b02efc fix: cache config env typo 2022-03-13 16:38:12 +08:00
Xhofe 0aa438dce4 feat: add announcement setting 2022-03-12 21:09:33 +08:00
Xhofe 9c2fc8e860 feat: read config from environment 2022-03-12 20:38:22 +08:00
Xhofe b1d7a980d9 feat: echo password while start every time 2022-03-12 00:24:55 +08:00
Xhofe 19d0a88b55 fix: cookie lanzou file with password 2022-03-11 19:48:32 +08:00
Xhofe 40567dee0e fix: lanzou url password 2022-03-11 19:16:21 +08:00
Xhofe 4b540a2297 feat: skip creating an existing folder 2022-03-11 18:12:13 +08:00
Xhofe 8a62d55efe feat(google): add default client 2022-03-10 20:08:10 +08:00
foxxorcat 10fce6c0fe fix(xunlei): some issues about page turning(#716) 2022-03-09 22:48:15 +08:00
Xhofe d31d49a9bb fix(189pc): some minor issues 2022-03-09 21:09:21 +08:00
foxxorcat 2e91f5ffa5 feat: support 189 family cloud (close #612) 2022-03-09 20:30:56 +08:00
Xhofe 8f19c45a81 feat: pikpak video use media link 2022-03-09 15:11:12 +08:00
Xhofe c63e05983d fix: 189cloud big file download (close #683) 2022-03-07 15:04:20 +08:00
Xhofe 678a982535 feat: add sleep for lanzou request (close #690) 2022-03-07 14:36:25 +08:00
Xhofe b2c02e6c5e feat: add driver template 2022-03-06 21:33:58 +08:00
Xhofe 7e05b0317f chore: Merge pull request #689 from Xhofe/dev
docs: add Contributing and move Contributors
2022-03-06 20:49:14 +08:00
Xhofe 19f06dfaed docs: fix typo [skip ci] 2022-03-06 20:44:37 +08:00
Xhofe 1680a18578 docs: move CONTRIBUTORS [skip ci] 2022-03-06 20:38:30 +08:00
Xhofe e8f440ca5c docs: create CONTRIBUTING.md [skip ci] 2022-03-06 20:30:17 +08:00
Xhofe 7deff76f49 chore: Merge pull request #687 from Xhofe/all-contributors/add-Clansty
docs: add Clansty as a contributor for doc
2022-03-06 17:36:13 +08:00
allcontributors[bot] cd0afb9536 docs: update .all-contributorsrc [skip ci] 2022-03-06 09:35:08 +00:00
allcontributors[bot] 668a953cd8 docs: update README_cn.md [skip ci] 2022-03-06 09:35:07 +00:00
allcontributors[bot] 8bfbaa74f6 docs: update README.md [skip ci] 2022-03-06 09:35:06 +00:00
Xhofe 3ccf5ee620 fix: ipa plist key 2022-03-05 15:33:04 +08:00
Xhofe b44243c021 feat: ipa name decode 2022-03-05 15:13:19 +08:00
foxxorcat 4ae81b5a79 feat: aliyundrive fast upload (#652) 2022-03-05 13:14:57 +08:00
Xhofe 189f4c19a5 release: release v2.1.1 2022-03-04 21:00:39 +08:00
Xhofe 92a3d74af5 chore: Merge pull request #675 from Xhofe/all-contributors/add-vg-land [skip ci]
docs: add vg-land as a contributor for code
2022-03-04 20:16:17 +08:00
allcontributors[bot] bb73a10332 docs: update .all-contributorsrc [skip ci] 2022-03-04 12:14:55 +00:00
allcontributors[bot] 3baf1e8c7b docs: update README_cn.md [skip ci] 2022-03-04 12:14:54 +00:00
allcontributors[bot] fdb49f5fb4 docs: update README.md [skip ci] 2022-03-04 12:14:53 +00:00
Xhofe 2eedcc1626 feat: opus preview (#638) 2022-03-04 10:05:15 +08:00
Xhofe 6faecbd5d8 feat: add cache for xunlei 2022-03-04 09:55:37 +08:00
Xhofe 34ed05c62f style: go mod tidy 2022-03-04 09:52:08 +08:00
Xhofe ce83d6eb40 build: fix dev build 2022-03-04 09:50:47 +08:00
Xhofe 2271cb6c7c docs: replace preview image [skip ci] 2022-03-03 23:30:45 +08:00
allcontributors[bot] a42b30c96e docs: update .all-contributorsrc [skip ci] 2022-03-03 23:28:37 +08:00
allcontributors[bot] ce25d16222 docs: update README_cn.md [skip ci] 2022-03-03 23:28:37 +08:00
allcontributors[bot] b392e093e3 docs: update README.md [skip ci] 2022-03-03 23:28:37 +08:00
allcontributors[bot] 0d5b7298db docs: update .all-contributorsrc [skip ci] 2022-03-03 23:27:19 +08:00
allcontributors[bot] 2063ebb74d docs: update README_cn.md [skip ci] 2022-03-03 23:27:19 +08:00
allcontributors[bot] 0408d7ab5d docs: update README.md [skip ci] 2022-03-03 23:27:19 +08:00
allcontributors[bot] d52451f9d2 docs: update .all-contributorsrc [skip ci] 2022-03-03 23:24:46 +08:00
allcontributors[bot] ca9f77006a docs: update README_cn.md [skip ci] 2022-03-03 23:24:46 +08:00
allcontributors[bot] e8e8d925f3 docs: update README.md [skip ci] 2022-03-03 23:24:46 +08:00
Xhofe 623aab4c28 docs: move all contributors 2022-03-03 23:17:13 +08:00
allcontributors[bot] 3bc81d471e docs: create .all-contributorsrc [skip ci] 2022-03-03 23:00:34 +08:00
allcontributors[bot] dfddb5cfa1 docs: update README.md [skip ci] 2022-03-03 23:00:34 +08:00
Xhofe 80f5bde0cb build: just upx linux/amd64 2022-03-03 19:44:13 +08:00
Xhofe 9de072161e docs: add xunlei cloud (#659) 2022-03-03 19:38:59 +08:00
Xhofe d08a7440bc 🎇 import uss 2022-03-03 19:33:40 +08:00
Xhofe 7a4bb2496d ✨ add welcome bot 2022-03-03 19:16:30 +08:00
Xhofe f68ab40d26 🔀 Merge pull request #659 from foxxorcat/dev
✨ xunleicloud support
2022-03-03 17:03:23 +08:00
Xhofe 796d490fb7 :bug: fix #658 onedrive file/folder judge 2022-03-03 16:01:24 +08:00
foxxorcat 2964d5a6db xunleicloud support 2022-03-03 15:45:33 +08:00
Xhofe 90b57dacee 🎇 remove set Content-Type for native 2022-03-02 19:27:40 +08:00
Xhofe 6af17e2509 🔒 fix #645 xss vulnerability 2022-03-01 20:09:25 +08:00
Xhofe 5193b2aa7d 🎨 fix some warning 2022-02-27 20:28:42 +08:00
Xhofe 3f644f07db ✏️ fix readme logo 2022-02-27 20:26:05 +08:00
103 changed files with 5060 additions and 540 deletions
+62
View File
@@ -0,0 +1,62 @@
{
"files": [
"CONTRIBUTORS.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "Xhofe",
"name": "Xhofe",
"avatar_url": "https://avatars.githubusercontent.com/u/36558727?v=4",
"profile": "http://nn.ci",
"contributions": [
"code",
"ideas",
"doc"
]
},
{
"login": "foxxorcat",
"name": "foxxorcat",
"avatar_url": "https://avatars.githubusercontent.com/u/95907542?v=4",
"profile": "https://github.com/foxxorcat",
"contributions": [
"code"
]
},
{
"login": "DaoChen6",
"name": "道辰",
"avatar_url": "https://avatars.githubusercontent.com/u/63903027?v=4",
"profile": "https://www.iflu.cf/",
"contributions": [
"doc"
]
},
{
"login": "vg-land",
"name": "vg-land",
"avatar_url": "https://avatars.githubusercontent.com/u/16739728?v=4",
"profile": "https://vg-land.github.io/",
"contributions": [
"code"
]
},
{
"login": "Clansty",
"name": "凌莞~(=^▽^=)",
"avatar_url": "https://avatars.githubusercontent.com/u/18461360?v=4",
"profile": "https://c5y.moe",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
"projectName": "alist",
"projectOwner": "Xhofe",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
}
+12 -3
View File
@@ -5,7 +5,16 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report, please confirm that your issue is not a duplicate issue
Thanks for taking the time to fill out this bug report, please **confirm that your issue is not a duplicate issue and not because of your operation or version issues**
感谢您花时间填写此错误报告,请**务必确认您的issue不是重复的且不是因为您的操作或版本问题**
- type: checkboxes
attributes:
label: Please make sure of the following things
description: You may select more than one, even select all.
options:
- label: I have read the [documentation](https://alist-doc.nn.ci).
- label: I'm sure there are no duplicate issues or discussions.
- label: I'm sure it's due to `alist` and not something else(such as `Dependencies` or `Operational`).
- type: input
id: version
attributes:
@@ -28,11 +37,11 @@ body:
Please provide a link to a repo that can reproduce the problem you ran into.
请提供能复现此问题的链接
validations:
required: false
required: true
- type: textarea
id: logs
attributes:
label: 日志 / Logs
label: Logs / 日志
description: |
Please copy and paste any relevant log output.
请复制粘贴错误日志,或者截图
@@ -2,6 +2,15 @@ name: "Feature request"
description: Feature request
labels: ["enhancement: pending triage"]
body:
- type: checkboxes
attributes:
label: Please make sure of the following things
description: You may select more than one, even select all.
options:
- label: I have read the [documentation](https://alist-doc.nn.ci).
- label: I'm sure there are no duplicate issues or discussions.
- label: I'm sure this feature is not implemented.
- label: I'm sure it's a reasonable and popular requirement.
- type: textarea
id: feature-description
attributes:
+21
View File
@@ -0,0 +1,21 @@
# Configuration for welcome - https://github.com/behaviorbot/welcome
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
Thanks for opening your first issue here! Be sure to follow the issue template!
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
Thanks for opening this pull request! Please check out our contributing guidelines.
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Congrats on merging your first pull request! We here at behavior bot are proud of you!
# It is recommend to include as many gifs and emojis as possible
+3 -3
View File
@@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.17]
go-version: [1.18]
name: Build
runs-on: ${{ matrix.platform }}
steps:
@@ -32,8 +32,8 @@ jobs:
- name: Install upx
run: |
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
docker pull crazymax/xgo:latest
go install github.com/crazy-max/xgo@latest
sudo apt install upx
- name: Build
-2
View File
@@ -3,8 +3,6 @@ name: build_docker
on:
push:
branches: [ v2 ]
pull_request:
branches: [ v2 ]
jobs:
build_docker:
+25
View File
@@ -0,0 +1,25 @@
name: Issue Invalid
on:
issues:
types: [labeled]
jobs:
create-comment:
runs-on: ubuntu-latest
if: github.event.label.name == 'invalid'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, your issue is invalid and will be closed.
你好 @${{ github.event.issue.user.login }},你的issue无效,将被关闭。
- name: Close issue
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -17,4 +17,4 @@ jobs:
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, please input issue by template and add detail. Issues labeled by `question` will be closed if no activities in 7 days.
你好 @${{ github.event.issue.user.login }},请按照issue模板填写, 并详细说明问题/复现步骤/实现思路或提供更多信息等, 7天内未回复issue自动关闭。
你好 @${{ github.event.issue.user.login }},请按照issue模板填写, 并详细说明问题/复现步骤/复现链接/实现思路或提供更多信息等, 7天内未回复issue自动关闭。
+3 -3
View File
@@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.17]
go-version: [1.18]
name: Release
runs-on: ${{ matrix.platform }}
steps:
@@ -29,8 +29,8 @@ jobs:
- name: Install upx
run: |
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
docker pull crazymax/xgo:latest
go install github.com/crazy-max/xgo@latest
sudo apt install upx
- name: Build
+105
View File
@@ -0,0 +1,105 @@
# Contributing
## Setup your machine
`alist` is written in [Go](https://golang.org/) and [React](https://reactjs.org/).
Prerequisites:
- [git](https://nodejs.org/zh-cn/)
- [Go 1.17+](https://golang.org/doc/install)
- [gcc](https://gcc.gnu.org/)
- [nodejs](https://nodejs.org/)
Clone `alist` and `alist-web` anywhere:
```shell
$ git clone https://github.com/Xhofe/alist.git
$ git clone https://github.com/Xhofe/alist-web.git
```
You should switch to the dev branch for development.
## Preview your change
### backend
```shell
$ go run alist.go
```
### frontend
```shell
$ yarn dev
```
## Create a commit
Commit messages should be well formatted, and to make that "standardized".
### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:
```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.
### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header
of the reverted commit.
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit
being reverted.
### Type
Must be one of the following:
* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing or correcting existing tests
* **build**: Affects project builds or dependency modifications
* **revert**: Restore the previous commit
* **ci**: Continuous integration of related file modifications
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation
* **release**: Release a new version
* **workflow**: Workflow related file modification
### Scope
The scope could be anything specifying place of the commit change. For example `$location`,
`$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...
You can use `*` when the change affects more than a single scope.
### Subject
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
[reference GitHub issues that this commit closes](https://help.github.com/articles/closing-issues-via-commit-messages/).
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
The rest of the commit message is then used for this.
## Submit a pull request
Push your branch to your `alist` fork and open a pull request against the
`dev` branch.
+27
View File
@@ -0,0 +1,27 @@
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://nn.ci"><img src="https://avatars.githubusercontent.com/u/36558727?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Xhofe</b></sub></a><br /><a href="https://github.com/Xhofe/alist/commits?author=Xhofe" title="Code">💻</a> <a href="#ideas-Xhofe" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/Xhofe/alist/commits?author=Xhofe" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/foxxorcat"><img src="https://avatars.githubusercontent.com/u/95907542?v=4?s=100" width="100px;" alt=""/><br /><sub><b>foxxorcat</b></sub></a><br /><a href="https://github.com/Xhofe/alist/commits?author=foxxorcat" title="Code">💻</a></td>
<td align="center"><a href="https://www.iflu.cf/"><img src="https://avatars.githubusercontent.com/u/63903027?v=4?s=100" width="100px;" alt=""/><br /><sub><b>道辰</b></sub></a><br /><a href="https://github.com/Xhofe/alist/commits?author=DaoChen6" title="Documentation">📖</a></td>
<td align="center"><a href="https://vg-land.github.io/"><img src="https://avatars.githubusercontent.com/u/16739728?v=4?s=100" width="100px;" alt=""/><br /><sub><b>vg-land</b></sub></a><br /><a href="https://github.com/Xhofe/alist/commits?author=vg-land" title="Code">💻</a></td>
<td align="center"><a href="https://c5y.moe"><img src="https://avatars.githubusercontent.com/u/18461360?v=4?s=100" width="100px;" alt=""/><br /><sub><b>凌莞~(=^▽^=)</b></sub></a><br /><a href="https://github.com/Xhofe/alist/commits?author=Clansty" title="Documentation">📖</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
+1 -1
View File
@@ -11,4 +11,4 @@ VOLUME /opt/alist/data/
WORKDIR /opt/alist/
COPY --from=builder /app/bin/alist ./
EXPOSE 5244
CMD [ "./alist" ]
CMD [ "./alist", "-docker" ]
+19 -8
View File
@@ -1,5 +1,5 @@
<div align="center">
<a href="https://alist.nn.ci"><img height="100px" alt="logo" src="https://cdn.jsdelivr.net/gh/alist-org/assets@main/logo.svg"/></a>
<a href="https://alist.nn.ci"><img height="100px" alt="logo" src="https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg"/></a>
<p><em>🗂️Another file list program that supports multiple storage, powered by Gin and React.</em></p>
<a href="https://github.com/Xhofe/alist/releases"><img src="https://img.shields.io/github/release/Xhofe/alist?style=flat-square" alt="latest version"></a>
<a href="https://github.com/Xhofe/alist/discussions"><img src="https://img.shields.io/github/discussions/Xhofe/alist?color=%23ED8936&style=flat-square" alt="discussions"></a>
@@ -11,11 +11,9 @@
</a>
</div>
---
English | [中文](./README_cn.md)
English | [中文](./README_cn.md) | [Contributors](./CONTRIBUTORS.md) | [Contributing](./CONTRIBUTING.md)
## Features
@@ -23,7 +21,7 @@ English | [中文](./README_cn.md)
- [x] Local storage
- [x] [Aliyundrive](https://www.aliyundrive.com/)
- [x] OneDrive / Sharepoint ([global](https://www.office.com/), [cn](https://portal.partner.microsoftonline.cn),de,us)
- [x] [189cloud](https://cloud.189.cn)
- [x] [189cloud](https://cloud.189.cn) (Personal, Family)
- [x] [GoogleDrive](https://drive.google.com/)
- [x] [123pan](https://www.123pan.com/)
- [x] [Lanzou](https://pc.woozooo.com/)
@@ -32,13 +30,15 @@ English | [中文](./README_cn.md)
- [x] [PikPak](https://www.mypikpak.com/)
- [x] [ShandianPan](https://shandianpan.com/)
- [x] [S3](https://aws.amazon.com/s3/)
- [x] WebDav
- [x] WebDav(Support OneDrive/SharePoint without API)
- [x] Teambition([China](https://www.teambition.com/ ),[International](https://us.teambition.com/ ))
- [x] [Mediatrack](https://www.mediatrack.cn/)
- [x] [139yun](https://yun.139.com/) (Personal, Family)
- [x] [Yandex.Disk](https://disk.yandex.com/)
- [x] [Baidu Disk](http://pan.baidu.com/)
- [x] [Quark](https://pan.quark.cn)
- [x] [XunleiCloud](https://pan.xunlei.com/)
- [x] SFTP
- [x] Easy to deploy and out-of-the-box
- [x] File preview (PDF, markdown, code, plain text, ...)
- [x] Image preview in gallery mode
@@ -64,16 +64,27 @@ Please go to our [discussion forum](https://github.com/Xhofe/alist/discussions)
Available at: <https://alist.nn.ci>.
![demo](https://inews.gtimg.com/newsapp_ls/0/14256614096/0)
![demo](https://store.heytapimage.com/cdo-portal/feedback/202202/20/b271627971e29f0c7c9d59935b6ef381.png)
## Document
<https://alist-doc.nn.ci/en/>
## Special sponsors
- [Find Resources - Aliyundrive Resource Search Engine](https://zhaoziyuan.la/)
- [JetBrains: Essential tools for software developers and teams](https://www.jetbrains.com/)
## License
The `AList` is open-source software licensed under the AGPL-3.0 license.
## Disclaimer
- This program is a free and open source project. It is designed to share files on the network disk, which is convenient for downloading and learning golang. Please abide by relevant laws and regulations when using it, and do not abuse it;
- This program is implemented by calling the official sdk/interface, without destroying the official interface behavior;
- This program only does 302 redirect/traffic forwarding, and does not intercept, store, or tamper with any user data;
- Before using this program, you should understand and bear the corresponding risks, including but not limited to account ban, download speed limit, etc., which is none of this program's business;
- If there is any infringement, please contact me by [email](mailto:i@nn.ci), and it will be dealt with in time.
---
> [@Blog](https://www.nn.ci/) · [@GitHub](https://github.com/Xhofe)
> [@Blog](https://nn.ci/) · [@GitHub](https://github.com/Xhofe) · [@TelegramGroup](https://t.me/alist_chat) · [@QQGroup](https://jq.qq.com/?_wv=1027&k=OVPJcv2b)
+19 -7
View File
@@ -1,5 +1,5 @@
<div align="center">
<a href="https://alist.nn.ci"><img height="100px" alt="logo" src="https://cdn.jsdelivr.net/gh/alist-org/assets@main/logo.svg"/></a>
<a href="https://alist.nn.ci"><img height="100px" alt="logo" src="https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg"/></a>
<p><em>🗂️一个支持多存储的文件列表程序,使用 Gin 和 React 。</em></p>
<a href="https://github.com/Xhofe/alist/releases"><img src="https://img.shields.io/github/release/Xhofe/alist?style=flat-square" alt="latest version"></a>
<a href="https://github.com/Xhofe/alist/discussions"><img src="https://img.shields.io/github/discussions/Xhofe/alist?color=%23ED8936&style=flat-square" alt="discussions"></a>
@@ -11,10 +11,9 @@
</a>
</div>
---
[English](./README.md) | 中文
[English](./README.md) | 中文 | [Contributors](./CONTRIBUTORS.md) | [Contributing](./CONTRIBUTING.md)
## 支持
@@ -22,7 +21,7 @@
- [x] 本地存储
- [x] [阿里云盘](https://www.aliyundrive.com/)
- [x] OneDrive / Sharepoint([国际版](https://www.office.com/), [世纪互联](https://portal.partner.microsoftonline.cn),de,us)
- [x] [天翼云盘](https://cloud.189.cn)
- [x] [天翼云盘](https://cloud.189.cn) (个人云, 家庭云)
- [x] [GoogleDrive](https://drive.google.com/)
- [x] [123云盘](https://www.123pan.com/)
- [x] [蓝奏云](https://pc.woozooo.com/)
@@ -31,13 +30,15 @@
- [x] [PikPak](https://www.mypikpak.com/)
- [x] [闪电盘](https://shandianpan.com/)
- [x] [S3](https://aws.amazon.com/cn/s3/)
- [x] WebDav
- [x] WebDav(支持无API的OneDrive/SharePoint)
- [x] Teambition([中国](https://www.teambition.com/ ),[国际](https://us.teambition.com/ ))
- [x] [分秒帧](https://www.mediatrack.cn/)
- [x] [和彩云](https://yun.139.com/) (个人云, 家庭云)
- [x] [Yandex.Disk](https://disk.yandex.com/)
- [x] [百度网盘](http://pan.baidu.com/)
- [x] [夸克网盘](https://pan.quark.cn)
- [x] [迅雷云盘](https://pan.xunlei.com/)
- [x] SFTP
- [x] 部署方便,开箱即用
- [x] 文件预览(PDF、markdown、代码、纯文本……)
- [x] 画廊模式下的图像预览
@@ -63,16 +64,27 @@
<https://alist.nn.ci>。
![演示](https://inews.gtimg.com/newsapp_ls/0/14256614096/0)
![演示](https://store.heytapimage.com/cdo-portal/feedback/202202/20/b271627971e29f0c7c9d59935b6ef381.png)
## 文档
<https://alist-doc.nn.ci/>
## 特别赞助
- [找资源 - 阿里云盘资源搜索引擎](https://zhaoziyuan.la/)
- [JetBrains: Essential tools for software developers and teams](https://www.jetbrains.com/)
## 许可
`AList` 是在 AGPL-3.0 许可下许可的开源软件。
## 免责声明
- 本程序为免费开源项目,旨在分享网盘文件,方便下载以及学习golang,使用时请遵守相关法律法规,请勿滥用;
- 本程序通过调用官方sdk/接口实现,无破坏官方接口行为;
- 本程序仅做302重定向/流量转发,不拦截、存储、篡改任何用户数据;
- 在使用本程序之前,你应了解并承担相应的风险,包括但不限于账号被ban,下载限速等,与本程序无关;
- 如有侵权,请通过[邮件](mailto:i@nn.ci)与我联系,会及时处理。
---
> [@Blog](https://www.nn.ci/) · [@GitHub](https://github.com/Xhofe)
> [@Blog](https://nn.ci/) · [@GitHub](https://github.com/Xhofe) · [@TelegramGroup](https://t.me/alist_chat) · [@QQGroup](https://jq.qq.com/?_wv=1027&k=OVPJcv2b)
+3 -1
View File
@@ -3,6 +3,7 @@ package bootstrap
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/drivers/base"
"github.com/Xhofe/alist/drivers/operate"
"github.com/Xhofe/alist/model"
log "github.com/sirupsen/logrus"
)
@@ -20,7 +21,8 @@ func InitAccounts() {
log.Errorf("no [%s] driver", account.Type)
} else {
log.Infof("start init account: [%s], type: [%s]", account.Name, account.Type)
err := driver.Save(&accounts[i], nil)
//err := driver.Save(&accounts[i], nil)
err := operate.Save(driver, &accounts[i], nil)
if err != nil {
log.Errorf("init account [%s] error:[%s]", account.Name, err.Error())
} else {
+23 -1
View File
@@ -3,9 +3,11 @@ package bootstrap
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/utils"
"github.com/caarlos0/env/v6"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"path/filepath"
)
// InitConf init config
@@ -42,8 +44,28 @@ func InitConf() {
log.Fatalf("update config struct error: %s", err.Error())
}
}
err := os.MkdirAll(conf.Conf.TempDir, 0700)
if !conf.Conf.Force {
confFromEnv()
}
err := os.RemoveAll(filepath.Join(conf.Conf.TempDir))
if err != nil {
log.Errorln("failed delete temp file:", err)
}
err = os.MkdirAll(conf.Conf.TempDir, 0700)
if err != nil {
log.Fatalf("create temp dir error: %s", err.Error())
}
log.Debugf("config: %+v", conf.Conf)
}
func confFromEnv() {
prefix := "ALIST_"
if conf.Docker {
prefix = ""
}
if err := env.Parse(conf.Conf, env.Options{
Prefix: prefix,
}); err != nil {
log.Fatalf("load config from env error: %s", err.Error())
}
}
+1
View File
@@ -30,6 +30,7 @@ func init() {
flag.BoolVar(&conf.Debug, "debug", false, "start with debug mode")
flag.BoolVar(&conf.Version, "version", false, "print version info")
flag.BoolVar(&conf.Password, "password", false, "print current password")
flag.BoolVar(&conf.Docker, "docker", false, "is using docker")
flag.Parse()
InitLog()
}
+4 -4
View File
@@ -50,8 +50,8 @@ func InitModel() {
}
case "mysql":
{
dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=True&loc=Local",
databaseConfig.User, databaseConfig.Password, databaseConfig.Host, databaseConfig.Port, databaseConfig.Name)
dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=True&loc=Local&tls=%s",
databaseConfig.User, databaseConfig.Password, databaseConfig.Host, databaseConfig.Port, databaseConfig.Name, databaseConfig.SslMode)
db, err := gorm.Open(mysql.Open(dsn), gormConfig)
if err != nil {
log.Fatalf("failed to connect database:%s", err.Error())
@@ -74,9 +74,9 @@ func InitModel() {
log.Infof("auto migrate model...")
if databaseConfig.Type == "mysql" {
err = conf.DB.Set("gorm:table_options", "ENGINE=InnoDB CHARSET=utf8mb4").
AutoMigrate(&model.SettingItem{}, &model.Account{}, &model.Meta{})
AutoMigrate(&model.SettingItem{}, &model.Account{}, &model.Meta{}, &model.SearchFile{})
} else {
err = conf.DB.AutoMigrate(&model.SettingItem{}, &model.Account{}, &model.Meta{})
err = conf.DB.AutoMigrate(&model.SettingItem{}, &model.Account{}, &model.Meta{}, &model.SearchFile{})
}
if err != nil {
log.Fatalf("failed to auto migrate: %s", err.Error())
+36 -3
View File
@@ -58,6 +58,14 @@ func InitSettings() {
Access: model.PUBLIC,
Group: model.FRONT,
},
{
Key: "announcement",
Value: "This is a test announcement.",
Description: "announcement message (support markdown)",
Type: "text",
Access: model.PUBLIC,
Group: model.FRONT,
},
{
Key: "text types",
Value: strings.Join(conf.TextTypes, ","),
@@ -65,6 +73,20 @@ func InitSettings() {
Description: "text type extensions",
Group: model.FRONT,
},
{
Key: "audio types",
Value: strings.Join(conf.AudioTypes, ","),
Type: "string",
Description: "audio type extensions",
Group: model.FRONT,
},
{
Key: "video types",
Value: strings.Join(conf.VideoTypes, ","),
Type: "string",
Description: "video type extensions",
Group: model.FRONT,
},
{
Key: "d_proxy types",
Value: strings.Join(conf.DProxyTypes, ","),
@@ -96,8 +118,8 @@ func InitSettings() {
Group: model.FRONT,
},
{
Key: "home readme url",
Description: "when have multiple, the readme file to show",
Key: "global readme url",
Description: "Default display when directory has no readme",
Type: "string",
Access: model.PUBLIC,
Group: model.FRONT,
@@ -236,6 +258,14 @@ func InitSettings() {
Access: model.PRIVATE,
Group: model.BACK,
},
{
Key: "enable search",
Value: "false",
Type: "bool",
Access: model.PUBLIC,
Group: model.BACK,
Description: "Experimental function, not recommended as it's still under development",
},
}
for i, _ := range settings {
v := settings[i]
@@ -245,7 +275,7 @@ func InitSettings() {
if err == gorm.ErrRecordNotFound {
err = model.SaveSetting(v)
if v.Key == "password" {
log.Infof("Initial password: %s", v.Value)
log.Infof("Initial password: %s", conf.C.Sprintf(v.Value))
}
if err != nil {
log.Fatalf("failed write setting: %s", err.Error())
@@ -261,6 +291,9 @@ func InitSettings() {
if err != nil {
log.Fatalf("failed write setting: %s", err.Error())
}
if v.Key == "password" {
log.Infof("Your password: %s", conf.C.Sprintf(v.Value))
}
}
}
model.LoadSettings()
+23 -10
View File
@@ -6,8 +6,11 @@ BUILD_WEB() {
cd alist-web
yarn
yarn build
sed -i -e "s/\/CDN_URL\//\//g" dist/index.html
sed -i -e "s/assets/\/assets/g" dist/index.html
rm -f dist/index.html-e
mv dist ..
cd ..
cd .. || exit
rm -rf alist-web
}
@@ -49,6 +52,15 @@ BUILD() {
webTag=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist-web/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
echo "build version: $gitTag"
ldflags="\
-w -s --extldflags '-static -fpic' \
-X 'github.com/Xhofe/alist/conf.BuiltAt=$builtAt' \
-X 'github.com/Xhofe/alist/conf.GoVersion=$goVersion' \
-X 'github.com/Xhofe/alist/conf.GitAuthor=$gitAuthor' \
-X 'github.com/Xhofe/alist/conf.GitCommit=$gitCommit' \
-X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \
-X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \
"
ldflagsDarwin="\
-w -s \
-X 'github.com/Xhofe/alist/conf.BuiltAt=$builtAt' \
-X 'github.com/Xhofe/alist/conf.GoVersion=$goVersion' \
@@ -57,11 +69,12 @@ BUILD() {
-X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \
-X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \
"
if [ "$1" == "release" ]; then
xgo -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
xgo -targets=linux/*,windows/* -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
xgo -targets=darwin/* -out "$appName" -ldflags="$ldflagsDarwin" -tags=jsoniter .
else
xgo -targets=linux/amd64,windows/amd64,darwin/amd64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
xgo -targets=linux/amd64,windows/amd64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
xgo -targets=darwin/amd64 -out "$appName" -ldflags="$ldflagsDarwin" -tags=jsoniter .
fi
mkdir -p "build"
mv alist-* build
@@ -71,9 +84,9 @@ BUILD() {
upx -9 ./alist-windows*
find . -type f -print0 | xargs -0 md5sum >md5.txt
cat md5.txt
cd ..
cd .. || exit
fi
cd ..
cd .. || exit
}
BUILD_MUSL() {
@@ -93,7 +106,7 @@ BUILD_MUSL() {
gitTag=$(git describe --long --tags --dirty --always)
webTag=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist-web/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
ldflags="\
-w -s \
-w -s --extldflags '-static -fpic' \
-X 'github.com/Xhofe/alist/conf.BuiltAt=$builtAt' \
-X 'github.com/Xhofe/alist/conf.GoVersion=$goVersion' \
-X 'github.com/Xhofe/alist/conf.GitAuthor=$gitAuthor' \
@@ -113,12 +126,12 @@ BUILD_MUSL() {
export CGO_ENABLED=1
go build -o ./build/$appName-$os_arch -ldflags="$ldflags" -tags=jsoniter alist.go
done
cd ..
cd .. || exit
}
RELEASE() {
cd alist/build
upx -9 ./alist-linux*
upx -9 ./alist-linux-amd64
upx -9 ./alist-windows*
find . -type f -print0 | xargs -0 md5sum >md5.txt
cat md5.txt
@@ -133,7 +146,7 @@ RELEASE() {
for i in $(find . -type f -name "$appName-windows-*"); do
zip compress/$(echo $i | sed 's/\.[^.]*$//').zip "$i"
done
cd ../..
cd ../.. || exit
}
if [ "$1" = "web" ]; then

Some files were not shown because too many files have changed in this diff Show More