作为 alist 下载代理,如连接中提到:Alist 下载代理 URL
-
下载适用于你系统的最新版本 release
-
解压
-
运行
alist-proxy会在当前目录下生成默认配置文件config.yaml -
如果没有找到对应的版本,也可以自己构建:
- 安装 Go 版本需要
1.19+ - clone 项目:
git clone https://github.com/Muione/alist-proxy.git
- 进入项目目录:
cd alist-proxy- 安装依赖:
go mod download
- 构建:
go build alist-proxy.go
- 安装 Go 版本需要
# Proxy port
port: 5243
# Use HTTPS (true/false)
https: false
# HTTPS certificate file (if https is true)
certFile: server.crt
# HTTPS key file (if https is true)
keyFile: server.key
# Alist server address
address: http://your-alist-server
# Alist server API token
token: alist-xxxport监听端口,默认5243https是否使用 HTTPS,默认falsecertFileHTTPS 证书文件,如果https为true则需要配置keyFileHTTPS 密钥文件,如果https为true则需要配置addressAlist 服务器地址tokenAlist 服务器 API token,可以从alist中管理-设置-其他-令牌中获取
- 运行
alist-proxy即可
- 创建
/etc/systemd/system/alist-proxy.service文件,内容如下:
[Unit]
Description=Alist Proxy Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/path/to/
ExecStart=/path/to/alist-proxy
StandardOutput=append:/path/to/log.log # 将输出重定向到文件中,可以记录访问日志,防止恶意访问
StandardError=append:/path/to/err.log
Restart=on-failure
[Install]
WantedBy=multi-user.target- 修改
/path/to/为你的实际路径 - 运行
sudo systemctl daemon-reload - 运行
sudo systemctl start alist-proxy - 运行
sudo systemctl enable alist-proxy