Convert Figma logo to code with AI

CareyWang logosub-web

No description available

6,085
2,032
6,085
20

Top Related Projects

Utility to convert between various subscription format

5,598

SSR 去广告ACL规则/SS完整GFWList规则/Clash规则碎片,Telegram频道订阅地址

搜集、整理、维护 Surge / Quantumult (X) / Shadowrocket / Surfboard / clash (Premium) 实用规则。

🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。

Quick Overview

CareyWang/sub-web is a web-based subscription conversion tool for various proxy protocols. It provides a user-friendly interface for converting and combining different subscription formats, making it easier for users to manage and utilize multiple proxy services.

Pros

  • Easy-to-use web interface for subscription conversion
  • Supports multiple proxy protocols and subscription formats
  • Customizable output options for tailored results
  • Open-source project with potential for community contributions

Cons

  • Requires self-hosting or reliance on public instances
  • May have limitations in handling certain subscription formats
  • Potential security concerns when processing sensitive subscription data
  • Limited documentation for advanced usage and customization

Getting Started

To set up and run sub-web locally:

  1. Clone the repository:

    git clone https://github.com/CareyWang/sub-web.git
    
  2. Navigate to the project directory:

    cd sub-web
    
  3. Install dependencies:

    npm install
    
  4. Start the development server:

    npm run serve
    
  5. Access the web interface at http://localhost:8080

For production deployment, build the project using:

npm run build

Then serve the contents of the dist directory using a web server of your choice.

Competitor Comparisons

Utility to convert between various subscription format

Pros of subconverter

  • More comprehensive conversion capabilities, supporting a wider range of proxy protocols
  • Backend-focused, offering greater flexibility for integration into various systems
  • Actively maintained with frequent updates and improvements

Cons of subconverter

  • Requires more technical knowledge to set up and configure
  • Lacks a built-in user interface, making it less accessible for non-technical users
  • May require additional resources to run as a backend service

Code Comparison

sub-web (Vue.js frontend):

export default {
  data() {
    return {
      sourceSubUrl: '',
      targetSubUrl: '',
      customBackend: ''
    }
  },
  // ...
}

subconverter (C++ backend):

int main(int argc, char *argv[]) {
    init();
    if(argc > 1 && strcmp(argv[1], "-cfw") == 0)
        cfw_child_process();
    else
        start_web_server();
    return 0;
}

sub-web focuses on providing a user-friendly interface for subscription conversion, while subconverter offers a powerful backend engine for handling complex conversion tasks. sub-web is more suitable for end-users who prefer a graphical interface, whereas subconverter is better for developers and advanced users who need more control and integration options.

5,598

SSR 去广告ACL规则/SS完整GFWList规则/Clash规则碎片,Telegram频道订阅地址

Pros of ACL4SSR

  • More comprehensive rule sets for content filtering and ad blocking
  • Regularly updated with community contributions
  • Includes pre-configured lists for popular services and regions

Cons of ACL4SSR

  • Primarily focused on rule sets, lacking a user-friendly interface
  • May require more technical knowledge to implement and customize
  • Limited documentation in English

Code Comparison

sub-web:

export function getShortId(id) {
  return id.split('-')[0]
}

ACL4SSR:

