Skip to content

clashhub-net/clash-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Clash 配置脚本集合

stars forks last commit license

⚙️ Clash 自动化配置脚本集合 - 一键配置、自动更新、订阅转换


✨ 功能特点

功能 说明
🔄 自动更新 自动检测并更新订阅
🎯 一键配置 快速配置 Clash 客户端
🔁 订阅转换 格式转换兼容多客户端
⏰ 定时任务 自动定时更新规则
🛠️ 跨平台 支持 Windows / macOS / Linux

📦 脚本列表

脚本 功能 平台
update-sub.sh 订阅自动更新 Linux/macOS
convert.py 订阅格式转换 通用
�atch-update.sh 批量更新规则 Linux/macOS

🚀 快速开始

Linux / macOS

`�ash

克隆仓库

git clone https://github.com/clashhub-net/clash-scripts.git cd clash-scripts

添加执行权限

chmod +x *.sh

运行更新脚本

./update-sub.sh `

Windows

`powershell

使用 PowerShell 运行

.\update-sub.ps1 `


📖 使用说明

订阅更新

`�ash

更新订阅

./update-sub.sh -u "你的订阅URL" -o "输出文件.yaml" `

订阅转换

`�ash

转换为 Clash 格式

python convert.py -i input.yaml -o output.yaml

转换为 Surge 格式

python convert.py -i input.yaml -o surge.conf -t surge `


📋 配置示例

Crontab 定时更新 (Linux/macOS)

`�ash

每天凌晨 3 点自动更新

0 3 * * * /path/to/clash-scripts/update-sub.sh -u "你的订阅URL" -o "~/.config/clash/config.yaml" >> /var/log/clash-update.log 2>&1 `

Windows 计划任务

  1. 打开「任务计划程序」
  2. 创建基本任务
  3. 设置触发器和操作
  4. 指向脚本路径

🔧 环境要求

依赖 说明
curl 用于下载订阅
git 用于克隆仓库
python3 用于转换脚本 (可选)

📚 相关资源

资源 链接
ClashHub 论坛 bbs.clashhub.net
ClashVIP 导航 nav.clashvip.net
Clash 下载 clash-for-windows.net
ClashHub 主站 clashhub.net

🤝 贡献

欢迎提交 Issue 和 Pull Request!


📄 License

MIT License


Made with ❤️ by ClashHub

About

Clash 配置脚本集合 - 一键配置、自动更新、订阅转换

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors