Skip to content

订阅转换前端,又一个 sub-web,基于 React、Next.JS 实现前端

License

Notifications You must be signed in to change notification settings

DyAxy/yet-another-sub-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8250d3a · Jul 31, 2024

History

27 Commits
Jul 16, 2024
Jul 31, 2024
Jul 31, 2024
Jul 27, 2024
Jul 7, 2024
Jul 7, 2024
Jul 7, 2024
Jul 11, 2024
Jul 7, 2024
Jul 28, 2024
Jul 31, 2024
Jul 17, 2024
Jul 7, 2024
Jul 16, 2024
Jul 16, 2024
Jul 7, 2024
Jul 7, 2024
Jul 7, 2024

Repository files navigation

yet-another-sub-web 又一个订阅转换前端

Website Vercel GitHub License

又一个 sub-web,基于 React、Next.JS 实现前端,需要搭配 tindy2013/subconverter 后端来实现订阅配置。

快速部署

使用 Vercel 服务

Deploy with Vercel

本地使用 Docker

  • Docker run方式部署
docker run -d -p 127.0.0.1:3000:3000 --name yet-another-sub-web --restart=always moefaq/yet-another-sub-web:latest -e NEXT_PUBLIC_SHORTURL=https://suo.yt/ -e NEXT_PUBLIC_BACKENDS=http://127.0.0.1:25500/sub?
# 替换后端或短链接服务
  • Docker compose方式部署
curl -LO https://raw.githubusercontent.com/DyAxy/yet-another-sub-web/master/docker-compose.yml
# 你可以修改 docker-compose.yml 中的 env
docker compose up -d

环境变量

NEXT_PUBLIC_SHORTURL NEXT_PUBLIC_BACKENDS
短链接服务,记得带 / 后端完整地址
https://suo.yt/ http://127.0.0.1:25500/sub?

常规部署

首先你需要 Node.js 环境

# Clone 库 并跳转至该文件夹
git clone https://github.com/DyAxy/yet-another-sub-web.git
cd yet-another-sub-web
# 当然你可以修改配置在 .env
# NEXT_PUBLIC_SHORTURL 为短链接服务
# NEXT_PUBLIC_BACKENDS 为后端,请使用|分隔
# 安装依赖环境并测试,你也可以使用yarn/pnpm/bun
npm i
npm run dev

浏览器打开 http://localhost:3000 来查看是否正常运行.

当一切就绪后,你可以打包构建运行它

npm run build
npm run start

此时打开 http://localhost:3000 即可正常使用。 需要常驻进程,可使用:screenpm2nohupsystemctl

可能你还需要反代,推荐使用 Caddy 轻量化反代,仅需加入到 CaddyFile 这些即可使用:

你的域名.com {
  encode gzip
  reverse_proxy 127.0.0.1:3000
}

静态导出

在常规部署 npm run dev 之后,测试没问题的情况下,修改文件:next.config.mjs,添加一行:nextConfig.output = 'export' 则会将html及其js文件静态导出至out文件夹,使用 Caddynginx 之类即可使用。

感谢

CareyWang/sub-web
CareyWang/MyUrls
tindy2013/subconverter

About

订阅转换前端,又一个 sub-web,基于 React、Next.JS 实现前端

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published