[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则

;设置规则标志位
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list

The code snippets highlight the different focus areas of the two projects. sub-web emphasizes frontend functionality, while ACL4SSR concentrates on rule configurations for network filtering.

sub-web provides a more user-friendly interface for subscription management, while ACL4SSR offers extensive rule sets for content filtering and ad blocking. ACL4SSR may require more technical expertise to implement, but it provides more comprehensive and regularly updated rules for various services and regions.

搜集、整理、维护 Surge / Quantumult (X) / Shadowrocket / Surfboard / clash (Premium) 实用规则。

Pros of SS-Rule-Snippet

  • Provides a comprehensive set of rules for various proxy tools and platforms
  • Regularly updated with new rules and optimizations
  • Offers detailed documentation and usage instructions

Cons of SS-Rule-Snippet

  • Requires manual configuration and integration with proxy tools
  • May have a steeper learning curve for beginners
  • Limited customization options without modifying the rule files directly

Code Comparison

SS-Rule-Snippet (Surge configuration example):

[Rule]
DOMAIN-SUFFIX,googleapis.com,Proxy
DOMAIN-SUFFIX,instagram.com,Proxy
DOMAIN-SUFFIX,cdninstagram.com,Proxy
DOMAIN-SUFFIX,fbcdn.net,Proxy
DOMAIN-SUFFIX,facebook.com,Proxy

sub-web (Vue.js component example):

<template>
  <div class="subscription-card">
    <el-card>
      <div slot="header" class="clearfix">
        <span>{{ name }}</span>
      </div>
      <div class="text item">
        {{ url }}
      </div>
    </el-card>
  </div>
</template>

While SS-Rule-Snippet focuses on providing pre-configured rule sets, sub-web offers a web-based interface for managing and converting proxy subscriptions. SS-Rule-Snippet is more suitable for users who prefer direct rule management, while sub-web caters to those who want a user-friendly GUI for subscription handling.

🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。

Pros of clash-rules

  • Focuses specifically on providing rule sets for Clash, making it more specialized
  • Regularly updated with the latest domain lists and IP ranges
  • Offers a variety of rule sets for different purposes (e.g., ads, streaming, gaming)

Cons of clash-rules

  • Limited to rule sets only, doesn't provide a user interface or subscription conversion
  • Requires more technical knowledge to implement and use effectively
  • May need additional tools or scripts to integrate with Clash clients

Code comparison

sub-web:

export function getClashType() {
  return localStorage.getItem('clash_type') || 'clash';
}

clash-rules:

payload:
  - DOMAIN-SUFFIX,googleapis.cn
  - DOMAIN-SUFFIX,googleapis.com
  - DOMAIN-SUFFIX,google.cn

Summary

sub-web is a web-based tool for converting and managing proxy subscriptions, offering a user-friendly interface. clash-rules, on the other hand, focuses solely on providing up-to-date rule sets for Clash. While sub-web offers more versatility in subscription management, clash-rules excels in maintaining specific, curated rule sets for various purposes. The choice between the two depends on whether you need a comprehensive subscription management tool or specialized rule sets for Clash.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

sub-web

Vue Node License Docker

基于 Vue.js 2.6 与 tindy2013/subconverter 后端实现的订阅配置自动生成 Web 界面。提供了简洁美观的前端界面,支持多种代理客户端配置生成。

✨ 特性

  • 🎨 基于 Vue 2.6 + Element UI 的现代化界面
  • 📦 模块化架构,易于维护和扩展
  • 🐳 Docker 一键部署
  • 🚀 高性能构建,支持 Gzip 压缩
  • 📱 响应式设计,支持移动端
  • ⚡ 支持自定义转换参数
  • 🔄 实时配置预览和生成

🚀 快速开始

使用 Docker(推荐)

一键部署,无需配置:

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 dev

访问 http://localhost:5173/ 查看应用。

📦 环境要求

  • Node.js: 22.x
  • Yarn: 1.22+
  • Docker: 20.10+ (可选,用于容器化部署)

验证安装

# 检查 Node.js 版本
node -v
# 应输出: v22.x.x

# 检查 Yarn 版本
yarn -v
# 应输出: 1.22.x

🛠️ 安装

使用 Yarn(推荐)

# 克隆项目
git clone https://github.com/CareyWang/sub-web.git
cd sub-web

# 安装依赖
yarn install

环境配置

创建 .env 文件配置后端服务(可选,如需自定义后端地址):

# Subconverter 后端地址
VITE_SUBCONVERTER_DEFAULT_BACKEND=https://api.wcc.best

# 项目与社区链接
VITE_PROJECT=https://github.com/CareyWang/sub-web
VITE_BOT_LINK=https://t.me/subconverter_discuss

# 可选:远程配置与说明文档
VITE_SUBCONVERTER_REMOTE_CONFIG=
VITE_SUBCONVERTER_DOC_ADVANCED=

# 可选:后端版本标识
VITE_BACKEND_RELEASE=

# 可选:短链接与配置上传服务
VITE_MYURLS_API=
VITE_CONFIG_UPLOAD_API=

# 可选:开启本地存储与缓存 TTL(秒)
VITE_USE_STORAGE=true
VITE_CACHE_TTL=86400

如果部署在子路径(如 /sub-web/),通过 BASE_URL 指定路由基础路径。

🚀 使用

开发环境

# 启动开发服务器
yarn dev

访问 http://localhost:5173/ 查看应用。

生产构建

# 构建生产版本
yarn build

构建完成后,dist 目录包含所有生产文件。

🐳 Docker 部署

本地构建

如需修改代码并自定义构建:

# 构建镜像
docker build -t subweb-local:latest .

# 运行容器
docker run -d \
  -p 58080:80 \
  --restart always \
  --name subweb \
  subweb-local:latest

Docker Compose 部署

使用 Docker Compose 一键部署完整服务栈(包含 MyUrls 短链接服务):

# 进入 services 目录
cd services

# 编辑 .env 文件,修改端口和域名配置
# 默认配置:SUBWEB_PORT=58080, MYURLS_PORT=8002
vim .env

# 启动所有服务
docker-compose up -d

🌐 部署

Nginx 配置示例

配置 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;
    }
}

🔗 相关项目

🤝 贡献指南

我们欢迎所有形式的贡献!

贡献方式

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 创建 Pull Request

开发指南

  • 遵循 ESLint 代码规范
  • 更新相关文档
  • 确保所有 CI 检查通过

问题反馈

如果您遇到任何问题或有改进建议,请:

  1. 查看 Issues 是否已有类似问题
  2. 创建新的 Issue 并提供详细信息
  3. 使用合适的标签标记问题类型

📄 许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

Copyright © 2020-2025 CareyWong

🙏 致谢

感谢所有为这个项目做出贡献的开发者和用户!

特别感谢:

  • tindy2013/subconverter - 提供强大的转换后端
  • Vue.js 和 Element UI 团队 - 优秀的前端框架和组件库

📈 项目统计

Star History Chart