Compare commits

..

280 Commits

Author SHA1 Message Date
微凉 c9bc8227bb 💚 switch back to techknowlogick/xgo 2022-01-12 11:50:26 +08:00
微凉 4ea9371c00 💚 fix release actions 2022-01-12 01:04:50 +08:00
微凉 326c74cdc6 📝 update readme 2022-01-12 01:00:18 +08:00
微凉 f11c2efa8c :bug: fix package download 2022-01-12 00:37:44 +08:00
微凉 6dd8102a82 :fire: Optimize delete cache 2022-01-11 23:45:12 +08:00
微凉 ddf6a4955f 🎇 139yun family support 2022-01-11 23:43:55 +08:00
微凉 602994e213 ✏️ fix typo 2022-01-10 21:14:26 +08:00
微凉 7c7306bf96 💚 Optimize github actions build 2022-01-10 19:48:11 +08:00
微凉 c24894b5de 💚 add go install version 2022-01-10 18:23:44 +08:00
微凉 e10412c530 💚 change xgo 2022-01-10 18:18:11 +08:00
微凉 5c2491b6c3 📝 change LICENSE 2022-01-10 18:11:14 +08:00
微凉 036373032c ✨ 139yun personal support 2022-01-09 22:44:43 +08:00
微凉 db58dabd31 ✨ local sort bring folders to the front 2022-01-09 19:28:48 +08:00
微凉 7ef98c05fa ✏️ fix typo 2022-01-09 17:22:55 +08:00
微凉 6351f43b9b :fire: Delete alist-proxy.js 2022-01-08 22:47:58 +08:00
微凉 6613c8a6c1 🎇 file delete 2022-01-08 22:09:27 +08:00
微凉 2b97882b42 🎇 Multiple file upload 2022-01-08 21:29:00 +08:00
微凉 925f386bed 🚧 remove customize head and body for manage 2022-01-08 21:10:34 +08:00
微凉 0fbbd54b0c 🔧 add required for teambition 2022-01-08 20:23:30 +08:00
微凉 12ba1fed00 🔧 add cookie required 2022-01-08 20:18:14 +08:00
微凉 2826bac53c 📝 update readme 2022-01-08 20:09:12 +08:00
微凉 3e7e9f354f 🎇 189cloud upload 2022-01-08 19:31:12 +08:00
微凉 86ff80885d :bug: fix 189 logged in but get error 2022-01-08 17:19:11 +08:00
微凉 be03e34406 :bug: fix proxy onlyLocal 2022-01-07 23:30:22 +08:00
微凉 83231becba 🎇 update config file while config struct changed 2022-01-07 20:29:20 +08:00
微凉 876ee49fb0 :bug: add range header for pdf.js 2022-01-07 20:28:58 +08:00
微凉 10bec31033 ✨ support flv preview 2022-01-06 19:26:19 +08:00
微凉 fc48f29575 🎇 finish MediaTrack upload 2022-01-06 19:23:55 +08:00
微凉 f0d9a452bb 🎇 finish MediaTrack upload 2022-01-06 19:21:13 +08:00
微凉 c03a4f83d1 🚧 give up 189 family cloud 2022-01-06 18:45:07 +08:00
微凉 10f06fde5c 🚧 MediaTrack support 2022-01-06 01:14:32 +08:00
微凉 36b533cb16 :bug: remove empty title folder 2022-01-05 23:25:21 +08:00
微凉 6ff2cdab98 🎇 teambition support 2022-01-05 22:03:28 +08:00
微凉 ef5cad1bf0 🎇 Pagination #257 2022-01-04 21:21:27 +08:00
微凉 b60c7ecd9e :bug: fix #281 set CHARSET=utf8mb4 2022-01-04 15:16:18 +08:00
微凉 68aaa8fee2 🚧 Pagination function 2022-01-03 23:30:57 +08:00
微凉 67bf14d428 🎨 Pull away link 2022-01-03 22:48:34 +08:00
微凉 c22ff77c89 🎨 use S3ForcePathStyle 2022-01-03 22:37:26 +08:00
微凉 84fc0ab1bd 🎇 123pan upload 2022-01-03 22:29:32 +08:00
微凉 beb06f2f7f :fire: replace encoding/json with jsoniter 2022-01-03 20:25:22 +08:00
微凉 7cf30836bf 🎨 Optimize code structure 2022-01-03 20:06:36 +08:00
微凉 e7ba289d06 :bug: fix upload delete cache 2022-01-02 18:17:04 +08:00
微凉 d255ff4fd0 :bug: fix home emoji type 2022-01-02 16:29:17 +08:00
微凉 bcf19f4f3e :bug: fix upload get wrong content-type 2022-01-02 14:51:27 +08:00
微凉 efeee0e276 :bug: fix alist path error 2022-01-02 14:44:14 +08:00
微凉 e789873eca 🚧 add home emoji setting 2022-01-02 14:38:24 +08:00
微凉 14b9b76e87 :bug: fix sidebar didn't auto unfold 2022-01-01 23:04:33 +08:00
微凉 38323fd24f 📝 update readme 2022-01-01 20:54:25 +08:00
微凉 366148a450 🎇 add root folder for s3 2022-01-01 20:54:11 +08:00
微凉 bc364cee0d 🚧 Change the location of the files and folders of the 189cloud 2022-01-01 19:48:59 +08:00
微凉 f433277227 :fire: delete markdown theme setting 2022-01-01 19:41:42 +08:00
微凉 35fc1c87d2 ✨ pikpak file upload 2022-01-01 00:08:58 +08:00
微凉 9da2af8c49 📝 Update readme features 2021-12-31 20:39:55 +08:00
微凉 103e049f22 ✨ web upload 2021-12-31 20:33:39 +08:00
微凉 cc217df924 🚧 change path api resp struct 2021-12-31 17:15:37 +08:00
微凉 939c9cd5ac 🚧 check upload file 2021-12-31 14:05:35 +08:00
微凉 6f0959a98e :bug: google drive upload api proxy 2021-12-31 00:28:50 +08:00
微凉 d71ed4d775 🎇 support webdav driver 2021-12-30 21:39:17 +08:00
微凉 0af3e95f1f 📝 update readme 2021-12-30 20:47:15 +08:00
微凉 582f7bbfee 🔧 Custom cache duration 2021-12-30 20:42:37 +08:00
微凉 cf2506901f 🎇 s3 support 2021-12-30 20:31:36 +08:00
微凉 db06b627cc 🎇 google drive thumbnail 2021-12-30 19:01:19 +08:00
微凉 5f2621eca9 :bug: fix pikpak and shandian account status 2021-12-30 17:59:35 +08:00
微凉 3331462229 ✨ local sort for no sort param driver 2021-12-30 16:15:57 +08:00
微凉 0f079827e5 ✨ support shandianpan #234 2021-12-29 22:07:26 +08:00
微凉 ba66e33913 🎇 add ico to image types 2021-12-29 22:06:07 +08:00
微凉 6a54ed87f3 🎨 change NeedSetLink to NoNeedSetLink 2021-12-29 19:47:47 +08:00
微凉 88a9edb90a 🎇 googledrive webdav write 2021-12-28 21:28:27 +08:00
微凉 606134f39c ✨ onedrive webdav write 2021-12-28 20:34:45 +08:00
Xhofe 3c03344ef1 📝 update readme 2021-12-28 17:15:30 +08:00
Xhofe 6f5914ae6f ✨ webdav visitor 2021-12-28 17:05:16 +08:00
Xhofe 4c00866249 ✨ grouping settings 2021-12-28 16:38:56 +08:00
微凉 04752f7473 💄 change default background color 2021-12-25 23:44:52 +08:00
Xhofe 26b4766da7 ✨ remove . and .. for FTP 2021-12-25 19:22:05 +08:00
Xhofe 12af9cb89f 🎇 support hide account 2021-12-25 17:53:46 +08:00
Xhofe 958d793725 🎇 add public folder router 2021-12-25 17:07:59 +08:00
Xhofe 36f07ee194 ✨ add no cors config 2021-12-25 16:44:32 +08:00
Xhofe 91c2c21522 🎇 support wav audio preview 2021-12-21 15:44:07 +08:00
Xhofe d6d2f52922 💄 change default color 2021-12-21 13:13:01 +08:00
Xhofe 9162e782a0 :bug: fix default customize head 2021-12-21 13:09:59 +08:00
微凉 dc41ceb99b :bug: fix initialization sequence 2021-12-21 00:32:09 +08:00
微凉 c5e274f52a 💚 fix mv web file 2021-12-21 00:15:43 +08:00
微凉 3781043c78 :bug: fix build web file 2021-12-20 23:59:55 +08:00
微凉 1485ab2677 🎇 add local config 2021-12-20 23:56:17 +08:00
微凉 337bf08cd3 :bug: fix pikpak refresh_token endless loop 2021-12-20 23:21:52 +08:00
微凉 22665aa19a 🎨 move default text types 2021-12-20 17:24:49 +08:00
微凉 1ab6b4e201 💄 change default customize head 2021-12-20 17:21:11 +08:00
微凉 d97afb691b ✨ support pikpak and google api proxy 2021-12-20 15:44:17 +08:00
微凉 b63e65880f 🚧 google drive api proxy 2021-12-20 01:00:53 +08:00
微凉 44cbe0522c ✨ support subtitle 2021-12-19 21:24:04 +08:00
微凉 fedab86c30 🚧 change some proxy 2021-12-19 20:55:29 +08:00
微凉 731dbf6c3a :bug: fix 123pan 403 2021-12-19 20:32:47 +08:00
微凉 d00f75c814 🎨 change link interface 2021-12-19 20:00:53 +08:00
微凉 f5b8815a84 🎨 abstract 123pan request 2021-12-19 17:54:28 +08:00
微凉 99d06c7449 ✨ support api proxy 2021-12-19 17:12:19 +08:00
微凉 8e7b2c5837 ✨ api proxy 2021-12-19 17:10:20 +08:00
微凉 3d3a97288a ✨ add webdav tips for browser 2021-12-18 15:23:32 +08:00
微凉 c2142cc03a 🎨 Optimize code structure 2021-12-18 15:22:56 +08:00
微凉 3ce94de823 :bug: fix FTP down 2021-12-17 12:14:27 +08:00
微凉 c64c003257 🎇 feat: pikpak support 2021-12-16 22:50:23 +08:00
微凉 1c65588b4a 🎇 webdav update delete cache 2021-12-16 22:02:45 +08:00
微凉 d49f92b542 ✨ ftp support 2021-12-16 18:03:58 +08:00
微凉 92a0453e00 🎨 change internal type 2021-12-16 15:44:18 +08:00
微凉 bd7d27efc7 :bug: onedrive retry refresh token 2021-12-16 15:25:49 +08:00
微凉 b2055777e0 :bug: fix empty refresh_token 2021-12-16 14:07:15 +08:00
微凉 fe79f9518b 🚧 123pan write 2021-12-11 17:44:33 +08:00
微凉 a7e9bb9e9a :bug: fix alist driver files 2021-12-11 14:01:03 +08:00
微凉 73d85d96f1 🎇 189cloud write 2021-12-10 22:25:09 +08:00
微凉 ff91d7a37d 🎇 delete cache 2021-12-10 22:24:55 +08:00
微凉 78f81ddc3b 🎨 add some debug log 2021-12-10 22:24:43 +08:00
微凉 2f8258053f ✨ support native proxy url 2021-12-10 15:55:21 +08:00
微凉 511efce624 📝 update readme 2021-12-10 00:06:50 +08:00
微凉 14ff3450ab 📝 update readme 2021-12-09 23:05:16 +08:00
微凉 bbba161d55 :bug: fix proxy sign mismatch 2021-12-09 23:01:52 +08:00
微凉 6b61f8e9cc :bug: fix alist root foler invalid 2021-12-09 21:56:28 +08:00
微凉 a295e7024a 🎨 change link interface 2021-12-09 19:24:34 +08:00
微凉 b36eaf08f0 🎨 abstract cache method 2021-12-08 22:58:44 +08:00
微凉 bb6e520ab5 🎨 delete useless code 2021-12-08 22:44:45 +08:00
微凉 9b64e2e045 :bug: fix cache bug 2021-12-08 22:41:30 +08:00
微凉 ee7c12c30f ✨ cf workers proxy 2021-12-08 21:40:20 +08:00
微凉 96d6d58910 :bug: fix alist driver cache 2021-12-08 21:39:35 +08:00
微凉 2bf235a5ac :bug: fix link req nil 2021-12-08 20:27:39 +08:00
微凉 236f9969c0 🚧 support proxy 2021-12-08 20:00:52 +08:00
微凉 09e63027d9 🎇 allow delete deprecated setting 2021-12-08 19:36:07 +08:00
微凉 a15dae291e ✨ support webm video preview 2021-12-08 14:43:38 +08:00
微凉 efaaeedfb8 :bug: fix can't get index.html 2021-12-08 10:35:18 +08:00
微凉 190c8001a5 🚧 support proxy url 2021-12-08 10:33:26 +08:00
微凉 b8698700ef ✨ support add another alist 2021-12-08 09:10:00 +08:00
微凉 985b81826f 🎇 support add another alist 2021-12-07 20:16:34 +08:00
微凉 74d8fa3919 :fire: remove useless remark 2021-12-07 16:34:20 +08:00
微凉 43e4928bb9 :bug: fix aliyundrive webdav delete and upload 2021-12-07 16:32:59 +08:00
微凉 03580fd76c 🎨 Improve the code structure 2021-12-07 15:56:43 +08:00
微凉 6e8d551420 🚧 aliyundrive webdav write 2021-12-06 22:14:32 +08:00
微凉 28998d6f8c 🚧 aliyundrive webdav write 2021-12-06 17:49:20 +08:00
微凉 1779617cb9 🎨 Improve the code structure 2021-12-06 15:55:05 +08:00
微凉 7dfe48339c 🚧 native webdav write 2021-12-05 16:09:39 +08:00
微凉 9c5627a382 🚧 webdav write interface 2021-12-05 15:22:19 +08:00
微凉 809850321a 🔧 change customize settings 2021-12-05 13:43:08 +08:00
微凉 bdc1f68746 📝 update readme 2021-12-04 18:37:26 +08:00
微凉 9aaef6c3a3 📝 update readme image 2021-12-03 11:24:43 +08:00
微凉 bb50c52d0e 📝 update readme 2021-12-02 23:01:54 +08:00
微凉 6041e5a0fa 🎇 Add ISSUE_TEMPLATE 2021-12-02 22:55:01 +08:00
微凉 308a86c36e 📝 update readme 2021-12-02 22:38:18 +08:00
微凉 ba7c4fc230 🎇 Create LICENSE 2021-12-02 22:37:56 +08:00
微凉 d81ec0637d 🎇 md5 and filename 2021-12-02 18:57:29 +08:00
微凉 1d7d37e642 :bug: fix onedrive sort 2021-12-01 11:25:33 +08:00
微凉 b62a716267 ✨ remove onedrive empty cache 2021-12-01 11:25:04 +08:00
微凉 944941db10 🎇 support https 2021-12-01 00:19:06 +08:00
微凉 bd91acc5d0 :bug: fix lanzou webdav time error 2021-12-01 00:15:34 +08:00
微凉 cd50227835 🎇 support lanzou 2021-11-30 21:30:50 +08:00
微凉 50226f66e3 ✨ google default root folder 2021-11-30 19:10:27 +08:00
微凉 9dcaa9b07a 🎨 add types 2021-11-30 18:53:37 +08:00
微凉 fa6c0f78bc :bug: fix windows sharepoint path error 2021-11-30 16:45:08 +08:00
微凉 7f35dc6ade ✨ add onedrive thumbnail 2021-11-30 16:27:23 +08:00
微凉 5d6463b75a 🎨 move code 2021-11-30 10:00:06 +08:00
微凉 733b38b435 🎨 improve code structure 2021-11-30 09:37:51 +08:00
微凉 50a02a7af7 :fire: remove useless code 2021-11-29 21:30:52 +08:00
微凉 71b1517de7 :bug: fix windows check parent password 2021-11-29 21:09:16 +08:00
微凉 ffdd88ec66 ✨ webdav proxy 2021-11-29 16:42:46 +08:00
微凉 4ff2756572 :bug: fix 123pan webdav can't get 2021-11-29 16:06:49 +08:00
微凉 d955038ebc ✨ delete useless path unescape 2021-11-29 16:05:58 +08:00
微凉 72d5e4e691 ✨ delete useless log 2021-11-29 16:05:14 +08:00
微凉 b1e662cd34 :bug: fix onedrive slow response 2021-11-28 17:01:27 +08:00
微凉 0f0e1104a4 ✨ WebDAV auth 2021-11-28 16:18:09 +08:00
微凉 3041da35ab :bug: fix webdav proxy link auth 2021-11-28 16:05:41 +08:00
微凉 9eab54a7c8 ✨ webdav(view only) 2021-11-28 15:10:48 +08:00
微凉 0b8d3a0a2c :bug: fix can't get file 2021-11-28 15:10:06 +08:00
微凉 f9945a14a8 🎇 webdav unfinished 2021-11-28 00:12:04 +08:00
微凉 c39752ceb4 🎇 optimization googledrive 2021-11-27 20:40:03 +08:00
微凉 53b383d2cf 🔨 refactor driver: onedrive 2021-11-27 20:20:14 +08:00
微凉 e76fc3e616 🔨 refactor driver: native 2021-11-27 20:07:32 +08:00
微凉 eb21b87020 🔨 refactor driver: google 2021-11-27 19:52:38 +08:00
微凉 f577d82242 🔨 refactor driver: ali 2021-11-27 19:40:36 +08:00
微凉 98691b2aa8 🔨 refactor driver(123 and 189) 2021-11-27 18:55:09 +08:00
微凉 4fe6ed6c3e :bug: fix log 2021-11-26 20:23:33 +08:00
微凉 fe73ece57d ✨ change log 2021-11-26 20:20:32 +08:00
微凉 59b8f1084a :bug: fixed checking the parent folder when checked the password of the current folder 2021-11-25 16:24:39 +08:00
微凉 2f669ac45c 📝 update doc 2021-11-24 18:58:17 +08:00
微凉 d03d91d518 :bug: fix google drive root folder label 2021-11-24 13:34:15 +08:00
微凉 fe981f67ec :bug: fix windows check parent 2021-11-23 16:22:23 +08:00
微凉 8cfabfd0f5 ✨ resolved #170 native driver sort 2021-11-23 16:09:42 +08:00
微凉 163ee1159e ✨ change path interface 2021-11-23 15:58:03 +08:00
微凉 e31402e94f ✨ resolved #169 2021-11-23 15:46:10 +08:00
微凉 5500980d63 :bug: fix onedrive get files 2021-11-23 15:39:09 +08:00
微凉 b1695445e0 :bug: index add write header now 2021-11-22 18:10:09 +08:00
微凉 5db1ad4adf 🎇 resolved #160 2021-11-17 22:19:11 +08:00
微凉 725f5b0c55 ✨ support 123pan 2021-11-17 22:17:04 +08:00
微凉 87a74394b3 ✨ google client retry 2021-11-17 20:40:42 +08:00
微凉 a41c820525 :bug: fix debug output 2021-11-17 20:29:01 +08:00
微凉 cd53dc6d24 📝 update readme 2021-11-17 17:37:41 +08:00
微凉 cfe16b5ed2 ✨ add GoogleDrive 2021-11-17 17:21:11 +08:00
微凉 3d9746485d ✨ change proxy setting 2021-11-17 17:20:57 +08:00
微凉 0b7f2fee7d ✨ proxy add account 2021-11-17 16:37:12 +08:00
微凉 36d52e0b75 ✨ delete cache file 2021-11-17 16:25:32 +08:00
微凉 e4d254e4b0 ✨ simplify delete account when change name 2021-11-17 15:25:31 +08:00
微凉 e8d27a30b4 :bug: fix delete account when change name 2021-11-17 15:21:51 +08:00
微凉 69514668cc 🎇 replace title 2021-11-16 22:32:05 +08:00
微凉 e5f8f59c87 :bug: fix native account status 2021-11-16 18:23:59 +08:00
微凉 f87ee1ed9e :bug: fix 189 account status 2021-11-16 15:08:55 +08:00
微凉 07155cfd01 ✨ add show current password 2021-11-16 15:00:56 +08:00
微凉 5e982980dc :bug: fix determine gbk 2021-11-16 00:03:49 +08:00
微凉 8987958e26 :bug: fix 189 size and time 2021-11-15 20:31:44 +08:00
微凉 4466cb19a5 🎇 get 189 redirect url 2021-11-15 20:15:25 +08:00
微凉 da74e29b26 :bug: fix gbk garbled 2021-11-15 19:20:39 +08:00
微凉 82272fcbf5 :bug: fix windows onedrive path 2021-11-15 19:07:04 +08:00
微凉 74d86f8cc4 🎇 delete useless cookieJar 2021-11-15 19:06:44 +08:00
微凉 c03646dedf :bug: change text proxy 2021-11-15 19:06:10 +08:00
微凉 c0d1888e25 ✨ support 189cloud(login refer to PanIndex) 2021-11-15 18:00:43 +08:00
微凉 f4942e89bd :bug: fix account status 2021-11-15 15:01:14 +08:00
微凉 27e61c9eb8 :bug: fix change name error 2021-11-15 14:54:22 +08:00
微凉 aeb72320ca :bug: fix get error account 2021-11-15 14:53:32 +08:00
微凉 caddba05e9 💚 remove ppc64le docker 2021-11-14 14:53:23 +08:00
微凉 0dffb9aaa1 ✨ add customize style / script 2021-11-14 14:37:26 +08:00
微凉 0f93d2bfed :bug: fix version type 2021-11-14 00:30:15 +08:00
微凉 b785945210 :bug: fix add account 2021-11-13 19:31:35 +08:00
微凉 48a65784c7 :bug: fix can't delete and get meta 2021-11-13 17:10:44 +08:00
微凉 5f34b8ab80 ✨ account and meta add id 2021-11-13 16:49:03 +08:00
微凉 959ef620fb ✨ check parent folder password 2021-11-13 16:12:12 +08:00
微凉 a73501463f ✨ fix proxy 2021-11-13 16:02:19 +08:00
微凉 cf07b3921c 🔨 switch fiber to gin 2021-11-13 15:53:26 +08:00
微凉 65ec4e3611 ✨ dockerfile volume 2021-11-13 14:23:41 +08:00
微凉 7799c1f3bc 🎇 change default setting 2021-11-12 23:03:39 +08:00
微凉 e902c2ded7 ✨ add settings 2021-11-12 22:56:30 +08:00
微凉 2c675ae909 ✨ change settings 2021-11-12 19:39:01 +08:00
微凉 98c017730f ✨ resolved #155 2021-11-11 19:51:25 +08:00
微凉 f4affb2c69 ✨ add go proxy 2021-11-09 21:36:27 +08:00
微凉 17af21079f 💚 fix web path 2021-11-09 19:35:46 +08:00
微凉 f7d35ec925 💚 fix dockerfile 2021-11-09 18:12:36 +08:00
微凉 a8730e82b5 💚 fix dockerfile 2021-11-09 18:02:15 +08:00
微凉 6275e27d1b 💚 fix dockerfile 2021-11-09 17:54:38 +08:00
微凉 e70353704f 💚 fix dockerfile 2021-11-09 17:22:58 +08:00
微凉 be5b1e42d4 💚 fix dockerfile 2021-11-09 16:51:30 +08:00
微凉 7d08cbc4a9 🚧 build docker 2021-11-09 16:46:03 +08:00
微凉 1542878d66 🎨 format code 2021-11-09 16:03:04 +08:00
微凉 ac8f5d5737 :bug: file name contains + 2021-11-07 23:05:50 +08:00
微凉 9ed5b6e581 :bug: file name contains + 2021-11-07 22:12:52 +08:00
微凉 db7bff2d61 :bug: fix: #151 2021-11-07 14:04:54 +08:00
微凉 7970e737f0 ✨ add markdown theme setting 2021-11-06 17:33:00 +08:00
微凉 d4523d52ee :bug: delete timed task 2021-11-06 17:25:07 +08:00
微凉 ac8476702c :bug: refer to https://github.com/ad-m/github-push-action/issues/44#issuecomment-581706892 2021-11-05 20:52:50 +08:00
微凉 12f68eaed9 💚 fix upload asserts 2021-11-05 19:47:02 +08:00
微凉 6a51f02845 💚 mv build.sh 2021-11-05 19:11:39 +08:00
微凉 e7071e1093 ✨ release asserts files cdn 2021-11-05 19:03:54 +08:00
微凉 11b141b190 ✨ update onedrive account status 2021-11-05 16:32:20 +08:00
微凉 7e099b39cf ✨ cache len(files)=0: request 2021-11-05 16:30:50 +08:00
微凉 b46bf0dfc9 :bug: delete beta1 meta 2021-11-04 23:25:53 +08:00
微凉 91f64161b2 💚 change back to ubuntu 2021-11-04 22:38:08 +08:00
微凉 8255ef4346 💚 print md5 2021-11-04 21:34:52 +08:00
微凉 254b6c6f79 ✨ print build version 2021-11-04 18:42:27 +08:00
微凉 1c56d27e20 💚 fix macOS build 2021-11-04 16:54:35 +08:00
微凉 4da655cc44 💚 change release platform 2021-11-04 16:33:31 +08:00
微凉 a746324ecf 💚 brew 2021-11-04 14:03:45 +08:00
微凉 1a3b931727 💚 setup docker 2021-11-04 13:34:10 +08:00
微凉 bfec01e837 💚 change build platform 2021-11-04 13:23:17 +08:00
微凉 a7ecb7beb8 :bug: meta can't delete 2021-11-03 23:30:44 +08:00
微凉 c466672626 💚 fix action name 2021-11-03 21:28:18 +08:00
微凉 51811bf3db 👷 release 2021-11-03 20:58:19 +08:00
微凉 7c45e48f3f 💚 fix Permission denied 2021-11-03 20:02:51 +08:00
微凉 d73854afb5 💚 fix every step must define a uses or run key 2021-11-03 19:58:48 +08:00
微凉 e935d09cfe 👷 build action 2021-11-03 19:56:16 +08:00
微凉 1f91e26730 ✨ build 2021-11-03 19:51:19 +08:00
微凉 d78b64ee3c ✨ account index 2021-11-03 10:37:33 +08:00
微凉 04e89754f7 ✨ support onedrive 2021-11-02 23:53:05 +08:00
微凉 510292c8b0 ✨ meta api 2021-11-02 19:25:54 +08:00
微凉 8b81aeb5a1 ✨ ignore record not found 2021-11-01 23:14:34 +08:00
微凉 5c2ce5b442 ✨ clear cache 2021-11-01 22:42:24 +08:00
微凉 6313939e8c ✨ preview api 2021-10-31 21:27:47 +08:00
微凉 a3f1553d40 ✨ link 2021-10-31 00:36:17 +08:00
微凉 47bea7cc38 :bug: ali proxy 2021-10-30 21:06:38 +08:00
微凉 eb358e6ede ✨ static files 2021-10-30 19:26:23 +08:00
微凉 2780efaea8 :bug: sql group 2021-10-30 17:34:34 +08:00
微凉 0324ea1fcb ✨ settings 2021-10-30 00:35:29 +08:00
微凉 57ad66b43a ✨ guide 2021-10-29 14:50:26 +08:00
微凉 f4969560d4 ✨ proxy 2021-10-29 00:02:02 +08:00
微凉 0a50fbd080 ✨ ali path and link 2021-10-28 22:50:09 +08:00
微凉 98f7dffed9 🔨 change path 2021-10-28 12:37:31 +08:00
微凉 55f683b12d ✨ bootstrap 2021-10-27 22:45:36 +08:00
微凉 9644cc98c3 ✨ cache 2021-10-27 18:59:03 +08:00
微凉 fb7e67724d ✨ basic structure 2021-10-26 22:28:37 +08:00
微凉 d68a4048da 🎉 initial commit 2021-10-25 18:53:59 +08:00
124 changed files with 19547 additions and 1091 deletions
-2
View File
@@ -1,2 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto
+39
View File
@@ -0,0 +1,39 @@
name: "Bug report"
description: Bug report
labels: [pending triage]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: version
attributes:
label: Alist Version / Alist 版本
description: What version of our software are you running?
placeholder: v2.0.0
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug / 问题描述
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction / 复现链接
description: |
Please provide a link to a repo that can reproduce the problem you ran into.
请提供能复现此问题的链接
validations:
required: false
- type: textarea
id: logs
attributes:
label: 日志 / Logs
description: |
Please copy and paste any relevant log output.
请复制粘贴错误日志,或者截图
render: shell
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Discussions & Feature request
url: https://github.com/Xhofe/alist/discussions
about: Use GitHub discussions for message-board style questions and discussions or feature request.
+88
View File
@@ -0,0 +1,88 @@
name: build
on:
push:
branches: [ v2 ]
pull_request:
branches: [ v2 ]
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.17]
name: Build
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Checkout
uses: actions/checkout@v2
with:
ref: v2
path: alist
- name: Set up xgo
run: |
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
sudo apt install upx
- name: Build
run: |
mv alist/build.sh .
bash build.sh web
mv dist/* alist/public
bash build.sh build
- name: Upload artifact
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
+73 -18
View File
@@ -1,28 +1,83 @@
name: Release
name: release
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
release:
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.17]
name: Release
runs-on: ${{ matrix.platform }}
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ref: v2
path: alist
persist-credentials: false
fetch-depth: 0
- name: Set up xgo
run: |
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
sudo apt install upx
- name: Build
run: |
mv alist/build.sh .
bash build.sh cdn
mv dist/* alist/public
bash build.sh release
- 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
+6 -2
View File
@@ -20,6 +20,10 @@ dist/
# Dependency directories (remove the comment below to include it)
# vendor/
*.yml
bin/*
alist
/alist
*.json
public/index.html
public/assets/
public/public/
data/
+14
View File
@@ -0,0 +1,14 @@
FROM alpine:edge as builder
LABEL stage=go-builder
WORKDIR /app/
COPY ./ ./
RUN apk add --no-cache bash git go gcc musl-dev; \
sh build.sh docker
FROM alpine:edge
LABEL MAINTAINER="i@nn.ci"
VOLUME /opt/alist/data/
WORKDIR /opt/alist/
COPY --from=builder /app/bin/alist ./
EXPOSE 5244
CMD [ "./alist" ]
+657 -17
View File
File diff suppressed because it is too large Load Diff
Regular → Executable
+58 -44
View File
@@ -1,61 +1,75 @@
<p align="center">
<img src="https://img.oez.cc/2020/12/24/1fb16bc25a4f6.png" alt="RenewalManage Logo" width=200/>
</p>
<p align="center">
<a href="https://github.com/Xhofe/alist/releases"><img src="https://img.shields.io/github/release/Xhofe/alist" alt="Release version"></a>
<a href="https://github.com/Xhofe/alist/actions?query=workflow%3ARelease"><img src="https://github.com/Xhofe/alist/workflows/Release/badge.svg" alt="Release status"></a>
<a href="https://github.com/Xhofe/RenewalManage/releases"><img src="https://img.shields.io/github/downloads/Xhofe/alist/latest/total" alt="Downloads"></a>
<a href="https://github.com/Xhofe/alist/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Xhofe/alist" alt="License"></a>
<div align="center">
<h3><a href="https://alist.nn.ci">Alist</a></h3>
<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>
<a href="https://github.com/Xhofe/alist/actions?query=workflow%3ABuild"><img src="https://img.shields.io/github/workflow/status/Xhofe/alist/build?style=flat-square" alt="Build status"></a>
<a href="https://github.com/Xhofe/alist/releases"><img src="https://img.shields.io/github/downloads/Xhofe/alist/total?style=flat-square&color=%239F7AEA" alt="Downloads"></a>
<a href="https://github.com/Xhofe/alist/blob/v2/LICENSE"><img src="https://img.shields.io/github/license/Xhofe/alist?style=flat-square" alt="License"></a>
<a href="https://pay.xhofe.top">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square" alt="donate">
</a>
</p>
</div>
---
### 这是什么?
English | [中文](./README_cn.md)
一款阿里云盘的目录文件列表程序,后端基于`golang`最好的`http`框架`gin`,前端使用`vue`和`ant design`。
## Features
### 前端项目地址
- [x] Multiple storage
- [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] [GoogleDrive](https://drive.google.com/)
- [x] [123pan](https://www.123pan.com/)
- [x] [Lanzou](https://pc.woozooo.com/)
- [x] [Alist](https://github.com/Xhofe/alist)
- [x] FTP
- [x] [PikPak](https://www.mypikpak.com/)
- [x] [ShandianPan](https://shandianpan.com/)
- [x] [S3](https://aws.amazon.com/s3/)
- [x] WebDav
- [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] Easy to deploy and out-of-the-box
- [x] File preview (PDF, markdown, code, plain text, ...)
- [x] Image preview in gallery mode
- [x] Video and audio preview (mp4, mp3, ...)
- [x] Office documents preview (docx, pptx, xlsx, ...)
- [x] `README.md` preview rendering
- [x] File permalink copy and direct file download
- [x] Dark mode
- [x] I18n
- [x] Protected routes (password protection and authentication)
- [x] WebDav (see https://alist-doc.nn.ci/en/docs/webdav for details)
- [x] [Docker Deploy](https://hub.docker.com/r/xhofe/alist)
- [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
- https://github.com/Xhofe/alist-web
## Discussion
### 演示地址
Please go to our [discussion forum](https://github.com/Xhofe/alist/discussions) for general questions, **issues are for bug reports only.**
- https://alist.nn.ci
## Demo
### 预览
Available at: <https://alist.nn.ci>.
<a href="https://alist.nn.ci/"><img src="https://img.oez.cc/2020/12/24/d81d2dab3e5f0.png"></a>
![demo](https://inews.gtimg.com/newsapp_ls/0/14256614096/0)
### 支持的功能
## Document
- 自动刷新`token`,`refresh_token`自动更新,失效时间未知,本人使用过程中没有失效过。
- 图片、视频、音频预览
- 目录加密
- `Readme`渲染
- 自定义根目录
- …
<https://alist-doc.nn.ci/en/>
#### TODO
## License
- [x] 排序
- [ ] 文件预览
- [x] 图片
- [x] 视频
- [x] 音频
- [ ] 文档
- [x] `Readme`渲染
- [x] 密码加密
- [ ] 搜索与翻页
- [ ] 文件直链
- [ ] 路径优化
- [ ] 缓存
The `AList` is open-source software licensed under the AGPL-3.0 license.
### 如何使用
---
正在写……
### License
The `AList` is open-source software licensed under the MIT license.
> [@Blog](https://www.nn.ci/) · [@GitHub](https://github.com/Xhofe)
+74
View File
@@ -0,0 +1,74 @@
<div align="center">
<h3><a href="https://alist.nn.ci">Alist</a></h3>
<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>
<a href="https://github.com/Xhofe/alist/actions?query=workflow%3ABuild"><img src="https://img.shields.io/github/workflow/status/Xhofe/alist/build?style=flat-square" alt="Build status"></a>
<a href="https://github.com/Xhofe/alist/releases"><img src="https://img.shields.io/github/downloads/Xhofe/alist/total?style=flat-square&color=%239F7AEA" alt="Downloads"></a>
<a href="https://github.com/Xhofe/alist/blob/v2/LICENSE"><img src="https://img.shields.io/github/license/Xhofe/alist?style=flat-square" alt="License"></a>
<a href="https://pay.xhofe.top">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square" alt="donate">
</a>
</div>
---
[English](./README.md) | 中文
## 支持
- [x] 多种存储
- [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] [GoogleDrive](https://drive.google.com/)
- [x] [123云盘](https://www.123pan.com/)
- [x] [蓝奏云](https://pc.woozooo.com/)
- [x] [Alist](https://github.com/Xhofe/alist)
- [x] FTP
- [x] [PikPak](https://www.mypikpak.com/)
- [x] [闪电盘](https://shandianpan.com/)
- [x] [S3](https://aws.amazon.com/cn/s3/)
- [x] WebDav
- [x] Teambition([中国](https://www.teambition.com/ ),[国际](https://us.teambition.com/ ))
- [x] [分秒帧](https://www.mediatrack.cn/)
- [x] [和彩云](https://yun.139.com/) (个人云, 家庭云)
- [x] 部署方便,开箱即用
- [x] 文件预览(PDF、markdown、代码、纯文本……)
- [x] 画廊模式下的图像预览
- [x] 视频和音频预览(mp4、mp3 等)
- [x] Office 文档预览(docx、pptx、xlsx、...)
- [x] `README.md` 预览渲染
- [x] 文件永久链接复制和直接文件下载
- [x] 黑暗模式
- [x] 国际化
- [x] 受保护的路由(密码保护和身份验证)
- [x] WebDav(具体见https://alist-doc.nn.ci/docs/webdav )
- [x] [Docker 部署](https://hub.docker.com/r/xhofe/alist)
- [x] Cloudflare workers 中转
- [x] 文件/文件夹打包下载
- [x] 支持视频列表播放和字幕(ass,srt,vtt)
- [x] 网页上传(可以允许访客上传),删除
## 讨论
一般问题请到[讨论论坛](https://github.com/Xhofe/alist/discussions) ,**issue仅针对错误报告。**
## 演示
<https://alist.nn.ci>。
![演示](https://inews.gtimg.com/newsapp_ls/0/14256614096/0)
## 文档
<https://alist-doc.nn.ci/>
## 许可
`AList` 是在 AGPL-3.0 许可下许可的开源软件。
---
> [@Blog](https://www.nn.ci/) · [@GitHub](https://github.com/Xhofe)
-75
View File
@@ -1,75 +0,0 @@
package alidrive
import (
"encoding/json"
"fmt"
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/utils"
log "github.com/sirupsen/logrus"
)
func TokenLogin() (*TokenLoginResp, error) {
log.Infof("尝试使用token登录...")
url:="https://auth.aliyundrive.com/v2/oauth/token_login"
req:=TokenLoginReq{Token:conf.Conf.AliDrive.LoginToken}
log.Debugf("token_login_req:%v",req)
var tokenLogin TokenLoginResp
if body, err := DoPost(url, req,false); err != nil {
log.Errorf("tokenLogin-doPost出错:%s",err.Error())
return nil,err
}else {
if err = json.Unmarshal(body,&tokenLogin);err!=nil {
log.Errorf("解析json[%s]出错:%s",string(body),err.Error())
return nil,err
}
}
if tokenLogin.IsAvailable() {
return &tokenLogin,nil
}
return nil,fmt.Errorf("登录token失效,请更换:%s",tokenLogin.Message)
}
func GetToken(tokenLogin *TokenLoginResp) (*TokenResp,error) {
log.Infof("获取API token...")
url:="https://websv.aliyundrive.com/token/get"
code:=utils.GetCode(tokenLogin.Goto)
if code == "" {
return nil,fmt.Errorf("获取code出错")
}
req:=GetTokenReq{Code:code}
var token TokenResp
if body, err := DoPost(url, req,false); err != nil {
log.Errorf("tokenLogin-doPost出错:%s",err.Error())
return nil,err
}else {
if err = json.Unmarshal(body,&token);err!=nil {
log.Errorf("解析json[%s]出错:%s",string(body),err.Error())
log.Errorf("此处json解析失败应该是code失效")
return nil,fmt.Errorf("code失效")
}
}
return &token,nil
}
func RefreshToken() bool {
log.Infof("刷新token...")
url:="https://websv.aliyundrive.com/token/refresh"
req:=RefreshTokenReq{RefreshToken:conf.Conf.AliDrive.RefreshToken}
var token TokenResp
if body, err := DoPost(url, req,false); err != nil {
log.Errorf("tokenLogin-doPost出错:%s",err.Error())
return false
}else {
if err = json.Unmarshal(body,&token);err!=nil {
log.Errorf("解析json[%s]出错:%s",string(body),err.Error())
log.Errorf("此处json解析失败应该是refresh_token失效")
return false
}
}
//刷新成功 更新token并写入文件
conf.Conf.AliDrive.AccessToken=token.AccessToken
conf.Conf.AliDrive.RefreshToken=token.RefreshToken
conf.Authorization=token.TokenType+"\t"+token.AccessToken
utils.WriteToYml(conf.Con,conf.Conf)
return true
}
-5
View File
@@ -1,5 +0,0 @@
package alidrive
var (
User *UserInfo
)
-46
View File
@@ -1,46 +0,0 @@
package alidrive
type ListReq struct {
DriveId string `json:"drive_id"`
Fields string `json:"fields"`
ImageThumbnailProcess string `json:"image_thumbnail_process"`
ImageUrlProcess string `json:"image_url_process"`
Limit int `json:"limit"`
Marker string `json:"marker"`
OrderBy string `json:"order_by"`
OrderDirection string `json:"order_direction"`
ParentFileId string `json:"parent_file_id"`
VideoThumbnailProcess string `json:"video_thumbnail_process"`
}
type GetReq struct {
DriveId string `json:"drive_id"`
FileId string `json:"file_id"`
ImageThumbnailProcess string `json:"image_thumbnail_process"`
VideoThumbnailProcess string `json:"video_thumbnail_process"`
}
type SearchReq struct {
DriveId string `json:"drive_id"`
ImageThumbnailProcess string `json:"image_thumbnail_process"`
ImageUrlProcess string `json:"image_url_process"`
Limit int `json:"limit"`
Marker string `json:"marker"`
OrderBy string `json:"order_by"`//"type ASC,updated_at DESC"
Query string `json:"query"`// "name match '测试文件'"
VideoThumbnailProcess string `json:"video_thumbnail_process"`
}
type TokenLoginReq struct {
Token string `json:"token"`
}
type GetTokenReq struct {
Code string `json:"code"`
}
type RefreshTokenReq struct {
RefreshToken string `json:"refresh_token"`
}
-200
View File
File diff suppressed because it is too large Load Diff
-135
View File
@@ -1,135 +0,0 @@
package alidrive
import (
log "github.com/sirupsen/logrus"
"io/ioutil"
"net/http"
"strings"
"time"
)
type RespError struct {
Code string `json:"code"`
Message string `json:"message"`
}
type UserInfo struct {
RespError
DomainId string `json:"domain_id"`
UserId string `json:"user_id"`
Avatar string `json:"avatar"`
CreatedAt int `json:"created_at"`
UpdatedAt int `json:"updated_at"`
Email string `json:"email"`
NickName string `json:"nick_name"`
Phone string `json:"phone"`
Role string `json:"role"`
Status string `json:"status"`
UserName string `json:"user_name"`
Description string `json:"description"`
DefaultDriveId string `json:"default_drive_id"`
UserData map[string]interface{} `json:"user_data"`
}
type Files struct {
RespError
Items []File `json:"items"`
NextMarker string `json:"next_marker"`
Readme string `json:"readme"`
Paths []Path `json:"paths"`
}
type Path struct {
Name string `json:"name"`
FileId string `json:"file_id"`
}
type File struct {
RespError
DriveId string `json:"drive_id"`
CreatedAt *time.Time `json:"created_at"`
DomainId string `json:"domain_id"`
EncryptMode string `json:"encrypt_mode"`
FileExtension string `json:"file_extension"`
FileId string `json:"file_id"`
Hidden bool `json:"hidden"`
Name string `json:"name"`
ParentFileId string `json:"parent_file_id"`
Starred bool `json:"starred"`
Status string `json:"status"`
Type string `json:"type"`
UpdatedAt *time.Time `json:"updated_at"`
// 文件多出部分
Category string `json:"category"`
ContentHash string `json:"content_hash"`
ContentHashName string `json:"content_hash_name"`
ContentType string `json:"content_type"`
Crc64Hash string `json:"crc_64_hash"`
DownloadUrl string `json:"download_url"`
PunishFlag int `json:"punish_flag"`
Size int `json:"size"`
Thumbnail string `json:"thumbnail"`
Url string `json:"url"`
ImageMediaMetadata map[string]interface{} `json:"image_media_metadata"`
Paths []Path `json:"paths"`
}
func (resp *RespError) IsAvailable() bool {
return resp.Code == ""
}
type TokenLoginResp struct {
RespError
Goto string `json:"goto"`
}
type TokenResp struct {
RespError
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpiresIn int `json:"expires_in"`
TokenType string `json:"token_type"`
UserInfo
DefaultSboxDriveId string `json:"default_sbox_drive_id"`
ExpireTime *time.Time `json:"expire_time"`
State string `json:"state"`
ExistLink []interface{} `json:"exist_link"`
NeedLink bool `json:"need_link"`
PinSetup bool `json:"pin_setup"`
IsFirstLogin bool `json:"is_first_login"`
NeedRpVerify bool `json:"need_rp_verify"`
DeviceId string `json:"device_id"`
}
func HasPassword(files *Files) string {
fileList := files.Items
for _, file := range fileList {
if strings.HasPrefix(file.Name, ".password-") {
return file.Name[10:]
}
}
return ""
}
func HasReadme(files *Files) string {
fileList := files.Items
for _, file := range fileList {
if file.Name == "Readme.md" {
resp, err := http.Get(file.Url)
if err != nil {
log.Errorf("Get Readme出错:%s", err.Error())
return ""
}
data, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Errorf("读取 Readme出错:%s", err.Error())
return ""
}
return string(data)
}
}
return ""
}
+55 -3
View File
@@ -1,7 +1,59 @@
package main
import "github.com/Xhofe/alist/bootstrap"
import (
"fmt"
"github.com/Xhofe/alist/bootstrap"
"github.com/Xhofe/alist/conf"
_ "github.com/Xhofe/alist/drivers"
"github.com/Xhofe/alist/model"
"github.com/Xhofe/alist/server"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
)
func Init() bool {
//bootstrap.InitLog()
bootstrap.InitConf()
bootstrap.InitCron()
bootstrap.InitModel()
if conf.Password {
pass, err := model.GetSettingByKey("password")
if err != nil {
log.Errorf(err.Error())
return false
}
log.Infof("current password: %s", pass.Value)
return false
}
server.InitIndex()
bootstrap.InitSettings()
bootstrap.InitAccounts()
bootstrap.InitCache()
return true
}
func main() {
bootstrap.Run()
}
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)
return
}
if !Init() {
return
}
if !conf.Debug {
gin.SetMode(gin.ReleaseMode)
}
r := gin.Default()
server.InitApiRouter(r)
base := fmt.Sprintf("%s:%d", conf.Conf.Address, conf.Conf.Port)
log.Infof("start server @ %s", base)
var err error
if conf.Conf.Scheme.Https {
err = r.RunTLS(base, conf.Conf.Scheme.CertFile, conf.Conf.Scheme.KeyFile)
} else {
err = r.Run(base)
}
if err != nil {
log.Errorf("failed to start: %s", err.Error())
}
}
+12
View File
@@ -0,0 +1,12 @@
package main
import (
"fmt"
"net/url"
"testing"
)
func TestUrl(t *testing.T) {
s,_ := url.QueryUnescape("/ali/%E7%8C%AA%E5%A4%B4%E7%9A%84%E6%96%87%E4%BB%B6%5B%E5%98%BF%E5%98%BF%5D/%E9%82%B9%E9%82%B9%E7%9A%84%E6%96%87%E4%BB%B6/%E6%A1%8C%E9%9D%A2%E5%A3%81%E7%BA%B8/v2-e8f266ba17ae387eefed1cb22b2b5e4e_r.jpg")
fmt.Print(s)
}
+30
View File
@@ -0,0 +1,30 @@
package bootstrap
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/drivers/base"
"github.com/Xhofe/alist/model"
log "github.com/sirupsen/logrus"
)
func InitAccounts() {
log.Infof("init accounts...")
var accounts []model.Account
if err := conf.DB.Find(&accounts).Error; err != nil {
log.Fatalf("failed sync init accounts")
}
for i, account := range accounts {
model.RegisterAccount(account)
driver, ok := base.GetDriver(account.Type)
if !ok {
log.Errorf("no [%s] driver", account.Type)
} else {
err := driver.Save(&accounts[i], nil)
if err != nil {
log.Errorf("init account [%s] error:[%s]", account.Name, err.Error())
} else {
log.Infof("success init account: %s, type: %s", account.Name, account.Type)
}
}
}
}
-34
View File
@@ -1,34 +0,0 @@
package bootstrap
import (
"github.com/Xhofe/alist/alidrive"
"github.com/Xhofe/alist/conf"
log "github.com/sirupsen/logrus"
)
func InitAliDrive() bool {
//首先token_login
if conf.Conf.AliDrive.RefreshToken == "" {
tokenLogin,err:=alidrive.TokenLogin()
if err!=nil {
log.Errorf("登录失败:%s",err.Error())
return false
}
//然后get_token
token,err:=alidrive.GetToken(tokenLogin)
if err!=nil {
return false
}
conf.Authorization=token.TokenType+" "+token.AccessToken
}
conf.Authorization=conf.Bearer+conf.Conf.AliDrive.AccessToken
log.Infof("token:%s",conf.Authorization)
user,err:=alidrive.GetUserInfo()
if err != nil {
log.Errorf("初始化用户失败:%s",err.Error())
return false
}
log.Infof("当前用户信息:%v",user)
alidrive.User=user
return true
}
+22
View File
@@ -0,0 +1,22 @@
package bootstrap
import (
"github.com/Xhofe/alist/conf"
"github.com/eko/gocache/v2/cache"
"github.com/eko/gocache/v2/store"
goCache "github.com/patrickmn/go-cache"
log "github.com/sirupsen/logrus"
"time"
)
// InitCache init cache
func InitCache() {
log.Infof("init cache...")
c := conf.Conf.Cache
if c.Expiration == 0 {
c.Expiration, c.CleanupInterval = 60, 120
}
goCacheClient := goCache.New(time.Duration(c.Expiration)*time.Minute, time.Duration(c.CleanupInterval)*time.Minute)
goCacheStore := store.NewGoCache(goCacheClient, nil)
conf.Cache = cache.New(goCacheStore)
}

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