Compare commits

..

133 Commits

Author SHA1 Message Date
Xhofe d988f98b81 💚 fix upx 2022-02-26 00:12:00 +08:00
Xhofe 10634c7b77 👷 add build for macos 2022-02-25 23:59:27 +08:00
Xhofe 135d505192 ⏪ back to cgo sqlite3 2022-02-25 23:55:57 +08:00
Xhofe 3f2be8a6ca 🔧 change default assets path 2022-02-25 22:08:12 +08:00
Xhofe 79bef09ee7 🔀 Merge branch 'feature/upyun' into dev 2022-02-25 21:06:49 +08:00
Xhofe 3534f6afac 💚 fix cal md5 2022-02-24 23:07:35 +08:00
Xhofe 106c1d069c 💚 change build platform 2022-02-24 22:55:50 +08:00
Xhofe 8ed0afe80d 🎇 add unupx version 2022-02-24 22:42:15 +08:00
Xhofe 6a6e3944d5 🔀 Merge branch 'feature/purego' into dev 2022-02-24 16:26:20 +08:00
Xhofe 94d5b5e47e ✨ direct but proxy types 2022-02-24 16:25:17 +08:00
Xhofe e61b0f8e34 :fire: remove cgo to pure go 2022-02-24 16:08:49 +08:00
Xhofe f7fbe1de6c 👷 build for all branch 2022-02-23 20:17:50 +08:00
Xhofe 01de01630e :fire: remove placeholder for uss 2022-02-23 20:16:57 +08:00
Xhofe f9f92e2198 ✏️ fix typo 2022-02-23 20:13:52 +08:00
Xhofe 7d5f50b04a 👷 build for all branch 2022-02-23 20:12:21 +08:00
Xhofe 72b5d25e4c ✏️ fix label typo 2022-02-23 20:07:45 +08:00
Xhofe cae7f36531 🎇 refresh one folder 2022-02-23 19:16:33 +08:00
Xhofe aa79f49e25 :bug: fix #600 aliyundrive move file 2022-02-23 14:56:17 +08:00
Xhofe b4ad301d53 :bug: fix #599 lanzou url without password 2022-02-23 11:18:51 +08:00
Xhofe 00ed54c4c9 ✨ upyun uss support 2022-02-23 11:07:19 +08:00
Xhofe ffa52794db 🍺 change login http method 2022-02-22 15:57:39 +08:00
Xhofe 24058d0c36 💚 fix dev build 2022-02-21 21:47:40 +08:00
Xhofe 641ca67671 💚 fix web replace 2022-02-21 20:31:01 +08:00
Xhofe 52ee2e0a8b :bug: close #581 teambition update time error 2022-02-21 17:20:05 +08:00
Xhofe 724fc7f37e 💚 fix build web 2022-02-20 16:46:47 +08:00
Xhofe 9d279b104b ✨ dynamic public path 2022-02-20 15:14:18 +08:00
Xhofe eb61f70164 :bug: fix show balance account 2022-02-20 13:06:59 +08:00
Xhofe b3a8201768 :bug: fix that only two accounts can be load balanced 2022-02-19 21:49:37 +08:00
Xhofe 185795954b 🔊 add reason of failed to auto migrate model 2022-02-19 17:25:50 +08:00
微凉 cc62cc99d2 :bug: fix plist ipa name 2022-02-18 19:01:30 +08:00
微凉 270349f37c :bug: fix write status sequence 2022-02-18 18:58:02 +08:00
微凉 977888070a :bug: close #558 fix local file can't download 2022-02-18 18:50:01 +08:00
微凉 192d0f2bf3 :bug: fix update can't start 2022-02-18 18:49:40 +08:00
Xhofe f2ec7884ec :bug: fix only proxy webdav_direct 2022-02-17 17:49:03 +08:00
Xhofe 815975a4d2 :bug: fix 139 delete dir 2022-02-17 17:37:45 +08:00
Xhofe f96a0238fc 👷 change issues-month-statistics 2022-02-17 17:29:45 +08:00
Xhofe f695bd0959 🔧 change bundle-version 2022-02-17 16:54:34 +08:00
Xhofe efe8f46e17 ✏️ fix typo 2022-02-17 11:56:00 +08:00
Xhofe 515daa22a9 :bug: fix #551 add S3ForcePathStyle config 2022-02-17 11:30:34 +08:00
Xhofe f11e22deaf 🚧 change base64 characters 2022-02-17 09:14:21 +08:00
Xhofe 5be976169f 🚧 fix bundle-identifier 2022-02-17 00:44:30 +08:00
Xhofe a6e08f3bf4 📝 update readme 2022-02-17 00:08:37 +08:00
Xhofe 944e68a979 🚧 plist generate 2022-02-17 00:06:10 +08:00
Xhofe b3a6e33ce1 🎇 quark support 2022-02-16 20:20:39 +08:00
Xhofe cb53ddc8e8 :bug: fix nil pointer 2022-02-16 16:10:39 +08:00
Xhofe 693417be4f 🔧 add hide files setting item 2022-02-15 14:51:50 +08:00
Xhofe 5c3f91bb55 ✨ support empty password 2022-02-15 14:42:24 +08:00
Xhofe 8a219d0732 👷 add issue bot 2022-02-14 20:03:42 +08:00
Xhofe 146a544af3 ✏️ fix typo 2022-02-14 19:43:43 +08:00
Xhofe 48dccc6c0b 📝 update readme 2022-02-14 15:41:20 +08:00
Xhofe ce1740cec4 ✏️ fix typo 2022-02-14 15:36:21 +08:00
Xhofe d40dbeae3e 💬 add issue template 2022-02-14 15:33:48 +08:00
Xhofe 5094b673c4 👷 add some issue bot 2022-02-14 15:32:25 +08:00
Xhofe 228e6d10e7 🔧 close #519 customize temp dir 2022-02-14 15:06:57 +08:00
Xhofe e90b979d15 ✨ close #535 request set timeout 2022-02-14 14:59:00 +08:00
Xhofe fb05a6ca48 :bug: fix #533 only encode fileName 2022-02-14 14:31:09 +08:00
Xhofe e055ed3afa 🎇 lanzou proxy add user-agent 2022-02-13 17:46:07 +08:00
Xhofe 4371c470b3 ✨ webdav direct proxy 2022-02-13 15:57:42 +08:00
Xhofe 7bb237d0ef :bug: fix #527 189 upload file name contains % 2022-02-13 13:03:34 +08:00
Xhofe 5c42354b01 :bug: fix #527 189 upload name contains + 2022-02-12 20:27:38 +08:00
Xhofe 387e8af422 :bug: fix 189 upload while filename contains & 2022-02-12 13:08:46 +08:00
Xhofe 5dca777caf 🔒 fix baidu direct link 2022-02-12 12:04:10 +08:00
Xhofe 0814778a14 :bug: fix no account error while only one 2022-02-11 17:11:02 +08:00
Xhofe 6827af3997 🎇 close #522 hide account for guest webdav 2022-02-11 16:19:55 +08:00
Xhofe 435bdea8f7 🔧 #523 add some default setting 2022-02-11 16:17:07 +08:00
Xhofe 4f81735af6 🎇 close #512 favicon redirect 2022-02-08 18:07:13 +08:00
Xhofe bef3d2f88d :bug: Fix the temp folder is not created at the first startup 2022-02-08 16:22:53 +08:00
Xhofe ba99c7dc03 :bug: fix multiple accounts with the same prefix cannot be load balanced 2022-02-08 16:02:47 +08:00
微凉 f5c5162a9b ✨ load balance 2022-02-08 15:51:58 +08:00
微凉 a22903533e :bug: set random seed 2022-02-04 16:08:15 +08:00
微凉 86cda58b22 🚧 echo password 2022-02-04 14:58:48 +08:00
微凉 7804cf9d5c 🔒 random webdav admin password 2022-02-04 14:39:11 +08:00
微凉 2bb7036110 🔧 change logo 2022-02-03 21:28:13 +08:00
微凉 ba545555cf 📝 update readme 2022-02-03 21:00:08 +08:00
微凉 be55ca690c 🔧 change default logo 2022-02-03 20:43:33 +08:00
微凉 9013add749 🔒 random initial password 2022-02-03 12:27:50 +08:00
微凉 3201b6da76 :bug: fix #376 windows webdav upload 2022-02-02 18:48:34 +08:00
微凉 feb42f1f4b :fire: delete proxy interface 2022-02-02 18:03:54 +08:00
微凉 6f14d0eb5c 🎇 baidu disk support 2022-02-02 17:32:11 +08:00
微凉 7530d8f5b2 :bug: fix lanzou for download change 2022-02-01 22:33:19 +08:00
微凉 e25fe05a53 ✨ yandex disk support 2022-02-01 17:15:11 +08:00
微凉 8e0ab8f780 :fire: remove onedrive refresh token cron 2022-02-01 15:20:17 +08:00
微凉 cb2a3c2b42 🎨 change proxy interface 2022-02-01 14:28:21 +08:00
微凉 1b6ec94f33 :bug: fix s3 custom host 2022-02-01 11:34:32 +08:00
微凉 cb23edc1fe :bug: fix #462 check connect while get ftp client 2022-01-31 11:13:29 +08:00
微凉 6fd05d7d72 :bug: fix connMap not init 2022-01-30 00:55:12 +08:00
微凉 f26ac57569 :bug: fix ftp conn not store 2022-01-30 00:04:31 +08:00
微凉 2434ac54d0 :bug: fix webdav 2022-01-29 18:36:22 +08:00
微凉 f25b557327 📝 update readme 2022-01-29 15:31:06 +08:00
微凉 81a0706d01 ✨ 189 chunk upload 2022-01-29 11:16:40 +08:00
微凉 5f6b576cbf 🔧 switch cdn to jsdelivr 2022-01-28 23:29:38 +08:00
微凉 549877f71e :fire: Delete Text 2022-01-28 23:21:11 +08:00
微凉 c6a5ba9b91 🚧 189 chunk upload 2022-01-28 19:51:54 +08:00
微凉 1a69d80489 🎨 Pull away Path 2022-01-28 11:04:56 +08:00
微凉 b797f4302c 🎇 use tempFile to cal md5 2022-01-27 23:48:29 +08:00
微凉 bf9aa5c3d3 🔒 not allowed use relative path of native 2022-01-27 15:10:33 +08:00
微凉 7390e19a7a 🔒 not allowed down with relative path 2022-01-27 15:05:17 +08:00
微凉 b31a12a0cc 🔒 not allowed access using relative path for native 2022-01-27 14:54:20 +08:00
微凉 26ce001782 🎇 add ocr for 189 2022-01-27 12:34:49 +08:00
微凉 a2c7ff3262 ✏️ Invalid Token 2022-01-26 16:27:38 +08:00
微凉 8fc7c716c0 ✨ copy api 2022-01-26 14:07:51 +08:00
微凉 c70fc3fc4b ✨ finish teambition chunk upload 2022-01-26 14:05:35 +08:00
微凉 df513b7dc0 ✨ teambition upload (<= 20 MB) 2022-01-23 14:03:04 +08:00
微凉 2a9598f4c6 :bug: fix #407 189cloud use local sort 2022-01-21 19:01:33 +08:00
微凉 224c20779c 🔧 add webp to image types 2022-01-20 23:01:59 +08:00
微凉 5d722298cb 📝 update readme 2022-01-20 22:38:53 +08:00
微凉 4bcc6359e3 💚 fix docker build 2022-01-20 20:52:14 +08:00
微凉 4144afcc92 :bug: fix #397 139yun file size overflow int32 2022-01-20 20:35:01 +08:00
微凉 2ad27046fb 🎨 split build and docker 2022-01-20 20:30:58 +08:00
微凉 9516ac6718 🎇 finish move api 2022-01-20 19:58:25 +08:00
微凉 de638c7c36 :bug: fix 123pan move 2022-01-20 19:58:10 +08:00
微凉 c6b34a033b 🔧 add swf to image types 2022-01-20 14:40:59 +08:00
微凉 31de3399d2 💚 fix musl prebuilt 2022-01-20 14:23:31 +08:00
微凉 0dc2ca019f 💚 fix musl prebuilt 2022-01-20 13:47:21 +08:00
微凉 04724f7f0f 👷 add prebuilt for musl-libc 2022-01-20 12:53:49 +08:00
微凉 75a983a965 :bug: fix webdav can't get file with password 2022-01-19 18:46:32 +08:00
微凉 e12d8bb8ca ⬆️ upgrade gorm 2022-01-19 09:15:00 +08:00
微凉 68f1ccfed4 ✨ add sslmode for postgres 2022-01-19 09:14:31 +08:00
微凉 54272db59c 🚧 add folder api 2022-01-18 19:08:44 +08:00
微凉 6d34e88360 🎇 hide files while webdav visitor 2022-01-18 18:48:08 +08:00
微凉 0a901a2eb0 :bug: fix can't find zhimg for dev 2022-01-18 18:19:58 +08:00
微凉 e1671a0511 🚧 add move api 2022-01-18 16:13:07 +08:00
微凉 dcb4ec695f ✨ rename and mkdir api 2022-01-18 14:31:52 +08:00
微凉 4a21b6fe1d :fire: close res.body for proxy 2022-01-18 11:29:32 +08:00
微凉 96a237902b :bug: close #379 fix google drive can't get text file 2022-01-17 09:54:19 +08:00
微凉 cfb51e9f80 ✨ Extract folder 2022-01-16 16:38:41 +08:00
微凉 e952f1c243 :fire: Optimize 189 cloud get client 2022-01-16 16:05:32 +08:00
微凉 07d6ca27db :bug: Forbid MediaTrack to create a new folder with the same name 2022-01-16 13:21:29 +08:00
微凉 8245da485a :bug: fix s3 for #362 2022-01-15 20:24:57 +08:00
微凉 5c759217cf :bug: fix some lanzou can't down #360 2022-01-15 20:10:42 +08:00
微凉 0648fdebc2 ♻️ solve circular dependency 2022-01-15 19:59:24 +08:00
微凉 ed670e528f :bug: fix 139Yun error phone close #365 2022-01-15 19:44:22 +08:00
微凉 2473309a51 🎇 execute save while delete account 2022-01-15 19:36:37 +08:00
99 changed files with 4631 additions and 882 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Thanks for taking the time to fill out this bug report, please confirm that your issue is not a duplicate issue
- type: input
id: version
attributes:
+2 -2
View File
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Discussions & Feature request
- name: Questions & Discussions
url: https://github.com/Xhofe/alist/discussions
about: Use GitHub discussions for message-board style questions and discussions or feature request.
about: Use GitHub discussions for message-board style questions and discussions.
@@ -0,0 +1,24 @@
name: "Feature request"
description: Feature request
labels: ["enhancement: pending triage"]
body:
- type: textarea
id: feature-description
attributes:
label: Description of the feature / 需求描述
validations:
required: true
- type: textarea
id: suggested-solution
attributes:
label: Suggested solution / 实现思路
description: |
Solutions to achieve this requirement.
实现此需求的解决思路。
- type: textarea
id: additional-context
attributes:
label: Additional context / 附件
description: |
Any other context or screenshots about the feature request here, or information you find helpful.
相关的任何其他上下文或截图,或者你觉得有帮助的信息
+4 -42
View File
@@ -2,9 +2,9 @@ name: build
on:
push:
branches: [ v2 ]
branches: [ '**' ]
pull_request:
branches: [ v2 ]
branches: [ '**' ]
jobs:
build:
@@ -28,10 +28,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
ref: v2
path: alist
- name: Set up xgo
- name: Install upx
run: |
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
@@ -48,41 +47,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: artifact
path: alist/build
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: xhofe/alist
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build web
run: |
bash build.sh web
mv dist/* public
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: xhofe
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x
path: alist/build
+46
View File
@@ -0,0 +1,46 @@
name: build_docker
on:
push:
branches: [ v2 ]
pull_request:
branches: [ v2 ]
jobs:
build_docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: xhofe/alist
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build web
run: |
bash build.sh web
mv dist/* public
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: xhofe
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x
@@ -0,0 +1,20 @@
name: Check need info
on:
schedule:
- cron: "0 0 */7 * *"
jobs:
check-need-info:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
labels: 'question'
inactive-day: 7
body: |
Hello @${{ github.event.issue.user.login }}, this issue was closed due to no activities in 7 days.
你好 @${{ github.event.issue.user.login }},此issue因超过7天未回复被关闭。
+25
View File
@@ -0,0 +1,25 @@
name: Issue Duplicate
on:
issues:
types: [labeled]
jobs:
create-comment:
runs-on: ubuntu-latest
if: github.event.label.name == 'duplicate'
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 a duplicate 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 }}
@@ -0,0 +1,16 @@
name: Issue Month Statistics
on:
schedule:
- cron: "0 1 1 * *"
jobs:
month-statistics:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-month-statistics@v1
with:
count-lables: true
count-comments: true
emoji: 'eyes'
+20
View File
@@ -0,0 +1,20 @@
name: Issue Question
on:
issues:
types: [labeled]
jobs:
create-comment:
runs-on: ubuntu-latest
if: github.event.label.name == 'question'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v2.0.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
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自动关闭。
+25
View File
@@ -0,0 +1,25 @@
name: Issue Wontfix
on:
issues:
types: [labeled]
jobs:
lock-issue:
runs-on: ubuntu-latest
if: github.event.label.name == 'wontfix'
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 }}, this issue will not be worked on and will be closed.
你好 @${{ github.event.issue.user.login }},这不会被处理,将被关闭。
- name: Close issue
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
+2 -39
View File
@@ -27,7 +27,7 @@ jobs:
persist-credentials: false
fetch-depth: 0
- name: Set up xgo
- name: Install upx
run: |
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
@@ -43,41 +43,4 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
files: alist/build/compress/*
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: xhofe/alist
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build web
run: |
bash build.sh cdn
mv dist/* public
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: xhofe
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x
files: alist/build/compress/*
+45
View File
@@ -0,0 +1,45 @@
name: release_docker
on:
push:
tags:
- '*'
jobs:
docker_release:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: xhofe/alist
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build web
run: |
bash build.sh cdn
mv dist/* public
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: xhofe
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x
+1 -1
View File
@@ -3,7 +3,7 @@ LABEL stage=go-builder
WORKDIR /app/
COPY ./ ./
RUN apk add --no-cache bash git go gcc musl-dev; \
sh build.sh docker
bash build.sh docker
FROM alpine:edge
LABEL MAINTAINER="i@nn.ci"
+7 -3
View File
@@ -1,5 +1,5 @@
<div align="center">
<h3><a href="https://alist.nn.ci">Alist</a></h3>
<a href="https://alist.nn.ci"><img height="100px" alt="logo" src="https://cdn.jsdelivr.net/gh/alist-org/assets@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>
@@ -12,6 +12,7 @@
</div>
---
English | [中文](./README_cn.md)
@@ -35,6 +36,9 @@ English | [中文](./README_cn.md)
- [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] Easy to deploy and out-of-the-box
- [x] File preview (PDF, markdown, code, plain text, ...)
- [x] Image preview in gallery mode
@@ -50,11 +54,11 @@ English | [中文](./README_cn.md)
- [x] Cloudflare workers proxy
- [x] File/Folder package download
- [x] Support video list playback and subtitles(ass,srt,vtt)
- [x] Web upload(Can allow visitors to upload) and delete
- [x] Web upload(Can allow visitors to upload), delete, mkdir, rename, move and copy
## Discussion
Please go to our [discussion forum](https://github.com/Xhofe/alist/discussions) for general questions, **issues are for bug reports only.**
Please go to our [discussion forum](https://github.com/Xhofe/alist/discussions) for general questions, **issues are for bug reports and feature request only.**
## Demo
+7 -3
View File
@@ -1,5 +1,5 @@
<div align="center">
<h3><a href="https://alist.nn.ci">Alist</a></h3>
<a href="https://alist.nn.ci"><img height="100px" alt="logo" src="https://cdn.jsdelivr.net/gh/alist-org/assets@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,6 +11,7 @@
</a>
</div>
---
[English](./README.md) | 中文
@@ -34,6 +35,9 @@
- [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] 部署方便,开箱即用
- [x] 文件预览(PDF、markdown、代码、纯文本……)
- [x] 画廊模式下的图像预览
@@ -49,11 +53,11 @@
- [x] Cloudflare workers 中转
- [x] 文件/文件夹打包下载
- [x] 支持视频列表播放和字幕(ass,srt,vtt)
- [x] 网页上传(可以允许访客上传),删除
- [x] 网页上传(可以允许访客上传),删除,新建文件夹,重命名,移动,复制
## 讨论
一般问题请到[讨论论坛](https://github.com/Xhofe/alist/discussions) ,**issue仅针对错误报告。**
一般问题请到[讨论论坛](https://github.com/Xhofe/alist/discussions) ,**issue仅针对错误报告和功能请求。**
## 演示
+3 -2
View File
@@ -22,7 +22,7 @@ func Init() bool {
log.Errorf(err.Error())
return false
}
log.Infof("current password: %s", pass.Value)
fmt.Printf("your password: %s\n", pass.Value)
return false
}
server.InitIndex()
@@ -34,7 +34,8 @@ func Init() bool {
func main() {
if conf.Version {
fmt.Printf("Built At: %s\nGo Version: %s\nAuthor: %s\nCommit ID: %s\nVersion: %s\n", conf.BuiltAt, conf.GoVersion, conf.GitAuthor, conf.GitCommit, conf.GitTag)
fmt.Printf("Built At: %s\nGo Version: %s\nAuthor: %s\nCommit ID: %s\nVersion: %s\nWebVersion: %s\n",
conf.BuiltAt, conf.GoVersion, conf.GitAuthor, conf.GitCommit, conf.GitTag, conf.WebTag)
return
}
if !Init() {
+2 -1
View File
@@ -19,6 +19,7 @@ func InitAccounts() {
if !ok {
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)
if err != nil {
log.Errorf("init account [%s] error:[%s]", account.Name, err.Error())
@@ -27,4 +28,4 @@ func InitAccounts() {
}
}
}
}
}
+23 -18
View File
@@ -5,6 +5,7 @@ import (
"github.com/Xhofe/alist/utils"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
)
// InitConf init config
@@ -20,25 +21,29 @@ func InitConf() {
if !utils.WriteToJson(conf.ConfigFile, conf.Conf) {
log.Fatalf("failed to create default config file")
}
return
} else {
config, err := ioutil.ReadFile(conf.ConfigFile)
if err != nil {
log.Fatalf("reading config file error:%s", err.Error())
}
conf.Conf = conf.DefaultConfig()
err = utils.Json.Unmarshal(config, conf.Conf)
if err != nil {
log.Fatalf("load config error: %s", err.Error())
}
log.Debugf("config:%+v", conf.Conf)
// update config.json struct
confBody, err := utils.Json.MarshalIndent(conf.Conf, "", " ")
if err != nil {
log.Fatalf("marshal config error:%s", err.Error())
}
err = ioutil.WriteFile(conf.ConfigFile, confBody, 0777)
if err != nil {
log.Fatalf("update config struct error: %s", err.Error())
}
}
config, err := ioutil.ReadFile(conf.ConfigFile)
err := os.MkdirAll(conf.Conf.TempDir, 0700)
if err != nil {
log.Fatalf("reading config file error:%s", err.Error())
}
conf.Conf = new(conf.Config)
err = utils.Json.Unmarshal(config, conf.Conf)
if err != nil {
log.Fatalf("load config error: %s", err.Error())
}
log.Debugf("config:%+v", conf.Conf)
// update config.json struct
confBody, err := utils.Json.MarshalIndent(conf.Conf, "", " ")
if err != nil {
log.Fatalf("marshal config error:%s", err.Error())
}
err = ioutil.WriteFile(conf.ConfigFile, confBody, 0777)
if err != nil {
log.Fatalf("update config struct error: %s", err.Error())
log.Fatalf("create temp dir error: %s", err.Error())
}
}
+4 -1
View File
@@ -12,6 +12,9 @@ func InitLog() {
log.SetLevel(log.DebugLevel)
log.SetReportCaller(true)
}
if conf.Password || conf.Version {
log.SetLevel(log.WarnLevel)
}
log.SetFormatter(&log.TextFormatter{
//DisableColors: true,
ForceColors: true,
@@ -29,4 +32,4 @@ func init() {
flag.BoolVar(&conf.Password, "password", false, "print current password")
flag.Parse()
InitLog()
}
}
+3 -4
View File
@@ -60,14 +60,13 @@ func InitModel() {
}
case "postgres":
{
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%d sslmode=disable TimeZone=Asia/Shanghai",
databaseConfig.Host, databaseConfig.User, databaseConfig.Password, databaseConfig.Name, databaseConfig.Port)
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%d sslmode=%s TimeZone=Asia/Shanghai",
databaseConfig.Host, databaseConfig.User, databaseConfig.Password, databaseConfig.Name, databaseConfig.Port, databaseConfig.SslMode)
db, err := gorm.Open(postgres.Open(dsn), gormConfig)
if err != nil {
log.Errorf("failed to connect database:%s", err.Error())
}
conf.DB = db
}
default:
log.Fatalf("not supported database type: %s", databaseConfig.Type)
@@ -80,6 +79,6 @@ func InitModel() {
err = conf.DB.AutoMigrate(&model.SettingItem{}, &model.Account{}, &model.Meta{})
}
if err != nil {
log.Fatalf("failed to auto migrate")
log.Fatalf("failed to auto migrate: %s", err.Error())
}
}

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