Git Product home page Git Product logo

sub2clash's Introduction

sub2clash

Sing-box 用户?看看另一个项目 sub2sing-box

将订阅链接转换为 Clash、Clash.Meta 配置
预览

特性

  • 开箱即用的规则、策略组配置
  • 自动根据节点名称按国家划分策略组
  • 多订阅合并
  • 自定义 Rule Provider、Rule
  • 支持多种协议
    • Shadowsocks
    • ShadowsocksR
    • Vmess
    • Vless (Clash.Meta)
    • Trojan
    • Hysteria (Clash.Meta)
    • Hysteria2 (Clash.Meta)

使用

部署

配置

可以通过编辑 .env 文件来修改默认配置,docker 直接添加环境变量

变量名 说明 默认值
PORT 端口 8011
META_TEMPLATE 默认 meta 模板文件名 template_meta.yaml
CLASH_TEMPLATE 默认 clash 模板文件名 template_clash.yaml
REQUEST_RETRY_TIMES Get 请求重试次数 3
REQUEST_MAX_FILE_SIZE Get 请求订阅文件最大大小(byte) 1048576
CACHE_EXPIRE 订阅缓存时间(秒) 300
LOG_LEVEL 日志等级,可选值 debug,info,warn,error info
SHORT_LINK_LENGTH 短链长度 6

API

API 文档

模板

可以通过变量自定义模板中的策略组代理节点
具体参考下方默认模板

  • <all> 为添加所有节点
  • <countries> 为添加所有国家策略组
  • <地区二位字母代码> 为添加指定地区所有节点,例如 <hk> 将添加所有香港节点

默认模板

sub2clash's People

Contributors

nitezs avatar qichaiqichai avatar gccxeon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.