雨林的Blog

阿里云盘目录程序AList安装教程,非Teambition

大佬新出阿里云盘的目录程序,不是Teambition

官方加了防盗链,目录程序已失效

简介

AList是一款阿里云盘的目录文件列表程序,后端基于golang最好的http框架gin,前端使用vueant design。没有专门学过前端,大佬轻喷

项目地址:

预览

如何部署

首先第一步,Star作者的项目AList

获取refresh_token

简单的refresh_token获取方式

登陆阿里云盘之后,打开开发者工具,切换到Application选项卡,点开Local storage,会有一个token项,点开就可以看到refresh_token

部署

前后端不分离

info:
  title: AList #网站名称,如果填写,则会替换掉默认的
  site_url: http://localhost #网站地址,前后端分离时必须正确填写
  logo: #网站logo,如果填写,则会替换掉默认的
server:
  port: "5244" #程序监听端口
  search: false
  static: dist
ali_drive:
  api_url: https://api.aliyundrive.com/v2
  root_folder: root #根目录
  token:
  access_token: 
  refresh_token: #必填!!!
  max_files_count: 3000 #一次性最大文件数量

只需要填入获得的refresh_token,其他可以默认
现在的情况应该是,目录下有两个文件alistconf.yml和一个文件夹dist

进入到网站根目录执行下列命令

chmod +x alist
nohup ./alist >log.log 2>&1 &

可以cat log.log看看有没有报错。或者访问http://ip:5244进行查看。

宝塔开启反代

宝塔面板网站设置里开启反代

前后端分离

与前后端不分离操作步骤差不多,不同的地方在于:

反向代理

程序默认监听5244端口,要实现https访问,需要使用nginx反向代理,在配置文件中加入

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_redirect off;
        proxy_pass http://127.0.0.1:5244;
    }

插件地址:https://chrome.google.com/webstore/detail/postwoman-http%E6%8E%A5%E5%8F%A3%E8%B0%83%E8%AF%95%E6%8F%92%E4%BB%B6/hoeapaidnfedjfbdghipliboclcighij
转自:https://www.nn.ci/archives/alist.html

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »