|
|
il y a 1 semaine | |
|---|---|---|
| .github | il y a 2 semaines | |
| public | il y a 2 semaines | |
| services | il y a 4 ans | |
| src | il y a 1 semaine | |
| .browserslistrc | il y a 5 ans | |
| .env | il y a 4 mois | |
| .eslintrc.js | il y a 11 mois | |
| .gitignore | il y a 5 ans | |
| Dockerfile | il y a 2 semaines | |
| LICENSE | il y a 5 ans | |
| README.md | il y a 2 semaines | |
| babel.config.js | il y a 1 semaine | |
| package.json | il y a 1 semaine | |
| vue.config.js | il y a 1 semaine | |
| yarn.lock | il y a 1 semaine |
基于 Vue.js 2.6 与 tindy2013/subconverter 后端实现的订阅配置自动生成 Web 界面。提供了简洁美观的前端界面,支持多种代理客户端配置生成。
一键部署,无需配置:
docker run -d \
-p 58080:80 \
--restart always \
--name subweb \
careywong/subweb:latest
访问 http://localhost:58080/ 即可使用。
# 克隆项目
git clone https://github.com/CareyWang/sub-web.git
cd sub-web
# 安装依赖
yarn install
# 启动开发服务器
yarn serve
访问 http://localhost:8080/ 查看应用。
# 检查 Node.js 版本
node -v
# 应输出: v22.x.x
# 检查 Yarn 版本
yarn -v
# 应输出: 1.22.x
# 克隆项目
git clone https://github.com/CareyWang/sub-web.git
cd sub-web
# 安装依赖
yarn install
创建 .env 文件配置后端服务(可选,如需自定义后端地址):
# Subconverter 后端地址
VUE_APP_SUBCONVERTER_DEFAULT_BACKEND=https://api.wcc.best
# 其他配置
VUE_APP_PROJECT=https://github.com/CareyWang/sub-web
VUE_APP_BOT_LINK=https://t.me/subconverter_discuss
# 启动开发服务器
yarn serve
访问 http://localhost:8080/ 查看应用。
# 构建生产版本
yarn build
构建完成后,dist 目录包含所有生产文件。
如需修改代码并自定义构建:
# 构建镜像
docker build -t subweb-local:latest .
# 运行容器
docker run -d \
-p 58080:80 \
--restart always \
--name subweb \
subweb-local:latest
使用 Docker Compose 一键部署完整服务栈(包含 MyUrls 短链接服务):
# 进入 services 目录
cd services
# 编辑 .env 文件,修改端口和域名配置
# 默认配置:SUBWEB_PORT=58080, MYURLS_PORT=8002
vim .env
# 启动所有服务
docker-compose up -d
配置 Nginx 作为反向代理和静态文件服务器:
server {
listen 80;
server_name your-domain.com;
# HTTPS 重定向(可选)
# return 301 https://$server_name$request_uri;
root /var/www/sub-web/dist;
index index.html index.htm;
# SPA 路由支持
location / {
try_files $uri $uri/ /index.html;
}
# Gzip 压缩
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 6;
gzip_types
text/plain
text/css
text/javascript
application/json
application/javascript
application/x-javascript
application/xml
text/xml;
gzip_vary on;
# 静态资源缓存
location ~* \.(css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|webm|htc|xml|woff|woff2|ttf|eot)$ {
access_log off;
add_header Cache-Control "public,max-age=86400";
add_header Vary Accept-Encoding;
}
}
# HTTPS 配置示例(可选)
server {
listen 443 ssl http2;
server_name your-domain.com;
ssl_certificate /path/to/your/cert.pem;
ssl_certificate_key /path/to/your/key.pem;
# SSL 安全配置
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
root /var/www/sub-web/dist;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
}
我们欢迎所有形式的贡献!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)如果您遇到任何问题或有改进建议,请:
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
Copyright © 2020-2025 CareyWong
感谢所有为这个项目做出贡献的开发者和用户!
特别感谢: