refactor: rebuild project architecture and codebase

This commit is contained in:
wnlen
2026-04-08 15:53:52 +08:00
parent 69e4d8bc36
commit bc97b0a2cd
1684 changed files with 11768 additions and 427871 deletions
+25 -127
View File
@@ -1,132 +1,30 @@
# =========================
# Clash for Linux - Env Config
# =========================
# 说明:
# 1. 必填项:CLASH_URL(首次使用时填写)
# 2. 修改后执行:clashctl restart
# 3. CLASH_SECRET 留空时,脚本会自动生成
# =========================
# 安装内核 可选:mihomo、clash
export KERNEL_TYPE="mihomo"
# -------------------------
# 1) 订阅配置
# -------------------------
# 机场订阅
export CLASH_SUBSCRIPTION_URL="file:///tmp/subscription.yaml"
export CLASH_SUBSCRIPTION_FORMAT="clash"
export CLASH_SUBSCRIPTION_UA="clash-verge/v2.4.0"
# Clash 订阅地址(首次使用必填)
# 示例:
# export CLASH_URL='https://example.com/sub?token=xxxx'
export CLASH_URL=''
# 端口
export MIXED_PORT="7890"
export EXTERNAL_CONTROLLER="127.0.0.1:9090"
export CLASH_DNS_PORT="1053"
# 是否自动更新订阅并重新生成运行配置
# true = 启动 / 重启时自动拉取订阅并生成配置
# false = 不自动拉取,直接使用已有 runtime/config.yaml
export CLASH_AUTO_UPDATE='true'
# 编译 / 更新策略
export BUILD_MIN_SUCCESS_SOURCES="1"
export CLASH_AUTO_UPDATE_SUBSCRIPTIONS="true"
# 订阅请求头(可选)
# 某些订阅源需要自定义 User-Agent 或 Authorization
# 多个请求头可用 ; 分隔
# 示例:
# export CLASH_HEADERS='User-Agent: ClashforWindows/0.20.39;Authorization: Bearer xxxxxx'
export CLASH_HEADERS='User-Agent: ClashforWindows/0.20.39'
# 下载与公共入口
export CLASH_PUBLIC_UI_URL="http://board.zash.run.place"
export CLASH_GH_PROXY=""
export CLASH_GH_PROXY_POOL=$'gh-proxy|https://gh-proxy.org|full\nghfast|https://ghfast.top|hostpath\nghproxy-net|https://ghproxy.net|hostpath'
export CLASH_DOWNLOAD_CONNECT_TIMEOUT="8"
export CLASH_DOWNLOAD_PROBE_TIMEOUT="4"
export CLASH_DOWNLOAD_MAX_TIME="1200"
# 当前订阅名称(可选,供多订阅管理使用)
export CLASH_SUBSCRIPTION=''
# -------------------------
# 2) Mihomo 内核
# -------------------------
# 是否自动下载内核
# auto = 缺失时自动下载
# true = 强制按脚本逻辑下载/校验
# false = 不自动下载,需自行准备内核
export CLASH_AUTO_DOWNLOAD='auto'
# 固定内核版本(可按项目发布节奏调整)
export MIHOMO_VERSION='v1.19.21'
# 自定义下载模板(可选)
# {version} 和 {arch} 会被脚本替换
export CLASH_DOWNLOAD_URL_TEMPLATE='https://github.com/MetaCubeX/mihomo/releases/download/{version}/mihomo-{arch}-{version}.gz'
# -------------------------
# 3) 控制面板 / API 安全
# -------------------------
# 控制面板密钥
# 留空时自动生成
export CLASH_SECRET=''
# 是否启用 external-controller
export EXTERNAL_CONTROLLER_ENABLED='true'
# 默认仅监听本机,更适合作为公共项目默认值
# 如需局域网 / 公网访问,再手动改为 0.0.0.0:9090
export EXTERNAL_CONTROLLER='0.0.0.0:9090'
# Dashboard 公网地址(可选)
# 留空表示不额外显示公网地址
export CLASH_DASHBOARD_PUBLIC_URL=''
# 输出 Secret 的显示策略
export CLASH_SHOW_SECRET='false'
export CLASH_SHOW_SECRET_MASKED='true'
# TLS 校验
# 默认不要关闭;仅在特殊订阅源证书异常时临时开启 true
export ALLOW_INSECURE_TLS='false'
# -------------------------
# 4) 代理监听与端口
# -------------------------
# 端口可填具体值,也可填 auto(前提是你的脚本支持自动分配)
export CLASH_HTTP_PORT='7890'
export CLASH_SOCKS_PORT='7891'
export CLASH_REDIR_PORT='7892'
# 默认仅本机监听,更安全
# 如需给局域网设备使用,再改为 0.0.0.0
export CLASH_LISTEN_IP='0.0.0.0'
# 是否允许局域网访问
# 若 CLASH_LISTEN_IP=127.0.0.1,这里即使为 true 也没有实际意义
export CLASH_ALLOW_LAN='true'
# -------------------------
# 5) 运行校验
# -------------------------
# GeoIP / 配置测试相关
export CLASH_SKIP_GEOIP_TEST_FAILURE='true'
export CLASH_CONFIG_TEST_TIMEOUT='30'
# -------------------------
# 6) Mixin 配置(可选)
# -------------------------
# 指定 mixin 目录(默认可不填)
# export CLASH_MIXIN_DIR='config/mixin.d'
# 追加多个 mixin 文件(逗号分隔)
# export CLASH_MIXIN_PATHS='config/mixin.d/base.yaml,config/mixin.d/rules.yaml'
# -------------------------
# 7) Tun 模式(可选)
# -------------------------
# export CLASH_TUN_ENABLE='false'
# export CLASH_TUN_STACK='system'
# export CLASH_TUN_AUTO_ROUTE='true'
# export CLASH_TUN_AUTO_REDIRECT='false'
# export CLASH_TUN_STRICT_ROUTE='false'
# export CLASH_TUN_DEVICE=''
# export CLASH_TUN_MTU=''
# export CLASH_TUN_DNS_HIJACK='any:53'
# -------------------------
# 8) Subconverter(可选)
# -------------------------
# 若你的环境集成了 subconverter,可在此配置
export SUBCONVERTER_URL='http://127.0.0.1:25500'
export SUBCONVERTER_READY='false'
# 版本
export MIHOMO_VERSION="v1.19.21"
export CLASH_VERSION="v1.18.0"
export YQ_VERSION="v4.52.4"
export SUBCONVERTER_VERSION="v0.9.0"
+30
View File
@@ -0,0 +1,30 @@
# 安装内核 可选:mihomo、clash
export KERNEL_TYPE="mihomo"
# 机场订阅
export CLASH_SUBSCRIPTION_URL="https://msub.xn--m7r52rosihxm.com/api/v1/client/subscribe?token=1bc3d16cc3211a892b2e16bdb72115ec"
export CLASH_SUBSCRIPTION_FORMAT="clash"
export CLASH_SUBSCRIPTION_UA="clash-verge/v2.4.0"
# 端口
export MIXED_PORT="7890"
export EXTERNAL_CONTROLLER="127.0.0.1:9090"
export CLASH_DNS_PORT="1053"
# 编译 / 更新策略
export BUILD_MIN_SUCCESS_SOURCES="1"
export CLASH_AUTO_UPDATE_SUBSCRIPTIONS="true"
# 下载与公共入口
export CLASH_PUBLIC_UI_URL="http://board.zash.run.place"
export CLASH_GH_PROXY=""
export CLASH_GH_PROXY_POOL=$'gh-proxy|https://gh-proxy.org|full\nghfast|https://ghfast.top|hostpath\nghproxy-net|https://ghproxy.net|hostpath'
export CLASH_DOWNLOAD_CONNECT_TIMEOUT="8"
export CLASH_DOWNLOAD_PROBE_TIMEOUT="4"
export CLASH_DOWNLOAD_MAX_TIME="1200"
# 版本
export MIHOMO_VERSION="v1.19.21"
export CLASH_VERSION="v1.18.0"
export YQ_VERSION="v4.52.4"
export SUBCONVERTER_VERSION="v0.9.0"
+4
View File
@@ -0,0 +1,4 @@
*.sh text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.env text eol=lf
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1530
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
-9
View File
@@ -1,9 +0,0 @@
# Mixin 配置目录
将额外的 Clash YAML 配置放在此目录下,脚本会按文件名排序后依次拼接到生成的 `config.yaml` 末尾。
如需手动指定顺序或使用自定义路径,请在 `.env` 中设置:
```bash
export CLASH_MIXIN_PATHS='config/mixin.d/base.yaml,config/mixin.d/rules.yaml'
```
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+9
View File
@@ -0,0 +1,9 @@
mode: single
policy: strict
active: default
selected: []
sources:
default:
type: clash
url: https://msub.xn--m7r52rosihxm.com/api/v1/client/subscribe?token=1bc3d16cc3211a892b2e16bdb72115ec
enabled: true
+7 -30
View File
@@ -1,31 +1,8 @@
# HTTP 代理端口
port: CLASH_HTTP_PORT_PLACEHOLDER
# SOCKS5 代理端口
socks-port: CLASH_SOCKS_PORT_PLACEHOLDER
# Linux 和 macOS 的 redir 代理端口
redir-port: CLASH_REDIR_PORT_PLACEHOLDER
# 监听IP地址
bind-address: CLASH_LISTEN_IP_PLACEHOLDER
# 允许局域网的连接
allow-lan: CLASH_ALLOW_LAN_PLACEHOLDER
# 规则模式:Rule(规则) / Global(全局代理)/ Direct(全局直连)
mixed-port: 7890
allow-lan: true
mode: rule
# 设置日志输出级别 (默认级别:silent,即不输出任何内容,以避免因日志内容过大而导致程序内存溢出)。
# 5 个级别:silent / info / warning / error / debug。级别越高日志输出量越大,越倾向于调试,若需要请自行开启。
log-level: silent
# Clash 的 RESTful API
external-controller: 'EXTERNAL_CONTROLLER_PLACEHOLDER'
# RESTful API 的口令
secret: 'b&ZlKTte5OnEt2Sn'
# 您可以将静态网页资源(如 clash-dashboard)放置在一个目录中,clash 将会服务于 `RESTful API/ui`
# 参数应填写配置目录的相对路径或绝对路径。
# external-ui: /code/clash-dashboard
log-level: info
external-controller: 127.0.0.1:9090
proxies: []
proxy-groups: []
rules: []
-197
View File
@@ -1,197 +0,0 @@
## 📄 `docs/advanced.md`
```
# Advanced Usage
本页面包含 clash-for-linux 的 **高级用法与可选功能**。
如果你已经能够正常完成以下事情:
- 安装并启动 Clash 服务
- 通过 SSH 转发访问 Dashboard
- 使用 `proxy_on` / `proxy_off` 控制代理
那么本页面的内容 **不是必须的**。
只有当你希望 **更精细地控制配置、网络行为或运行方式** 时,再继续阅读。
---
## 1. Mixin Configuration
Mixin 用于在 **不直接修改主配置文件** 的情况下,
对 Clash 配置进行 **追加或覆盖**。
这是推荐的方式,用于长期维护和升级。
### Default Behavior
- 默认读取目录:`config/mixin.d/`
- 按文件名排序后依次合并
- 后加载的文件会覆盖前面的配置
### Example
```yaml
# config/mixin.d/10-rules.yaml
rules:
- DOMAIN-SUFFIX,example.com,DIRECT
```
修改完成后,重启服务即可生效:
```
clashctl restart
```
### When to Use Mixin
- 添加自定义规则
- 覆盖 DNS、rules、proxies 等配置
- 避免每次更新订阅后手动修改 config.yaml
------
## 2. Tun Mode (Optional)
Tun 模式用于实现 **系统级透明代理**,需要
**Clash Meta / Premium** 内核支持。
⚠️ 启用 Tun 模式会影响系统网络行为,
仅建议在你理解其作用与风险时使用。
### Enable Tun Mode
在 `.env` 中配置:
```
export CLASH_TUN_ENABLE=true
export CLASH_TUN_STACK=system
export CLASH_TUN_AUTO_ROUTE=true
export CLASH_TUN_AUTO_REDIRECT=false
export CLASH_TUN_STRICT_ROUTE=false
export CLASH_TUN_DNS_HIJACK='any:53'
```
配置完成后重启服务:
```
clashctl restart
```
------
## 3. systemd Behavior
Clash 默认以 **systemd 服务** 的方式运行。
### Service Characteristics
- 服务异常退出时会自动重启
- 配置文件错误会阻止服务进入运行态
- 服务以低权限用户运行(默认 `clash`)
### Check Service Status
```
systemctl status clash-for-linux.service
```
### View Logs
```
journalctl -u clash-for-linux.service -f
```
日志是排查问题时的 **第一入口**。
------
## 4. Multiple Subscriptions
`clashctl` 支持管理多个订阅地址,
并在不同订阅之间进行切换。
### Basic Usage
```
clashctl sub add work https://example.com/work
clashctl sub add personal https://example.com/personal
```
### Switch Subscription
```
clashctl sub use work
```
### Update Subscription
```
clashctl sub update
```
------
## 5. Custom Binary
在部分场景下,你可能希望使用:
- 自行编译的 Clash 内核
- 内网分发的二进制
- 特定版本的内核
你可以通过环境变量指定内核路径:
```
export CLASH_BIN=/path/to/clash
```
重启服务后生效。
------
## 6. Security Notes
clash-for-linux 以 **安全默认配置** 为原则:
- 管理接口默认仅监听 `127.0.0.1`
- 推荐使用 SSH 端口转发访问 Dashboard
- 不建议将 `external-controller` 暴露到公网
如果你确实需要对外访问,请确保:
- 已配置强随机 Secret
- 已正确设置防火墙规则
- 理解潜在的安全风险
------
## 7. Troubleshooting
### Service Keeps Restarting
- 检查 `runtime/config.yaml` 是否存在语法错误
- 查看 systemd 日志:
```
journalctl -u clash-for-linux.service -n 100
```
### Dashboard Not Accessible
- 确认 `external-controller` 仅绑定在本机
- 使用 SSH 端口转发方式访问
- 确认服务处于 running 状态
------
## Final Notes
本页面内容 **全部为可选功能**。
如果你不确定是否需要其中某一项,
**最安全的选择是保持默认配置**。
clash-for-linux 的设计目标是:
> 一次安装,长期稳定运行,而不是频繁折腾。
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

-255
View File
@@ -1,255 +0,0 @@
## 📄 `docs/install.md`
### 安装与可选参数
```
如果你只需要开箱即用的体验,直接运行:
```bash
sudo bash install.sh
```
即可完成安装。
本页面仅在你需要 **自定义安装行为**(安装路径、运行用户、内核来源等)时才需要阅读。
```
---
### 可选安装参数
所有参数均通过 **环境变量** 在执行 `install.sh` 前指定。
---
### `CLASH_INSTALL_DIR`
```bash
CLASH_INSTALL_DIR=/opt/clash-for-linux
```
- Clash 的安装目录
- 默认值:`/opt/clash-for-linux`
- 适用场景:
- 多实例部署
- 特殊磁盘 / 数据目录
- 需要与系统目录结构对齐的服务器
------
### `CLASH_SERVICE_USER`
```
CLASH_SERVICE_USER=clash
```
- 指定运行 Clash 服务的系统用户
- 默认值:`clash`(安装时自动创建)
- 说明:
- 使用低权限用户运行是安全最佳实践
- 不建议使用 `root`
------
### `CLASH_ENABLE_SERVICE`
```
CLASH_ENABLE_SERVICE=true
```
- 是否创建 systemd 服务
- 默认值:`true`
- 设置为 `false` 时:
- 仅安装文件
- 不注册 systemd unit
适用于:
- 容器环境
- 不使用 systemd 的系统
- 二次开发或调试
------
### `CLASH_START_SERVICE`
```
CLASH_START_SERVICE=true
```
- 安装完成后是否立即启动服务
- 默认值:`true`
- 设置为 `false` 时:
- 安装完成后不自动启动
- 需手动执行 `clashctl start`
------
### `CLASH_AUTO_DOWNLOAD`
```env
CLASH_AUTO_DOWNLOAD=auto
- 是否在本地未检测到可用内核时自动下载 Mihomo 内核
- 可选值:
- `auto`(默认):当未检测到可用内核时自动下载(已有内核则不覆盖)
- `false`:不进行任何自动下载,仅使用本地已有内核(找不到则报错)
- `true`:强制重新下载内核(即使本地已有也会覆盖)
适用于:
- 离线环境
- 使用自定义内核
- 内网服务器
------
### `CLASH_DOWNLOAD_URL_TEMPLATE`
```env
CLASH_DOWNLOAD_URL_TEMPLATE=https://your-mirror.example.com/{version}/mihomo-{arch}-{version}.gz
- Mihomo 内核下载地址模板(可选,高级配置)
- 仅在 CLASH_AUTO_DOWNLOAD=true 或 auto 且本地无内核时生效
- 默认情况下无需配置,脚本会自动使用官方 GitHub Release 地址
适用于:
- 使用私有镜像
- 国内镜像加速
- 自定义构建内核
------
### 使用示例
```
CLASH_INSTALL_DIR=/data/clash \
CLASH_START_SERVICE=false \
sudo bash install.sh
```
------
> ⚠️ 提示
> 如果你不清楚某个参数的含义,**不要设置它**。
> 默认值已覆盖绝大多数使用场景。
```
---
# 二、`advanced.md` 应该怎么写(这是“高手区”)
## advanced.md 的一句话定位
> **“当你已经能正常使用 Clash,但想用得更深、更稳、更可控时,再来看这里。”**
所以它是:
👉 *可选*
👉 *不影响主流程*
👉 *不追求完整,只追求“有入口”*
---
## 📄 `docs/advanced.md`(推荐骨架)
```md
# 高级配置与进阶用法
本页面包含 clash-for-linux 的高级用法与可选功能。
如果你只关心基本代理与 Dashboard,可以跳过本页。
```
------
## 1️⃣ Mixin 配置
```
## Mixin 配置
Mixin 用于在不修改主配置的情况下,追加或覆盖 Clash 配置项。
```
### 默认行为
- 默认读取目录:`config/mixin.d/`
- 按文件名排序后依次合并
### 示例
```
# config/mixin.d/rules.yaml
rules:
- DOMAIN-SUFFIX,example.com,DIRECT
```
修改完成后重启服务:
```
clashctl restart
```
------
## 2️⃣ Tun 模式(可选)
```
## Tun 模式
Tun 模式用于实现系统级透明代理。
该功能需要 Clash Meta / Premium 支持。
```
### 启用示例
```
export CLASH_TUN_ENABLE=true
export CLASH_TUN_STACK=system
export CLASH_TUN_AUTO_ROUTE=true
```
> ⚠️ Tun 模式会修改系统网络行为,仅建议在你理解其影响时启用。
------
## 3️⃣ systemd 行为说明
```
## systemd 行为说明
Clash 默认以 systemd 服务运行。
```
- 服务失败会自动重启
- 配置错误会阻止服务进入运行态
- 日志查看:
```
journalctl -u clash-for-linux.service -f
```
------
## 4️⃣ 多订阅管理(clashctl)
```
## 多订阅管理
clashctl 支持多个订阅并进行切换。
clashctl sub add work https://example.com/work
clashctl sub use work
clashctl sub update
```
------
## 5️⃣ 安全说明(可选)
```
## 安全说明
- 管理接口默认仅监听 127.0.0.1
- 推荐使用 SSH 端口转发访问 Dashboard
- 不建议将 external-controller 暴露至公网
```
+40 -427
View File
@@ -1,446 +1,59 @@
#!/usr/bin/env bash
set -euo pipefail
sed -i 's/\r$//' "$0" 2>/dev/null || true
Server_Dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/ui.sh
. "$Server_Dir/scripts/ui.sh"
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Install_Dir="${CLASH_INSTALL_DIR:-$Server_Dir}"
source "$PROJECT_DIR/scripts/core/common.sh"
source "$PROJECT_DIR/scripts/core/runtime.sh"
source "$PROJECT_DIR/scripts/core/config.sh"
source "$PROJECT_DIR/scripts/init/systemd.sh"
source "$PROJECT_DIR/scripts/init/systemd-user.sh"
source "$PROJECT_DIR/scripts/init/script.sh"
Service_Name="clash-for-linux"
Service_User="root"
Service_Group="root"
init_project_context "$PROJECT_DIR"
load_env_if_exists
detect_install_scope "${1:-auto}"
# =========================
# 基础校验
# =========================
ui_ok "[1/3] 准备环境..."
init_layout
ensure_required_commands
if [ "$(id -u)" -ne 0 ]; then
die "需要 root 权限"
fi
# ui_ok "已确认 root 权限"
ui_download "正在准备安装依赖"
resolve_runtime_kernel
resolve_yq
resolve_subconverter
if [ ! -f "${Server_Dir}/.env" ]; then
die_with_reason \
".env 文件不存在" \
"缺少文件: ${Server_Dir}/.env" \
"请确认项目目录完整"
fi
# ui_ok "已检测到 .env 配置文件"
mark_install_environment || true
mark_install_plan || true
mark_install_port_plan || true
# =========================
# 同步文件
# =========================
# ui_blank
# ui_info "[2/5] 初始化目录"
install_clashctl_entry
install_shell_alias_entry
install_runtime_entry
mkdir -p "$Install_Dir"
# ui_ok "安装目录已就绪: $Install_Dir"
ensure_subscription_bootstrap_for_install "default"
prompt_subscription_if_needed
chmod +x "$Install_Dir"/clashctl 2>/dev/null || true
chmod +x "$Install_Dir"/scripts/* 2>/dev/null || true
chmod +x "$Install_Dir"/bin/* 2>/dev/null || true
# =========================
# 目录初始化
# =========================
mkdir -p \
"$Install_Dir/runtime" \
"$Install_Dir/logs" \
"$Install_Dir/config/mixin.d"
# ui_ok "runtime 目录已创建"
# ui_ok "logs 目录已创建"
# ui_ok "mixin 目录已创建"
# =========================
# 加载 env
# =========================
# shellcheck disable=SC1090
# ui_blank
ui_ok "[2/3] 生成配置..."
source "$Install_Dir/.env"
# ui_ok ".env 配置已加载"
# shellcheck disable=SC1090
source "$Install_Dir/scripts/get_cpu_arch.sh"
# ui_ok "CPU 架构识别成功: ${CpuArch:-unknown}"
# shellcheck disable=SC1090
source "$Install_Dir/scripts/resolve_clash.sh"
# ui_blank
# ui_info "准备内核"
if ! bash "$Install_Dir/scripts/resolve_clash.sh"; then
ui_error "Clash 内核准备失败"
ui_fix_block \
"resolve_clash.sh 执行失败" \
"请检查下载地址或网络连接"
ui_debug_block \
"bash $Install_Dir/scripts/resolve_clash.sh"
exit 1
fi
write_env_value() {
local key="$1"
local value="$2"
local env_file="$Install_Dir/.env"
local escaped="${value//\\/\\\\}"
escaped="${escaped//&/\\&}"
escaped="${escaped//|/\\|}"
escaped="${escaped//\'/\'\\\'\'}"
if grep -qE "^[[:space:]]*(export[[:space:]]+)?${key}=" "$env_file"; then
sed -i -E "s|^[[:space:]]*(export[[:space:]]+)?${key}=.*$|export ${key}='${escaped}'|g" "$env_file"
if [ -n "$(subscription_url 2>/dev/null || true)" ]; then
if generate_config; then
post_install_verify
else
printf "export %s='%s'\n" "$key" "$value" >> "$env_file"
fi
}
write_runtime_value "INSTALL_VERIFY_CONFIG_READY" "false"
write_runtime_value "INSTALL_VERIFY_RUNTIME_READY" "false"
write_runtime_value "INSTALL_VERIFY_CONTROLLER_READY" "false"
if [ -z "${CLASH_SECRET:-}" ]; then
if command -v openssl >/dev/null 2>&1; then
CLASH_SECRET="$(openssl rand -base64 24 | tr -dc 'A-Za-z0-9' | head -c 16)"
else
CLASH_SECRET="$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 16)"
fi
write_env_value "CLASH_SECRET" "$CLASH_SECRET"
fi
read_env_value() {
local key="$1"
sed -nE "s/^[[:space:]]*(export[[:space:]]+)?${key}=['\"]?([^'\"]*)['\"]?$/\2/p" "$Install_Dir/.env" | head -n 1
}
mask_secret() {
local s="$1"
local len=${#s}
[ -z "$s" ] && return 0
if [ "$len" -le 8 ]; then
printf '%s\n' '********'
return 0
fi
printf '%s****%s\n' "${s:0:4}" "${s: -4}"
}
get_display_secret() {
local secret="$1"
case "${CLASH_SHOW_SECRET:-false}" in
true|TRUE|1|yes|YES)
printf '%s\n' "$secret"
return 0
;;
esac
case "${CLASH_SHOW_SECRET_MASKED:-true}" in
true|TRUE|1|yes|YES)
mask_secret "$secret"
return 0
;;
esac
printf '%s\n' ""
}
get_public_ip() {
curl -fsS --max-time 5 ifconfig.me 2>/dev/null \
|| curl -fsS --max-time 5 ip.sb 2>/dev/null \
|| curl -fsS --max-time 5 api.ipify.org 2>/dev/null \
|| true
}
get_lan_ip() {
hostname -I 2>/dev/null | awk '{print $1}' || true
}
show_install_usage() {
cat <<'EOF'
用法:
clashctl 命令 [选项]
指令:
on 开启代理
off 关闭代理
start 启动 Clash
stop 停止 Clash
restart 重启并自动应用当前配置
status 查看当前状态
update 更新到最新版本并自动应用配置
ui 输出 Dashboard 地址
secret 输出当前 secret
doctor 健康检查
logs [-f] [-n 100] 查看日志
sub show|update 查看订阅地址 / 输入或更新订阅并立即生效
tun status|on|off 查看/启用/关闭 Tun
mixin status|on|off 查看/启用/关闭 Mixin
选
-h, --help 显示帮助信息
EOF
}
show_dashboard_info() {
local secret="${1:-}"
local public_ip="${2:-}"
local controller_addr="${EXTERNAL_CONTROLLER:-127.0.0.1:9090}"
local host="${controller_addr%:*}"
local port="${controller_addr##*:}"
local lan_ip=""
lan_ip="$(get_lan_ip)"
local local_ui="http://127.0.0.1:${port}/ui"
local lan_ui=""
local public_ui=""
local custom_ui="${CLASH_DASHBOARD_PUBLIC_URL:-}"
[ -n "$lan_ip" ] && lan_ui="http://${lan_ip}:${port}/ui"
[ -n "$public_ip" ] && public_ui="http://${public_ip}:${port}/ui"
ui_blank
ui_summary_begin "😼 Clash Web 控制台"
ui_summary_row "🔓 注意放行端口" "$port"
[ -n "$lan_ui" ] && ui_summary_row "💻 内网" "$lan_ui"
[ -n "$custom_ui" ] && ui_summary_row "🌐 公共" "$custom_ui"
[ -n "$public_ui" ] && ui_summary_row "🌏 公网" "$public_ui"
[ -n "$secret" ] && ui_summary_row "🔑 密钥" "$secret"
ui_summary_end
}
wait_dashboard_ready() {
local host="$1"
local port="${2:-9090}"
local max_retry="${3:-20}"
local i
for ((i=1; i<=max_retry; i++)); do
if curl -fsS --max-time 2 "http://${host}:${port}/ui/" >/dev/null 2>&1; then
return 0
fi
sleep 1
done
return 1
}
prompt_and_apply_subscription() {
local sub_url=""
local secret=""
local public_ip=""
local retry_choice=""
while true; do
echo
read -r -p "👉 请输入要添加的订阅链接:" sub_url
if [ -z "${sub_url:-}" ]; then
ui_warn "已跳过订阅设置,可稍后使用 clashctl sub 进行配置"
return 0
echo "🔴 安装未完成:订阅编译失败"
if [ -n "$(read_build_value "BUILD_LAST_ERROR_SUMMARY" 2>/dev/null || true)" ]; then
echo "❌ 原因:$(read_build_value "BUILD_LAST_ERROR_SUMMARY" 2>/dev/null || true)"
fi
write_env_value "CLASH_URL" "$sub_url"
echo "⏳ 正在下载订阅..."
if ! "$Install_Dir/scripts/generate_config.sh" >/dev/null 2>&1; then
ui_error "订阅不可用或转换失败"
read -r -p "是否重新输入订阅链接?[Y/n]: " retry_choice
case "${retry_choice:-Y}" in
n|N)
ui_warn "已跳过订阅设置,可稍后使用 clashctl sub 进行配置"
return 0
;;
*)
continue
;;
esac
if [ -f "$RUNTIME_DIR/tmp/subscription-invalid-preview.txt" ]; then
echo "🧾 调试预览:$RUNTIME_DIR/tmp/subscription-invalid-preview.txt"
fi
if command -v systemctl >/dev/null 2>&1; then
systemctl restart "${Service_Name}.service"
else
"$Install_Dir/scripts/run_clash.sh" --daemon
fi
echo "🎉 订阅添加成功:$sub_url"
echo "🔥 订阅已生效"
# show_dashboard_info "$secret" "$public_ip"
return 0
done
}
# =========================
# 内核检查
# =========================
if ! resolve_clash_bin "$Install_Dir" "${CpuArch:-}" >/dev/null 2>&1; then
die_with_reason \
"Clash 内核未就绪" \
"二进制校验失败" \
"请检查下载结果或 CPU 架构是否匹配"
fi
# ui_ok "Clash 内核校验通过"
# =========================
# 安装 clashctl
# =========================
# ===== 安装 / 覆盖 clashctl 命令 =====
OLD_CLASHCTL_PATH="$(command -v clashctl 2>/dev/null || true)"
OLD_CLASHCTL_REAL=""
if [ -n "$OLD_CLASHCTL_PATH" ]; then
OLD_CLASHCTL_REAL="$(readlink -f "$OLD_CLASHCTL_PATH" 2>/dev/null || true)"
fi
# 如果存在旧版本,打印提示
if [ -n "$OLD_CLASHCTL_REAL" ] && [ "$OLD_CLASHCTL_REAL" != "$(readlink -f "$Install_Dir/clashctl")" ]; then
ui_warn "检测到旧版本 clashctl: $OLD_CLASHCTL_REAL"
ui_info "将覆盖为当前版本: $Install_Dir/clashctl"
fi
# 强制清理旧入口
cleanup_legacy_clashctl() {
rm -f /usr/local/bin/clashctl 2>/dev/null || true
rm -f /usr/bin/clashctl 2>/dev/null || true
[ -f /root/clashctl ] && rm -f /root/clashctl 2>/dev/null || true
[ -f "$HOME/clashctl" ] && rm -f "$HOME/clashctl" 2>/dev/null || true
[ -d /root/clashctl ] && rm -rf /root/clashctl 2>/dev/null || true
[ -d "$HOME/clashctl" ] && rm -rf "$HOME/clashctl" 2>/dev/null || true
}
# ===== 安装/覆盖 clashctl 命令 =====
cleanup_legacy_clashctl
chmod +x "$Install_Dir/clashctl"
ln -s "$Install_Dir/clashctl" /usr/local/bin/clashctl
# 清理当前 shell 污染(关键)
unset -f clashctl clashhelp clashlog clashmixin clashoff clashon clashproxy clashrestart clashsecret clashstatus clashsub clashtun clashui clashupgrade 2>/dev/null || true
unalias clashctl 2>/dev/null || true
hash -r
# 校验
NEW_REAL="$(readlink -f /usr/local/bin/clashctl 2>/dev/null || true)"
EXPECT_REAL="$(readlink -f "$Install_Dir/clashctl" 2>/dev/null || true)"
if [ "$NEW_REAL" != "$EXPECT_REAL" ]; then
ui_error "clashctl 安装失败" >&2
exit 1
fi
# 清理 shell 缓存(非常关键)
hash -r
# 强校验(防止假覆盖)
NEW_CLASHCTL_REAL="$(readlink -f /usr/local/bin/clashctl 2>/dev/null || true)"
EXPECTED_CLASHCTL_REAL="$(readlink -f "$Install_Dir/clashctl" 2>/dev/null || true)"
if [ "$NEW_CLASHCTL_REAL" != "$EXPECTED_CLASHCTL_REAL" ]; then
ui_error "clashctl 安装失败:系统命令未指向当前安装目录" >&2
exit 1
fi
# ui_ok "clashctl 已更新: /usr/local/bin/clashctl → $EXPECTED_CLASHCTL_REAL"
# ui_ok "clashctl: /usr/local/bin/clashctl"
# =========================
# 安装 proxy helper
# =========================
rm -f /etc/profile.d/clash-for-linux.sh >/dev/null 2>&1 || true
rm -f /etc/profile.d/clash.sh >/dev/null 2>&1 || true
rm -f /etc/profile.d/clashctl.sh >/dev/null 2>&1 || true
# 写入 profile 文件(新终端自动清理污染)
cat >/etc/profile.d/clash-for-linux.sh <<EOF
# clash-for-linux 代理工具
CLASH_INSTALL_DIR="${Install_Dir}"
ENV_FILE="\${CLASH_INSTALL_DIR}/.env"
if [ -f "\$ENV_FILE" ]; then
set +u
. "\$ENV_FILE" >/dev/null 2>&1 || true
set -u
fi
CLASH_LISTEN_IP="\${CLASH_LISTEN_IP:-127.0.0.1}"
CLASH_HTTP_PORT="\${CLASH_HTTP_PORT:-7890}"
CLASH_SOCKS_PORT="\${CLASH_SOCKS_PORT:-7891}"
proxy_on() {
export http_proxy="http://\${CLASH_LISTEN_IP}:\${CLASH_HTTP_PORT}"
export https_proxy="http://\${CLASH_LISTEN_IP}:\${CLASH_HTTP_PORT}"
export HTTP_PROXY="http://\${CLASH_LISTEN_IP}:\${CLASH_HTTP_PORT}"
export HTTPS_PROXY="http://\${CLASH_LISTEN_IP}:\${CLASH_HTTP_PORT}"
export all_proxy="socks5://\${CLASH_LISTEN_IP}:\${CLASH_SOCKS_PORT}"
export ALL_PROXY="socks5://\${CLASH_LISTEN_IP}:\${CLASH_SOCKS_PORT}"
export no_proxy="127.0.0.1,localhost,::1"
export NO_PROXY="127.0.0.1,localhost,::1"
echo "[OK] Proxy enabled: http://\${CLASH_LISTEN_IP}:\${CLASH_HTTP_PORT}"
}
proxy_off() {
unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
unset all_proxy ALL_PROXY no_proxy NO_PROXY
echo "[OK] Proxy disabled"
}
proxy_status() {
echo "http_proxy=\${http_proxy:-<empty>}"
echo "https_proxy=\${https_proxy:-<empty>}"
echo "all_proxy=\${all_proxy:-<empty>}"
echo "CLASH_LISTEN_IP=\${CLASH_LISTEN_IP}"
echo "CLASH_HTTP_PORT=\${CLASH_HTTP_PORT}"
echo "CLASH_SOCKS_PORT=\${CLASH_SOCKS_PORT}"
}
EOF
chmod 644 /etc/profile.d/clash-for-linux.sh
# =========================
# 安装 systemd
# =========================
if command -v systemctl >/dev/null 2>&1; then
CLASH_SERVICE_USER="$Service_User" CLASH_SERVICE_GROUP="$Service_Group" \
"$Install_Dir/scripts/install_systemd.sh" "$Install_Dir"
if [ "${CLASH_ENABLE_SERVICE:-true}" = "true" ]; then
systemctl enable "${Service_Name}.service" || true
echo "👉 下一步:clashctl doctor"
echo
exit 1
fi
else
ui_warn "未找到 systemd,回退到脚本模式"
fi
ui_ok "[3/3] 启动服务..."
# =========================
# 输出 + 订阅录入
# =========================
secret="$(read_env_value "CLASH_SECRET")"
public_ip="$(get_public_ip)"
echo
show_dashboard_info "$secret" "$public_ip"
show_install_usage
prompt_and_apply_subscription
print_install_summary
View File
Binary file not shown.
View File
-16
View File
@@ -1,16 +0,0 @@
mixed-port: 7890
allow-lan: false
bind-address: '*'
mode: rule
log-level: info
ipv6: true
udp: true
external-controller: 127.0.0.1:9090
external-ui: /opt/clash-for-linux/.config/mihomo/ui
proxies: []
proxy-groups: []
rules:
- MATCH,DIRECT
-6
View File
@@ -1,6 +0,0 @@
LAST_GENERATE_STATUS=
LAST_GENERATE_AT=
LAST_RUN_STATUS=
LAST_RUN_MODE=
LAST_RUN_AT=
LAST_RUN_PID=
-48
View File
@@ -1,48 +0,0 @@
# Clash shell helpers
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
CLASH_INSTALL_DIR="${CLASH_INSTALL_DIR:-/root/clash-for-linux}"
ENV_FILE="${CLASH_INSTALL_DIR}/.env"
if [ -f "$ENV_FILE" ]; then
set +u
. "$ENV_FILE" >/dev/null 2>&1 || true
set -u
fi
CLASH_LISTEN_IP="${CLASH_LISTEN_IP:-127.0.0.1}"
CLASH_HTTP_PORT="${CLASH_HTTP_PORT:-7890}"
CLASH_SOCKS_PORT="${CLASH_SOCKS_PORT:-7891}"
proxy_on() {
export http_proxy="http://${CLASH_LISTEN_IP}:${CLASH_HTTP_PORT}"
export https_proxy="http://${CLASH_LISTEN_IP}:${CLASH_HTTP_PORT}"
export HTTP_PROXY="http://${CLASH_LISTEN_IP}:${CLASH_HTTP_PORT}"
export HTTPS_PROXY="http://${CLASH_LISTEN_IP}:${CLASH_HTTP_PORT}"
export all_proxy="socks5://${CLASH_LISTEN_IP}:${CLASH_SOCKS_PORT}"
export ALL_PROXY="socks5://${CLASH_LISTEN_IP}:${CLASH_SOCKS_PORT}"
export no_proxy="127.0.0.1,localhost,::1"
export NO_PROXY="127.0.0.1,localhost,::1"
ui_ok "Proxy enabled: http://${CLASH_LISTEN_IP}:${CLASH_HTTP_PORT}"
}
proxy_off() {
unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
unset all_proxy ALL_PROXY no_proxy NO_PROXY
ui_ok "Proxy disabled"
}
proxy_status() {
echo "http_proxy=${http_proxy:-<empty>}"
echo "https_proxy=${https_proxy:-<empty>}"
echo "all_proxy=${all_proxy:-<empty>}"
echo "CLASH_LISTEN_IP=${CLASH_LISTEN_IP}"
echo "CLASH_HTTP_PORT=${CLASH_HTTP_PORT}"
echo "CLASH_SOCKS_PORT=${CLASH_SOCKS_PORT}"
}
-85
View File
@@ -1,85 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
# 作用:
# - 将订阅内容转换为 Clash Meta / Mihomo 可用的完整 YAML 配置
# - 默认使用 subconverter HTTP /sub 接口(最稳:使用 -G + --data-urlencode)
# - 转换失败则跳过,不影响主流程
#
# 输入 / 输出约定:
# - IN_FILE:原始订阅(默认 temp/clash.yaml)
# - OUT_FILE:转换后的配置(默认 temp/clash_config.yaml)
#
# 设计原则:
# - 绝不 exit 1(失败只输出 warn 并 exit 0)
# - 如果本身已是完整 Clash 配置,则直接复制
# - 如果没有 CLASH_URL(原始订阅 URL),则不执行转换(subconverter 最稳妥的方式是 url=...)
Server_Dir="${Server_Dir:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
Temp_Dir="${Temp_Dir:-$Server_Dir/temp}"
mkdir -p "$Temp_Dir"
IN_FILE="${IN_FILE:-$Temp_Dir/clash.yaml}"
OUT_FILE="${OUT_FILE:-$Temp_Dir/clash_config.yaml}"
# 更推荐的默认目标:Clash Meta / Mihomo
SUB_TARGET="${SUB_TARGET:-clashmeta}" # 推荐 clashmeta(兼容性最好)
SUB_URL="${CLASH_URL:-}" # 原始订阅 URL(.env 中 export CLASH_URL=...)
# 0) 输入文件不存在则跳过
if [ ! -s "$IN_FILE" ]; then
ui_warn "未找到输入文件: $IN_FILE"
exit 0
fi
# 1) 如果看起来已经是完整 Clash 配置,则直接使用,不再转换
# (包含 proxies / proxy-providers / rules / port 等任一关键字即可视为完整配置)
if grep -qE '^(proxies:|proxy-providers:|mixed-port:|port:|rules:|dns:)' "$IN_FILE"; then
cp -f "$IN_FILE" "$OUT_FILE"
ui_ok "输入内容已是 Clash 配置,直接使用 -> $OUT_FILE"
exit 0
fi
# 2) subconverter 不可用则跳过
if [ "${SUBCONVERTER_READY:-false}" != "true" ] || [ -z "${SUBCONVERTER_URL:-}" ]; then
ui_warn "subconverter 未就绪,跳过转换"
exit 0
fi
# 3) 没有原始 URL 则不转换(subconverter 最稳妥的方式是 url=... 拉取)
if [ -z "${SUB_URL:-}" ]; then
ui_warn "CLASH_URL 为空,无法通过 /sub 转换,已跳过"
exit 0
fi
# 4) 调用 subconverter:使用 -G + --data-urlencode,避免 url 参数中包含 ? 和 & 导致 400
# 注意:SUB_URL 必须为原始订阅 URL(例如 https://.../subscribe?token=xxx)
TMP_OUT="${OUT_FILE}.tmp"
rm -f "$TMP_OUT" 2>/dev/null || true
set +e
curl -fsSLG "${SUBCONVERTER_URL}/sub" \
--data-urlencode "target=${SUB_TARGET}" \
--data-urlencode "url=${SUB_URL}" \
-o "${TMP_OUT}"
rc=$?
set -e
if [ "$rc" -ne 0 ] || [ ! -s "$TMP_OUT" ]; then
ui_warn "转换失败(rc=${rc}),已跳过"
rm -f "$TMP_OUT" 2>/dev/null || true
exit 0
fi
mv -f "$TMP_OUT" "$OUT_FILE"
ui_ok "已通过 subconverter 完成转换 -> ${OUT_FILE} (target=${SUB_TARGET})"
true
-139
View File
@@ -1,139 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
trim_value() {
local value="$1"
echo "$value" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
}
# =========================
# 安全写入:避免重复块
# =========================
remove_block_if_exists() {
local file="$1"
local marker="$2"
[ -f "$file" ] || return 0
# 删除已有 block(从 marker 到文件结束)
if grep -q "$marker" "$file"; then
sed -i "/$marker/,\$d" "$file"
fi
}
# =========================
# TUN 配置
# =========================
apply_tun_config() {
local config_path="$1"
local enable="${CLASH_TUN_ENABLE:-false}"
[ "$enable" = "true" ] || return 0
remove_block_if_exists "$config_path" "# ==== TUN CONFIG START ===="
local stack="${CLASH_TUN_STACK:-system}"
local auto_route="${CLASH_TUN_AUTO_ROUTE:-true}"
local auto_redirect="${CLASH_TUN_AUTO_REDIRECT:-false}"
local strict_route="${CLASH_TUN_STRICT_ROUTE:-false}"
local device="${CLASH_TUN_DEVICE:-}"
local mtu="${CLASH_TUN_MTU:-}"
local dns_hijack="${CLASH_TUN_DNS_HIJACK:-}"
{
echo ""
echo "# ==== TUN CONFIG START ===="
echo "tun:"
echo " enable: true"
echo " stack: ${stack}"
echo " auto-route: ${auto_route}"
echo " auto-redirect: ${auto_redirect}"
echo " strict-route: ${strict_route}"
[ -n "$device" ] && echo " device: ${device}"
[ -n "$mtu" ] && echo " mtu: ${mtu}"
if [ -n "$dns_hijack" ]; then
echo " dns-hijack:"
IFS=',' read -r -a hijacks <<< "$dns_hijack"
for item in "${hijacks[@]}"; do
item="$(trim_value "$item")"
[ -n "$item" ] && echo " - ${item}"
done
fi
echo "# ==== TUN CONFIG END ===="
} >> "$config_path"
}
# =========================
# MIXIN 配置
# =========================
apply_mixin_config() {
local config_path="$1"
local base_dir="$2"
local mixin_dir="${CLASH_MIXIN_DIR:-$base_dir/config/mixin.d}"
local mixin_paths=()
remove_block_if_exists "$config_path" "# ==== MIXIN CONFIG START ===="
# 用户手动指定优先
if [ -n "${CLASH_MIXIN_PATHS:-}" ]; then
IFS=',' read -r -a mixin_paths <<< "$CLASH_MIXIN_PATHS"
fi
# 自动扫描目录(补充)
if [ -d "$mixin_dir" ]; then
while IFS= read -r -d '' file; do
mixin_paths+=("$file")
done < <(
find "$mixin_dir" -maxdepth 1 -type f \( -name '*.yml' -o -name '*.yaml' \) \
-print0 | sort -z
)
fi
# 去重
local uniq_paths=()
local seen=""
for path in "${mixin_paths[@]}"; do
path="$(trim_value "$path")"
[ -z "$path" ] && continue
# 相对路径转绝对
if [ "${path:0:1}" != "/" ]; then
path="$base_dir/$path"
fi
if [[ "$seen" != *"|$path|"* ]]; then
uniq_paths+=("$path")
seen="${seen}|$path|"
fi
done
# 写入
{
echo ""
echo "# ==== MIXIN CONFIG START ===="
for path in "${uniq_paths[@]}"; do
if [ -f "$path" ]; then
echo ""
echo "# ---- mixin: ${path} ----"
cat "$path"
else
ui_warn "Mixin not found: $path" >&2
fi
done
echo "# ==== MIXIN CONFIG END ===="
} >> "$config_path"
}
+198
View File
@@ -0,0 +1,198 @@
#!/usr/bin/env bash
_clashctl_real() {
if command -v clashctl-bin >/dev/null 2>&1; then
clashctl-bin "$@"
return $?
fi
command clashctl "$@"
}
_clash_alias_print_sep() {
echo
}
_clash_alias_proxy_on() {
eval "$(_clashctl_real proxy on)" || return $?
}
_clash_alias_proxy_off() {
eval "$(_clashctl_real proxy off)" || true
}
_clash_alias_proxy_show() {
_clashctl_real proxy show 2>/dev/null || true
}
_clash_alias_status_next() {
_clashctl_real status-next 2>/dev/null || echo "clashctl status"
}
_clash_alias_prepare_on() {
# 这里不直接自己做 regenerate / restart / fallback,
# 而是统一交给 clashctl on 主链处理,避免双执行链。
# shell 层只负责“闭环体验”,不抢 runtime / build 的职责。
return 0
}
_clash_alias_after_on() {
_clash_alias_proxy_on || return $?
_clash_alias_print_sep
_clash_alias_proxy_show
echo "👉 下一步:$(_clash_alias_status_next)"
}
_clash_alias_after_off() {
_clash_alias_print_sep
echo "🔴 已关闭代理环境"
echo "🧹 当前 Shell 代理变量已清理"
echo "👉 下一步:clashctl status"
}
_clash_alias_run_on() {
_clash_alias_prepare_on || return $?
_clashctl_real on "$@" || return $?
_clash_alias_after_on || return $?
}
_clash_alias_run_off() {
_clash_alias_proxy_off
_clashctl_real off "$@" || return $?
}
clashctl() {
case "${1:-}" in
on)
shift || true
_clash_alias_run_on "$@"
;;
off)
shift || true
_clash_alias_run_off "$@"
;;
proxy)
case "${2:-}" in
on)
_clash_alias_proxy_on || return $?
_clash_alias_print_sep
_clash_alias_proxy_show
;;
off)
_clash_alias_proxy_off
_clash_alias_print_sep
echo "🧹 当前 Shell 代理变量已清理"
;;
*)
_clashctl_real "$@"
;;
esac
;;
ui)
shift || true
# ui 前如果 runtime 已运行但当前 shell 没代理,不强制注入;
# 保持 UI 行为纯粹,只走原命令。
_clashctl_real ui "$@"
;;
status)
shift || true
_clashctl_real status "$@"
;;
*)
_clashctl_real "$@"
;;
esac
}
# 快捷入口全部收敛到 clashctl 函数
clashon() {
clashctl on "$@" || return $?
}
clashoff() {
clashctl off "$@" || return $?
}
clashproxy() {
case "${1:-show}" in
on)
clashctl proxy on
;;
off)
clashctl proxy off
;;
show|status)
clashctl proxy show
;;
groups)
clashctl proxy groups
;;
current)
shift || true
clashctl proxy current "$@"
;;
nodes)
shift || true
clashctl proxy nodes "$@"
;;
select)
shift || true
clashctl proxy select "$@"
;;
*)
echo "🧭 用法:clashproxy [show|on|off|groups|current|nodes|select]"
echo "💡 主路径切节点请使用:clashselect 或 clashctl select"
return 2
;;
esac
}
clashls() {
clashctl ls "$@"
}
clashselect() {
clashctl select "$@"
}
clashui() {
clashctl ui "$@"
}
clashsecret() {
clashctl secret "$@"
}
clashtun() {
clashctl tun "$@"
}
clashupgrade() {
clashctl upgrade "$@"
}
clashmixin() {
case "${1:-}" in
-e|--edit)
clashctl mixin edit
;;
-c|--raw)
clashctl mixin raw
;;
-r|--runtime)
clashctl mixin runtime
;;
"")
clashctl mixin
;;
*)
clashctl mixin "$@"
;;
esac
}
# shell 被 source 时不自动执行任何代理动作
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+273
View File
@@ -0,0 +1,273 @@
#!/usr/bin/env bash
# shellcheck source=scripts/core/common.sh
source "${PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}/scripts/core/common.sh"
proxy_host() {
echo "${CLASH_PROXY_HOST:-127.0.0.1}"
}
proxy_port() {
local config_file="${1:-$RUNTIME_DIR/config.yaml}"
local port
[ -s "$config_file" ] || die "配置文件不存在:$config_file"
port="$("$(yq_bin)" eval '.["mixed-port"] // .port // ""' "$config_file" 2>/dev/null | head -n 1)"
[ -n "${port:-}" ] && [ "$port" != "null" ] || die "未在配置文件中找到代理端口"
echo "$port"
}
proxy_http_url() {
echo "http://$(proxy_host):$(proxy_port)"
}
proxy_socks_url() {
echo "socks5://$(proxy_host):$(proxy_port)"
}
proxy_no_proxy_value() {
echo "${NO_PROXY_DEFAULT:-127.0.0.1,localhost,::1}"
}
print_proxy_show() {
echo
echo "😼 当前代理环境"
echo
echo "🌐 HTTP:$(proxy_http_url)"
echo "🧦 SOCKS5:$(proxy_socks_url)"
echo "🚫 NO_PROXY:$(proxy_no_proxy_value)"
echo
}
print_proxy_on_script() {
local http_url socks_url no_proxy
http_url="$(proxy_http_url)"
socks_url="$(proxy_socks_url)"
no_proxy="$(proxy_no_proxy_value)"
cat <<EOF
export http_proxy="$http_url"
export https_proxy="$http_url"
export HTTP_PROXY="$http_url"
export HTTPS_PROXY="$http_url"
export all_proxy="$socks_url"
export ALL_PROXY="$socks_url"
export no_proxy="$no_proxy"
export NO_PROXY="$no_proxy"
EOF
}
print_proxy_off_script() {
cat <<'EOF'
unset http_proxy
unset https_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset all_proxy
unset ALL_PROXY
unset no_proxy
unset NO_PROXY
EOF
}
controller_addr() {
local config_file="${1:-$RUNTIME_DIR/config.yaml}"
[ -s "$config_file" ] || die "配置文件不存在:$config_file"
"$(yq_bin)" eval '.["external-controller"] // ""' "$config_file" 2>/dev/null | head -n 1
}
controller_secret() {
local config_file="${1:-$RUNTIME_DIR/config.yaml}"
[ -s "$config_file" ] || die "配置文件不存在:$config_file"
"$(yq_bin)" eval '.secret // ""' "$config_file" 2>/dev/null | head -n 1
}
controller_api_base() {
local addr
addr="$(controller_addr)"
[ -n "${addr:-}" ] || die "未找到 external-controller"
[ "$addr" != "null" ] || die "未找到 external-controller"
echo "http://$addr"
}
controller_curl() {
local method="$1"
local path="$2"
local data="${3:-}"
local base secret
base="$(controller_api_base)"
secret="$(controller_secret)"
if [ -n "${data:-}" ]; then
curl -fsSL -X "$method" \
-H "Content-Type: application/json" \
${secret:+-H "Authorization: Bearer $secret"} \
--data "$data" \
"$base$path"
else
curl -fsSL -X "$method" \
${secret:+-H "Authorization: Bearer $secret"} \
"$base$path"
fi
}
proxy_controller_reachable() {
controller_curl GET "/version" >/dev/null 2>&1
}
proxy_groups_json() {
controller_curl GET "/proxies"
}
proxy_group_exists() {
local group="$1"
[ -n "${group:-}" ] || return 1
[ "$(proxy_groups_json | "$(yq_bin)" -p=json eval ".proxies | has(\"$group\")" - 2>/dev/null)" = "true" ]
}
proxy_group_type() {
local group="$1"
[ -n "${group:-}" ] || die "策略组名称不能为空"
proxy_group_exists "$group" || die "策略组不存在:$group"
proxy_groups_json | "$(yq_bin)" -p=json eval ".proxies.\"$group\".type // \"\"" - 2>/dev/null
}
proxy_group_is_selector() {
local type
type="$(proxy_group_type "$1")"
case "$type" in
Selector|URLTest|Fallback|LoadBalance)
return 0
;;
*)
return 1
;;
esac
}
proxy_group_list() {
proxy_groups_json \
| "$(yq_bin)" -p=json eval '
.proxies
| to_entries
| map(select(.value.all != null))
| .[].key
' - 2>/dev/null
}
proxy_group_current() {
local group="$1"
[ -n "${group:-}" ] || die "策略组名称不能为空"
proxy_group_exists "$group" || die "策略组不存在:$group"
proxy_groups_json \
| "$(yq_bin)" -p=json eval ".proxies.\"$group\".now // \"\"" - 2>/dev/null
}
proxy_group_nodes() {
local group="$1"
[ -n "${group:-}" ] || die "策略组名称不能为空"
proxy_group_exists "$group" || die "策略组不存在:$group"
proxy_groups_json \
| "$(yq_bin)" -p=json eval ".proxies.\"$group\".all[] // \"\"" - 2>/dev/null
}
proxy_group_select() {
local group="$1"
local node="$2"
[ -n "${group:-}" ] || die "策略组名称不能为空"
[ -n "${node:-}" ] || die "节点名称不能为空"
proxy_group_exists "$group" || die "策略组不存在:$group"
proxy_group_is_selector "$group" || die "该策略组不支持手动切换:$group"
if ! proxy_group_nodes "$group" | grep -Fxq "$node"; then
die "节点不存在于策略组中:$group -> $node"
fi
controller_curl PUT "/proxies/$group" "{\"name\":\"$node\"}" >/dev/null
}
proxy_group_count() {
proxy_group_list 2>/dev/null | awk 'NF{c++} END{print c+0}'
}
default_proxy_group_name() {
local config_file="${1:-$RUNTIME_DIR/config.yaml}"
local group_name
[ -s "$config_file" ] || return 1
group_name="$("$(yq_bin)" eval '
.["proxy-groups"][] |
select(
(.type == "select") or
(.type == "url-test") or
(.type == "fallback") or
(.type == "load-balance")
) |
.name
' "$config_file" 2>/dev/null | head -n 1)"
[ -n "${group_name:-}" ] || return 1
echo "$group_name"
}
default_proxy_group_current() {
local group
group="$(default_proxy_group_name 2>/dev/null || true)"
[ -n "${group:-}" ] || return 1
proxy_group_current "$group" 2>/dev/null || return 1
}
print_proxy_groups_status() {
local group current
while IFS= read -r group; do
[ -n "${group:-}" ] || continue
current="$(proxy_group_current "$group" 2>/dev/null || true)"
if [ -n "${current:-}" ]; then
echo "$group -> $current"
else
echo "$group -> <unknown>"
fi
done < <(proxy_group_list)
}
print_proxy_groups_summary() {
local group current
while IFS= read -r group; do
[ -n "${group:-}" ] || continue
current="$(proxy_group_current "$group" 2>/dev/null || true)"
if [ -n "${current:-}" ]; then
echo "$group -> $current"
else
echo "$group"
fi
done < <(proxy_group_list)
}
+389
View File
@@ -0,0 +1,389 @@
#!/usr/bin/env bash
# shellcheck source=scripts/core/common.sh
source "${PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}/scripts/core/common.sh"
# shellcheck source=scripts/core/config.sh
source "${PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}/scripts/core/config.sh"
resolve_yq() {
local arch version file url tmp_dir tmp_file
arch="$(get_arch)"
version="${YQ_VERSION:-$DEFAULT_YQ_VERSION}"
if [ -x "$(yq_bin)" ]; then
return 0
fi
case "$arch" in
amd64) file="yq_linux_amd64.tar.gz" ;;
arm64) file="yq_linux_arm64.tar.gz" ;;
armv7) file="yq_linux_arm.tar.gz" ;;
*) die "暂不支持的 yq 架构:$arch" ;;
esac
url="https://github.com/mikefarah/yq/releases/download/${version}/${file}"
tmp_dir="$(mktemp -d)"
tmp_file="$tmp_dir/$file"
download_file "$url" "$tmp_file" "yq"
tar -xzf "$tmp_file" -C "$tmp_dir"
if [ -f "$tmp_dir/yq_linux_${arch}" ]; then
install -m 0755 "$tmp_dir/yq_linux_${arch}" "$(yq_bin)"
elif [ -f "$tmp_dir/yq_linux_arm" ]; then
install -m 0755 "$tmp_dir/yq_linux_arm" "$(yq_bin)"
elif [ -f "$tmp_dir/yq" ]; then
install -m 0755 "$tmp_dir/yq" "$(yq_bin)"
else
rm -rf "$tmp_dir"
die "解压后未找到 yq 可执行文件"
fi
rm -rf "$tmp_dir"
}
resolve_mihomo() {
local arch version file url tmp_file
arch="$(get_arch)"
version="${MIHOMO_VERSION:-$DEFAULT_MIHOMO_VERSION}"
if [ -x "$(mihomo_bin)" ]; then
return 0
fi
case "$arch" in
amd64) file="mihomo-linux-amd64-compatible-${version}.gz" ;;
arm64) file="mihomo-linux-arm64-${version}.gz" ;;
armv7) file="mihomo-linux-armv7-${version}.gz" ;;
*) die "暂不支持的 Mihomo 架构:$arch" ;;
esac
url="https://github.com/MetaCubeX/mihomo/releases/download/${version}/${file}"
tmp_file="$(mktemp)"
download_file "$url" "$tmp_file" "mihomo"
gzip -dc "$tmp_file" > "$(mihomo_bin)"
chmod +x "$(mihomo_bin)"
rm -f "$tmp_file"
}
resolve_clash() {
local arch version version_no_v url_base tmp_file url downloaded="false"
local candidates file
arch="$(get_arch)"
version="${CLASH_VERSION:-$DEFAULT_CLASH_VERSION}"
version_no_v="${version#v}"
url_base="${CLASH_DOWNLOAD_BASE:-https://github.com/WindSpiritSR/clash/releases/download}"
if [ -x "$(clash_bin)" ] \
&& [ "$(read_runtime_value "KERNEL_TYPE_INSTALLED" 2>/dev/null || true)" = "clash" ] \
&& [ "$(read_runtime_value "CLASH_VERSION_INSTALLED" 2>/dev/null || true)" = "$version" ]; then
return 0
fi
case "$arch" in
amd64)
candidates="
clash-linux-amd64-${version}.gz
clash-linux-amd64-v${version_no_v}.gz
"
;;
arm64)
candidates="
clash-linux-arm64-${version}.gz
clash-linux-arm64-v${version_no_v}.gz
clash-linux-armv8-${version}.gz
clash-linux-armv8-v${version_no_v}.gz
"
;;
armv7)
candidates="
clash-linux-armv7-${version}.gz
clash-linux-armv7-v${version_no_v}.gz
"
;;
*)
die "暂不支持的 Clash 架构:$arch"
;;
esac
tmp_file="$(mktemp)"
rm -f "$tmp_file"
for file in $candidates; do
url="${url_base}/${version}/${file}"
if download_file "$url" "$tmp_file" "clash"; then
downloaded="true"
break
fi
done
[ "$downloaded" = "true" ] || {
rm -f "$tmp_file"
die "Clash 内核下载失败,请检查版本或在 .env 中覆盖 CLASH_DOWNLOAD_BASE / CLASH_VERSION"
}
gzip -dc "$tmp_file" > "$(clash_bin)"
chmod +x "$(clash_bin)"
rm -f "$tmp_file"
write_runtime_value "KERNEL_TYPE_INSTALLED" "clash"
write_runtime_value "CLASH_VERSION_INSTALLED" "$version"
}
resolve_runtime_kernel() {
case "$(runtime_kernel_type)" in
mihomo)
resolve_mihomo
write_runtime_value "KERNEL_TYPE_INSTALLED" "mihomo"
write_runtime_value "MIHOMO_VERSION_INSTALLED" "${MIHOMO_VERSION:-$DEFAULT_MIHOMO_VERSION}"
;;
clash)
resolve_clash
;;
*)
die "未知内核类型:$(runtime_kernel_type)"
;;
esac
}
subconverter_version_file_value() {
read_runtime_value "SUBCONVERTER_VERSION_INSTALLED" 2>/dev/null || true
}
mark_subconverter_version_installed() {
local version="$1"
write_runtime_value "SUBCONVERTER_VERSION_INSTALLED" "$version"
}
resolve_subconverter() {
local arch version file url tmp_dir tmp_file target_dir installed_version
arch="$(get_arch)"
version="${SUBCONVERTER_VERSION:-$DEFAULT_SUBCONVERTER_VERSION}"
target_dir="$(subconverter_home)"
installed_version="$(subconverter_version_file_value)"
if [ -x "$(subconverter_bin)" ] && [ "$installed_version" = "$version" ]; then
return 0
fi
case "$arch" in
amd64) file="subconverter_linux64.tar.gz" ;;
arm64) file="subconverter_aarch64.tar.gz" ;;
armv7) file="subconverter_armv7.tar.gz" ;;
*) die "暂不支持的 subconverter 架构:$arch" ;;
esac
url="https://github.com/tindy2013/subconverter/releases/download/${version}/${file}"
tmp_dir="$(mktemp -d)"
tmp_file="$tmp_dir/$file"
download_file "$url" "$tmp_file" "subconverter"
rm -rf "$target_dir"
mkdir -p "$target_dir"
tar -xzf "$tmp_file" -C "$target_dir"
[ -x "$(subconverter_bin)" ] || {
rm -rf "$tmp_dir"
die "解压后未找到 subconverter 可执行文件"
}
chmod +x "$(subconverter_bin)"
mark_subconverter_version_installed "$version"
rm -rf "$tmp_dir"
}
ensure_runtime_config_ready() {
local config_file last_file now reason
config_file="$RUNTIME_DIR/config.yaml"
last_file="$RUNTIME_DIR/config.last.yaml"
if [ -s "$config_file" ] && test_runtime_config "$config_file" >/dev/null 2>&1; then
write_runtime_event_value "RUNTIME_LAST_FALLBACK_USED" "false"
write_runtime_event_value "RUNTIME_LAST_FALLBACK_TIME" ""
write_runtime_event_value "RUNTIME_LAST_FALLBACK_REASON" ""
write_runtime_event_value "RUNTIME_LAST_RISK_LEVEL" "$(calculate_runtime_risk_level)"
mark_runtime_config_source "runtime"
return 0
fi
reason="当前运行配置不可用"
warn "当前运行配置不可用,尝试回退到上一次成功配置"
[ -s "$last_file" ] || die "当前配置不可用,且不存在可回退的最后成功配置:$last_file"
if test_runtime_config "$last_file" >/dev/null 2>&1; then
cp -f "$last_file" "$config_file"
now="$(now_datetime)"
write_runtime_event_value "RUNTIME_LAST_FALLBACK_USED" "true"
write_runtime_event_value "RUNTIME_LAST_FALLBACK_TIME" "$now"
write_runtime_event_value "RUNTIME_LAST_FALLBACK_REASON" "$reason"
write_runtime_event_value "RUNTIME_LAST_RISK_LEVEL" "$(calculate_runtime_risk_level)"
mark_runtime_config_source "last_good"
success "已回退到最后成功配置"
return 0
fi
die "最后成功配置也不可用:$last_file"
}
tun_effective_check() {
local config_tun_enabled auto_route controller_ok route_ok
config_tun_enabled="$(runtime_config_tun_enabled 2>/dev/null || true)"
if [ "$(tun_enabled)" != "true" ]; then
echo "disabled-in-state"
return 1
fi
if [ "${config_tun_enabled:-false}" != "true" ]; then
echo "disabled-in-runtime-config"
return 1
fi
if ! status_is_running 2>/dev/null; then
echo "runtime-not-running"
return 1
fi
controller_ok="false"
if proxy_controller_reachable 2>/dev/null; then
controller_ok="true"
fi
if [ "$controller_ok" != "true" ]; then
echo "controller-unreachable"
return 1
fi
auto_route="$(runtime_config_tun_auto_route 2>/dev/null || true)"
route_ok="unknown"
if [ "${auto_route:-false}" = "true" ]; then
if default_route_is_tun_like; then
route_ok="true"
else
route_ok="false"
fi
if [ "$route_ok" != "true" ]; then
echo "default-route-not-tun"
return 1
fi
fi
echo "ok"
return 0
}
tun_disable_check() {
local config_tun_enabled
config_tun_enabled="$(runtime_config_tun_enabled 2>/dev/null || true)"
if [ "$(tun_enabled)" = "true" ]; then
echo "state-still-enabled"
return 1
fi
if [ "${config_tun_enabled:-false}" = "true" ]; then
echo "runtime-config-still-enabled"
return 1
fi
if status_is_running 2>/dev/null; then
if ! proxy_controller_reachable 2>/dev/null; then
echo "runtime-restarted-but-controller-unreachable"
return 1
fi
fi
echo "ok"
return 0
}
start_runtime() {
local config_file="$RUNTIME_DIR/config.yaml"
resolve_runtime_kernel
ensure_runtime_config_ready
if [ -f "$RUNTIME_DIR/mihomo.pid" ]; then
local old_pid
old_pid="$(cat "$RUNTIME_DIR/mihomo.pid" 2>/dev/null || true)"
if [ -n "${old_pid:-}" ] && kill -0 "$old_pid" 2>/dev/null; then
warn "Mihomo 已在运行:pid=$old_pid"
return 0
fi
rm -f "$RUNTIME_DIR/mihomo.pid"
fi
nohup "$(runtime_kernel_bin)" -f "$config_file" -d "$RUNTIME_DIR" \
> "$LOG_DIR/mihomo.out.log" 2>&1 &
echo $! > "$RUNTIME_DIR/mihomo.pid"
success "$(runtime_kernel_name) 已启动:pid=$(cat "$RUNTIME_DIR/mihomo.pid")"
}
stop_runtime() {
local pid_file="$RUNTIME_DIR/mihomo.pid"
[ -f "$pid_file" ] || {
warn "Mihomo 当前未运行"
return 0
}
local pid
pid="$(cat "$pid_file" 2>/dev/null || true)"
if [ -n "${pid:-}" ] && kill -0 "$pid" 2>/dev/null; then
kill "$pid" 2>/dev/null || true
sleep 1
kill -9 "$pid" 2>/dev/null || true
fi
rm -f "$pid_file"
success "Mihomo 已停止"
}
runtime_status_text() {
if [ -f "$RUNTIME_DIR/mihomo.pid" ]; then
local pid
pid="$(cat "$RUNTIME_DIR/mihomo.pid" 2>/dev/null || true)"
if [ -n "${pid:-}" ] && kill -0 "$pid" 2>/dev/null; then
echo "运行中"
echo "进程号:$pid"
return 0
fi
fi
echo "未运行"
}
clean_runtime_state() {
stop_subconverter || true
stop_runtime || true
clear_build_meta || true
rm -f "$RUNTIME_DIR/config.yaml" 2>/dev/null || true
rm -f "$RUNTIME_DIR"/*.pid 2>/dev/null || true
rm -f "$RUNTIME_DIR"/*.lock 2>/dev/null || true
rm -rf "$LOG_DIR" 2>/dev/null || true
mkdir -p "$LOG_DIR"
rm -rf "$RUNTIME_DIR/profiles" 2>/dev/null || true
rm -rf "$RUNTIME_DIR/generated" 2>/dev/null || true
rm -rf "$RUNTIME_DIR/tmp" 2>/dev/null || true
mkdir -p "$RUNTIME_DIR" "$BIN_DIR" "$LOG_DIR"
}
+146
View File
@@ -0,0 +1,146 @@
#!/usr/bin/env bash
# shellcheck source=scripts/core/common.sh
source "${PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}/scripts/core/common.sh"
# shellcheck source=scripts/core/runtime.sh
source "${PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}/scripts/core/runtime.sh"
# shellcheck source=scripts/core/config.sh
source "${PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}/scripts/core/config.sh"
ensure_git_ready() {
command -v git >/dev/null 2>&1 || die "当前系统缺少 git"
git -C "$PROJECT_DIR" rev-parse --is-inside-work-tree >/dev/null 2>&1 \
|| die "当前目录不是 Git 仓库:$PROJECT_DIR"
}
current_git_branch() {
git -C "$PROJECT_DIR" rev-parse --abbrev-ref HEAD 2>/dev/null
}
update_branch() {
local branch
branch="$(read_env_value "CLASH_UPDATE_BRANCH" 2>/dev/null || true)"
if [ -n "${branch:-}" ]; then
echo "$branch"
return 0
fi
current_git_branch
}
git_has_local_changes() {
[ -n "$(git -C "$PROJECT_DIR" status --porcelain --untracked-files=no 2>/dev/null)" ]
}
git_remote_name() {
echo "${CLASH_GIT_REMOTE:-origin}"
}
sync_runtime_dependencies() {
resolve_yq
resolve_runtime_kernel
resolve_subconverter
}
remove_mihomo_binary() {
rm -f "$(mihomo_bin)" 2>/dev/null || true
}
remove_clash_binary() {
rm -f "$(clash_bin)" 2>/dev/null || true
}
upgrade_runtime_kernel() {
local target_kernel="${1:-}"
local verbose="${2:-false}"
local was_running="false"
target_kernel="$(normalize_kernel_type "${target_kernel:-$(runtime_kernel_type)}")"
if status_is_running 2>/dev/null; then
was_running="true"
fi
write_runtime_kernel_type "$target_kernel"
if [ "$verbose" = "true" ]; then
info "当前架构:$(get_arch)"
info "目标内核:$target_kernel"
case "$target_kernel" in
mihomo)
info "目标版本:${MIHOMO_VERSION:-$DEFAULT_MIHOMO_VERSION}"
;;
clash)
info "目标版本:${CLASH_VERSION:-$DEFAULT_CLASH_VERSION}"
;;
esac
fi
case "$target_kernel" in
mihomo)
info "正在升级 mihomo 内核"
remove_mihomo_binary
resolve_mihomo
[ -x "$(mihomo_bin)" ] || die "mihomo 内核升级失败"
;;
clash)
info "正在升级 clash 内核"
remove_clash_binary
resolve_clash
[ -x "$(clash_bin)" ] || die "clash 内核升级失败"
;;
*)
die "未知内核类型:$target_kernel"
;;
esac
if [ "$was_running" = "true" ]; then
info "检测到当前内核正在运行,正在重启服务"
service_restart
success "内核升级成功,已重启生效"
else
success "内核升级成功"
fi
}
update_project_code() {
local force_mode="$1"
local regenerate_mode="$2"
local remote_name branch
ensure_git_ready
remote_name="$(git_remote_name)"
branch="$(update_branch)"
[ -n "${branch:-}" ] || die "无法识别当前分支"
info "远程仓库:$remote_name"
info "更新分支:$branch"
if git_has_local_changes && [ "$force_mode" != "true" ]; then
die "检测到本地有未提交改动,请先提交,或使用 clashctl update --force"
fi
info "正在获取最新代码"
git -C "$PROJECT_DIR" fetch "$remote_name" "$branch" || die "获取远程代码失败"
if git_has_local_changes && [ "$force_mode" = "true" ]; then
warn "检测到本地改动,正在强制覆盖"
git -C "$PROJECT_DIR" reset --hard "$remote_name/$branch" || die "强制覆盖失败"
else
git -C "$PROJECT_DIR" reset --hard "$remote_name/$branch" || die "更新失败"
fi
success "代码已更新到最新版本"
sync_runtime_dependencies
if [ "$regenerate_mode" = "true" ]; then
regenerate_config
fi
success "更新完成"
}
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
exec "$PROJECT_DIR/clashctl" doctor "$@"
-353
View File
@@ -1,353 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RUNTIME_DIR="$PROJECT_DIR/runtime"
CONFIG_DIR="$PROJECT_DIR/config"
LOG_DIR="$PROJECT_DIR/logs"
RUNTIME_CONFIG="$RUNTIME_DIR/config.yaml"
STATE_FILE="$RUNTIME_DIR/state.env"
TMP_DOWNLOAD="$RUNTIME_DIR/subscription.raw.yaml"
TMP_NORMALIZED="$RUNTIME_DIR/subscription.normalized.yaml"
TMP_PROXY_FRAGMENT="$RUNTIME_DIR/proxy.fragment.yaml"
TMP_CONFIG="$RUNTIME_DIR/config.yaml.tmp"
mkdir -p "$RUNTIME_DIR" "$CONFIG_DIR" "$LOG_DIR"
if [ -f "$PROJECT_DIR/.env" ]; then
# shellcheck disable=SC1091
source "$PROJECT_DIR/.env"
fi
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/get_cpu_arch.sh"
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/resolve_clash.sh"
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/config_utils.sh"
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/port_utils.sh"
CLASH_HTTP_PORT="${CLASH_HTTP_PORT:-7890}"
CLASH_SOCKS_PORT="${CLASH_SOCKS_PORT:-7891}"
CLASH_REDIR_PORT="${CLASH_REDIR_PORT:-7892}"
CLASH_LISTEN_IP="${CLASH_LISTEN_IP:-0.0.0.0}"
CLASH_ALLOW_LAN="${CLASH_ALLOW_LAN:-false}"
EXTERNAL_CONTROLLER_ENABLED="${EXTERNAL_CONTROLLER_ENABLED:-true}"
EXTERNAL_CONTROLLER="${EXTERNAL_CONTROLLER:-127.0.0.1:9090}"
ALLOW_INSECURE_TLS="${ALLOW_INSECURE_TLS:-false}"
CLASH_AUTO_UPDATE="${CLASH_AUTO_UPDATE:-true}"
CLASH_URL="${CLASH_URL:-}"
CLASH_HTTP_PORT="$(resolve_port_value "HTTP" "$CLASH_HTTP_PORT")"
CLASH_SOCKS_PORT="$(resolve_port_value "SOCKS" "$CLASH_SOCKS_PORT")"
CLASH_REDIR_PORT="$(resolve_port_value "REDIR" "$CLASH_REDIR_PORT")"
EXTERNAL_CONTROLLER="$(resolve_host_port "External Controller" "$EXTERNAL_CONTROLLER" "127.0.0.1")"
trim_value() {
local s="$1"
s="${s#"${s%%[![:space:]]*}"}"
s="${s%"${s##*[![:space:]]}"}"
printf '%s' "$s"
}
write_state() {
local status="$1"
local reason="$2"
local source="${3:-unknown}"
cat > "$STATE_FILE" <<EOF
LAST_GENERATE_STATUS=$status
LAST_GENERATE_REASON=$reason
LAST_CONFIG_SOURCE=$source
LAST_GENERATE_AT=$(date -Iseconds)
EOF
}
fail_with_state() {
local reason="$1"
local message="$2"
local source="${3:-none}"
write_state "failed" "$reason" "$source"
ui_error "$message" >&2
exit 1
}
write_env_value() {
local key="$1"
local value="$2"
local env_file="$PROJECT_DIR/.env"
local tmp_file
[ -f "$env_file" ] || return 1
tmp_file="$(mktemp)"
awk -v k="$key" -v v="$value" '
BEGIN { updated = 0 }
$0 ~ "^[[:space:]]*(export[[:space:]]+)?" k "=" {
print "export " k "='\''" v "'\''"
updated = 1
next
}
{ print }
END {
if (!updated) {
print "export " k "='\''" v "'\''"
}
}
' "$env_file" > "$tmp_file" && mv "$tmp_file" "$env_file"
}
generate_secret() {
if [ -n "${CLASH_SECRET:-}" ]; then
echo "$CLASH_SECRET"
return 0
fi
if [ -s "$RUNTIME_CONFIG" ]; then
local old_secret
old_secret="$(sed -nE 's/^[[:space:]]*secret:[[:space:]]*"?([^"#]+)"?.*$/\1/p' "$RUNTIME_CONFIG" | head -n 1)"
if [ -n "${old_secret:-}" ]; then
echo "$old_secret"
return 0
fi
fi
if command -v openssl >/dev/null 2>&1; then
openssl rand -base64 24 | tr -dc 'A-Za-z0-9' | head -c 16
else
tr -dc 'A-Za-z0-9' </dev/urandom | head -c 16
fi
}
SECRET="$(generate_secret)"
write_env_value "CLASH_SECRET" "$SECRET" || true
upsert_yaml_kv_local() {
local file="$1"
local key="$2"
local value="$3"
[ -f "$file" ] || touch "$file"
if grep -qE "^[[:space:]]*${key}:" "$file"; then
sed -i -E "s|^[[:space:]]*${key}:.*$|${key}: ${value}|g" "$file"
else
printf "%s: %s\n" "$key" "$value" >> "$file"
fi
}
remove_yaml_key_local() {
local file="$1"
local key="$2"
[ -f "$file" ] || return 0
sed -i -E "/^[[:space:]]*${key}:/d" "$file"
}
apply_secret_to_config() {
local file="$1"
upsert_yaml_kv_local "$file" "secret" "$SECRET"
}
apply_controller_to_config() {
local file="$1"
local ui_src="$PROJECT_DIR/ui/dist"
local ui_dir="$RUNTIME_DIR/ui"
if [ "$EXTERNAL_CONTROLLER_ENABLED" = "true" ]; then
upsert_yaml_kv_local "$file" "external-controller" "$EXTERNAL_CONTROLLER"
if [ ! -f "$ui_src/index.html" ]; then
fail_with_state "ui_missing" "UI 未找到: $ui_src/index.html" "none"
fi
rm -rf "$ui_dir"
mkdir -p "$ui_dir"
cp -a "$ui_src/." "$ui_dir/"
upsert_yaml_kv_local "$file" "external-ui" "$ui_dir"
else
remove_yaml_key_local "$file" "external-controller"
remove_yaml_key_local "$file" "external-ui"
fi
}
validate_clash_url() {
local url="$1"
url="$(trim_value "$url")"
if [ -z "$url" ]; then
write_state "failed" "url_empty" "none"
ui_error "CLASH_URL 为空" >&2
return 1
fi
case "$url" in
http://*|https://*)
;;
*)
write_state "failed" "url_invalid" "none"
ui_error "CLASH_URL 格式非法:必须以 http:// 或 https:// 开头" >&2
return 1
;;
esac
if [[ "$url" =~ [[:space:]] ]]; then
write_state "failed" "url_whitespace" "none"
ui_error "CLASH_URL 含有空白字符" >&2
return 1
fi
if [[ "$url" == "-"* ]]; then
write_state "failed" "url_like_option" "none"
ui_error "CLASH_URL 非法:看起来像 curl 参数而不是链接" >&2
return 1
fi
return 0
}
download_subscription() {
local url
url="$(trim_value "${CLASH_URL:-}")"
validate_clash_url "$url" || return 1
local curl_cmd=(
curl
-fL
-S
--retry 2
--connect-timeout 10
-m 30
-o "$TMP_DOWNLOAD"
--
"$url"
)
if [ "$ALLOW_INSECURE_TLS" = "true" ]; then
curl_cmd=(
curl
-fL
-S
--retry 2
--connect-timeout 10
-m 30
-k
-o "$TMP_DOWNLOAD"
--
"$url"
)
fi
if [ -n "${CLASH_HEADERS:-}" ]; then
local header
while IFS= read -r header; do
header="$(trim_value "$header")"
[ -n "$header" ] && curl_cmd=("${curl_cmd[@]:0:${#curl_cmd[@]}-2}" -H "$header" -- "$url")
done < <(printf '%s\n' "$CLASH_HEADERS" | tr ';' '\n')
fi
"${curl_cmd[@]}"
}
is_complete_clash_config() {
local file="$1"
grep -qE '^[[:space:]]*(proxies:|proxy-providers:|mixed-port:|port:)' "$file"
}
cleanup_tmp_files() {
rm -f "$TMP_DOWNLOAD" "$TMP_NORMALIZED" "$TMP_PROXY_FRAGMENT" "$TMP_CONFIG"
}
build_fragment_config() {
local template_file="$1"
local target_file="$2"
sed -n '/^proxies:/,$p' "$TMP_NORMALIZED" > "$TMP_PROXY_FRAGMENT"
cat "$template_file" > "$target_file"
cat "$TMP_PROXY_FRAGMENT" >> "$target_file"
sed -i "s/CLASH_HTTP_PORT_PLACEHOLDER/${CLASH_HTTP_PORT}/g" "$target_file"
sed -i "s/CLASH_SOCKS_PORT_PLACEHOLDER/${CLASH_SOCKS_PORT}/g" "$target_file"
sed -i "s/CLASH_REDIR_PORT_PLACEHOLDER/${CLASH_REDIR_PORT}/g" "$target_file"
sed -i "s/CLASH_LISTEN_IP_PLACEHOLDER/${CLASH_LISTEN_IP}/g" "$target_file"
sed -i "s/CLASH_ALLOW_LAN_PLACEHOLDER/${CLASH_ALLOW_LAN}/g" "$target_file"
}
finalize_config() {
local file="$1"
mv -f "$file" "$RUNTIME_CONFIG"
}
main() {
local template_file="$CONFIG_DIR/template.yaml"
if [ "$CLASH_AUTO_UPDATE" != "true" ]; then
if [ -s "$RUNTIME_CONFIG" ]; then
write_state "success" "auto_update_disabled_keep_runtime" "runtime_existing"
exit 0
fi
fail_with_state "runtime_missing" "已关闭自动更新,且运行配置缺失: $RUNTIME_CONFIG" "none"
fi
CLASH_URL="$(trim_value "${CLASH_URL:-}")"
if ! validate_clash_url "$CLASH_URL"; then
exit 1
fi
if ! download_subscription; then
write_state "failed" "download_failed" "none"
ui_error "下载订阅失败" >&2
exit 1
fi
if [ ! -s "$TMP_DOWNLOAD" ]; then
fail_with_state "subscription_empty" "订阅下载成功但内容为空" "none"
fi
cp -f "$TMP_DOWNLOAD" "$TMP_NORMALIZED"
if is_complete_clash_config "$TMP_NORMALIZED"; then
cp -f "$TMP_NORMALIZED" "$TMP_CONFIG"
apply_controller_to_config "$TMP_CONFIG"
apply_secret_to_config "$TMP_CONFIG"
finalize_config "$TMP_CONFIG"
write_state "success" "subscription_full" "subscription_full"
exit 0
fi
if ! grep -qE '^[[:space:]]*proxies:' "$TMP_NORMALIZED"; then
fail_with_state "subscription_invalid" "订阅不可用或转换失败" "none"
fi
if [ ! -s "$template_file" ]; then
fail_with_state "missing_template" "缺少模板配置文件: $template_file" "none"
fi
build_fragment_config "$template_file" "$TMP_CONFIG"
apply_controller_to_config "$TMP_CONFIG"
apply_secret_to_config "$TMP_CONFIG"
finalize_config "$TMP_CONFIG"
write_state "success" "subscription_fragment_merged" "subscription_fragment"
}
trap cleanup_tmp_files EXIT
main "$@"
-57
View File
@@ -1,57 +0,0 @@
#!/bin/bash
# 作用:获取当前 Linux 系统的 CPU 架构信息,并输出到标准输出
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
exitWithError() {
local errorMessage="$1"
echo -e "\033[31m[ERROR] $errorMessage\033[0m" >&2
exit 1
}
# 获取 CPU 架构
get_cpu_arch() {
local commands=("$@")
for cmd in "${commands[@]}"; do
local CpuArch
CpuArch=$(command -v $cmd >/dev/null && $cmd 2>/dev/null || type -p $cmd 2>/dev/null)
if [[ -n "$CpuArch" ]]; then
echo "$CpuArch"
return
fi
done
}
# 判断系统发行版
if [[ -f "/etc/os-release" ]]; then
. /etc/os-release
case "$ID" in
"ubuntu"|"debian"|"linuxmint")
# Debian 系发行版
CpuArch=$(get_cpu_arch "dpkg-architecture -qDEB_HOST_ARCH_CPU" "dpkg-architecture -qDEB_BUILD_ARCH_CPU" "uname -m")
;;
"centos"|"fedora"|"rhel")
# Red Hat 系发行版
CpuArch=$(get_cpu_arch "uname -m" "arch" "uname")
;;
*)
# 未明确支持的 Linux 发行版
CpuArch=$(get_cpu_arch "uname -m" "arch" "uname")
if [[ -z "$CpuArch" ]]; then
exitWithError "获取 CPU 架构失败"
fi
;;
esac
elif [[ -f "/etc/redhat-release" ]]; then
# 老版本 Red Hat 系
CpuArch=$(get_cpu_arch "uname -m" "arch" "uname")
else
exitWithError "不支持的 Linux 发行版"
fi
# ui_info "CPU 架构: $CpuArch"
+241
View File
@@ -0,0 +1,241 @@
#!/usr/bin/env bash
install_script_entry() {
write_runtime_value "RUNTIME_BACKEND" "script"
write_runtime_value "INSTALL_SCOPE" "$INSTALL_SCOPE"
}
remove_script_entry() {
success "脚本运行模式无需删除服务文件"
}
script_service_start() {
start_runtime
}
script_service_stop() {
stop_runtime
}
script_service_restart() {
stop_runtime || true
start_runtime
}
script_service_status_text() {
runtime_status_text
}
script_service_logs() {
if [ ! -f "$LOG_DIR/mihomo.out.log" ]; then
echo "日志文件不存在"
return 0
fi
tail -n 200 "$LOG_DIR/mihomo.out.log"
}
install_runtime_entry() {
if [ "$INSTALL_SCOPE" = "system" ] && systemd_available; then
install_systemd_entry
return 0
fi
if [ "$INSTALL_SCOPE" = "user" ] && systemd_user_available; then
install_systemd_user_entry
return 0
fi
install_script_entry
}
remove_runtime_entry() {
local backend
backend="$(runtime_backend)"
case "$backend" in
systemd)
remove_systemd_entry
;;
systemd-user)
remove_systemd_user_entry
;;
script)
remove_script_entry
;;
*)
warn "未知运行后端:$backend,按脚本模式清理"
remove_script_entry
;;
esac
}
service_start() {
local backend
backend="$(runtime_backend)"
case "$backend" in
systemd)
systemd_service_start
;;
systemd-user)
systemd_user_service_start
;;
script)
script_service_start
;;
*)
die "未知运行后端:$backend"
;;
esac
}
service_stop() {
local backend
backend="$(runtime_backend)"
case "$backend" in
systemd)
systemd_service_stop
;;
systemd-user)
systemd_user_service_stop
;;
script)
script_service_stop
;;
*)
die "未知运行后端:$backend"
;;
esac
}
service_restart() {
local backend
backend="$(runtime_backend)"
case "$backend" in
systemd)
systemd_service_restart
;;
systemd-user)
systemd_user_service_restart
;;
script)
script_service_restart
;;
*)
die "未知运行后端:$backend"
;;
esac
}
service_status_text() {
local backend
backend="$(runtime_backend)"
case "$backend" in
systemd)
systemd_service_status_text
;;
systemd-user)
systemd_user_service_status_text
;;
script)
script_service_status_text
;;
*)
echo "未知状态"
;;
esac
}
service_logs() {
local backend
backend="$(runtime_backend)"
case "$backend" in
systemd)
systemd_service_logs
;;
systemd-user)
systemd_user_service_logs
;;
script)
script_service_logs
;;
*)
echo "未知运行后端,无法读取日志"
;;
esac
}
wait_install_runtime_ready() {
local max_try="${1:-4}"
local i=0
local runtime_ready="false"
local controller_ready="false"
while [ "$i" -lt "$max_try" ]; do
if status_is_running 2>/dev/null; then
runtime_ready="true"
fi
if proxy_controller_reachable 2>/dev/null; then
controller_ready="true"
fi
if [ "$runtime_ready" = "true" ] && [ "$controller_ready" = "true" ]; then
break
fi
sleep 1
i=$((i + 1))
done
write_runtime_value "INSTALL_VERIFY_RUNTIME_READY" "$runtime_ready"
write_runtime_value "INSTALL_VERIFY_CONTROLLER_READY" "$controller_ready"
}
post_install_verify() {
local has_subscription="false"
local runtime_ready="false"
local controller_ready="false"
if command -v clashctl >/dev/null 2>&1; then
write_runtime_value "INSTALL_VERIFY_COMMAND_READY" "true"
else
write_runtime_value "INSTALL_VERIFY_COMMAND_READY" "false"
write_runtime_event_value "RUNTIME_LAST_INSTALL_READY" "false"
die "clashctl 安装失败,命令不可用"
fi
if [ -n "$(subscription_url 2>/dev/null || true)" ]; then
has_subscription="true"
fi
if [ -s "$RUNTIME_DIR/config.yaml" ]; then
write_runtime_value "INSTALL_VERIFY_CONFIG_READY" "true"
else
write_runtime_value "INSTALL_VERIFY_CONFIG_READY" "false"
fi
if [ "$has_subscription" = "true" ]; then
service_start >/dev/null 2>&1 || true
wait_install_runtime_ready 4
else
write_runtime_value "INSTALL_VERIFY_RUNTIME_READY" "false"
write_runtime_value "INSTALL_VERIFY_CONTROLLER_READY" "false"
fi
runtime_ready="$(install_verify_runtime_ready 2>/dev/null || true)"
controller_ready="$(install_verify_controller_ready 2>/dev/null || true)"
if [ "$has_subscription" = "true" ] \
&& [ "${runtime_ready:-false}" = "true" ] \
&& [ "${controller_ready:-false}" = "true" ]; then
write_runtime_event_value "RUNTIME_LAST_INSTALL_READY" "true"
else
write_runtime_event_value "RUNTIME_LAST_INSTALL_READY" "false"
fi
}
+74
View File
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
install_systemd_user_entry() {
local user_dir unit_file
user_dir="$HOME/.config/systemd/user"
unit_file="$user_dir/$(service_unit_name)"
mkdir -p "$user_dir"
cat > "$unit_file" <<EOF
[Unit]
Description=clash-for-linux (user)
After=default.target
[Service]
Type=forking
ExecStart=$HOME/.local/bin/clashctl start-direct
ExecStop=$HOME/.local/bin/clashctl stop-direct
ExecReload=$HOME/.local/bin/clashctl restart-direct
PIDFile=$RUNTIME_DIR/mihomo.pid
WorkingDirectory=$PROJECT_DIR
Restart=on-failure
RestartSec=3
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable "$(service_unit_name)" >/dev/null 2>&1 || true
write_runtime_value "RUNTIME_BACKEND" "systemd-user"
write_runtime_value "INSTALL_SCOPE" "$INSTALL_SCOPE"
}
remove_systemd_user_entry() {
local unit_file
unit_file="$HOME/.config/systemd/user/$(service_unit_name)"
if [ -f "$unit_file" ]; then
systemctl --user disable "$(service_unit_name)" >/dev/null 2>&1 || true
rm -f "$unit_file"
systemctl --user daemon-reload || true
success "已删除用户级 systemd 服务:$(service_unit_name)"
fi
}
systemd_user_service_start() {
systemctl --user start "$(service_unit_name)"
}
systemd_user_service_stop() {
systemctl --user stop "$(service_unit_name)" >/dev/null 2>&1 || true
}
systemd_user_service_restart() {
systemctl --user restart "$(service_unit_name)"
}
systemd_user_service_status_text() {
if systemctl --user is-active --quiet "$(service_unit_name)"; then
echo "运行中"
systemctl --user show "$(service_unit_name)" --property MainPID --value 2>/dev/null | awk '{print "进程号:" $1}'
else
echo "未运行"
fi
}
systemd_user_service_logs() {
journalctl --user -u "$(service_unit_name)" -n 200 --no-pager 2>/dev/null || {
echo "未获取到用户级 systemd 服务日志"
return 0
}
}
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
install_systemd_entry() {
local unit_file
unit_file="/etc/systemd/system/$(service_unit_name)"
cat > "$unit_file" <<EOF
[Unit]
Description=clash-for-linux
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/usr/local/bin/clashctl start-direct
ExecStop=/usr/local/bin/clashctl stop-direct
ExecReload=/usr/local/bin/clashctl restart-direct
PIDFile=$RUNTIME_DIR/mihomo.pid
WorkingDirectory=$PROJECT_DIR
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable "$(service_unit_name)" >/dev/null 2>&1 || true
write_runtime_value "RUNTIME_BACKEND" "systemd"
write_runtime_value "INSTALL_SCOPE" "$INSTALL_SCOPE"
}
remove_systemd_entry() {
local unit_file
unit_file="/etc/systemd/system/$(service_unit_name)"
if [ -f "$unit_file" ]; then
systemctl disable "$(service_unit_name)" >/dev/null 2>&1 || true
rm -f "$unit_file"
systemctl daemon-reload || true
success "已删除 systemd 服务:$(service_unit_name)"
fi
}
systemd_service_start() {
systemctl start "$(service_unit_name)"
}
systemd_service_stop() {
systemctl stop "$(service_unit_name)" >/dev/null 2>&1 || true
}
systemd_service_restart() {
systemctl restart "$(service_unit_name)"
}
systemd_service_status_text() {
if systemctl is-active --quiet "$(service_unit_name)"; then
echo "运行中"
systemctl show "$(service_unit_name)" --property MainPID --value 2>/dev/null | awk '{print "进程号:" $1}'
else
echo "未运行"
fi
}
systemd_service_logs() {
journalctl -u "$(service_unit_name)" -n 200 --no-pager 2>/dev/null || {
echo "未获取到 systemd 服务日志"
return 0
}
}
-71
View File
@@ -1,71 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SERVICE_NAME="clash-for-linux"
UNIT_PATH="/etc/systemd/system/${SERVICE_NAME}.service"
SERVICE_USER="${CLASH_SERVICE_USER:-root}"
SERVICE_GROUP="${CLASH_SERVICE_GROUP:-root}"
RUNTIME_DIR="$PROJECT_DIR/runtime"
LOG_DIR="$PROJECT_DIR/logs"
CONFIG_DIR="$PROJECT_DIR/config"
if [ "$(id -u)" -ne 0 ]; then
ui_error "安装 systemd 服务需要 root 权限" >&2
exit 1
fi
install -d -m 0755 "$RUNTIME_DIR" "$LOG_DIR" "$CONFIG_DIR" "$CONFIG_DIR/mixin.d"
cat >"$UNIT_PATH" <<EOF
[Unit]
Description=Clash for Linux (Mihomo)
Documentation=https://github.com/wnlen/clash-for-linux
After=network-online.target nss-lookup.target
Wants=network-online.target
StartLimitIntervalSec=0
StartLimitBurst=10
[Service]
Type=simple
User=${SERVICE_USER}
Group=${SERVICE_GROUP}
WorkingDirectory=${PROJECT_DIR}
Environment=HOME=/root
ExecStart=${PROJECT_DIR}/scripts/run_clash.sh --foreground
ExecStop=${PROJECT_DIR}/clashctl --from-systemd stop
ExecReload=${PROJECT_DIR}/clashctl restart
PIDFile=${PROJECT_DIR}/runtime/clash.pid
Restart=always
RestartSec=5s
KillMode=mixed
TimeoutStartSec=120
TimeoutStopSec=30
StandardOutput=journal
StandardError=journal
UMask=0022
NoNewPrivileges=false
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable "${SERVICE_NAME}.service" >/dev/null 2>&1 || true
# ui_ok "服务已注册,可通过 clashctl 管理"
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
exec "$PROJECT_DIR/clashctl" logs "$@"
-140
View File
@@ -1,140 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PORT_CHECK_WARNED=${PORT_CHECK_WARNED:-0}
# =========================
# 判断端口是否被占用(更稳)
# =========================
is_port_in_use() {
local port="$1"
if command -v ss >/dev/null 2>&1; then
ss -lnt 2>/dev/null | awk '{print $4}' | grep -E "[:.]${port}$" >/dev/null 2>&1
return $?
fi
if command -v netstat >/dev/null 2>&1; then
netstat -lnt 2>/dev/null | awk '{print $4}' | grep -E "[:.]${port}$" >/dev/null 2>&1
return $?
fi
if command -v lsof >/dev/null 2>&1; then
lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | awk '{print $9}' | grep -E "[:.]${port}$" >/dev/null 2>&1
return $?
fi
if [ "$PORT_CHECK_WARNED" -eq 0 ]; then
ui_warn "未检测到端口检查工具(ss/netstat/lsof)" >&2
PORT_CHECK_WARNED=1
fi
return 1
}
# =========================
# 找可用端口(优化版)
# =========================
find_available_port() {
local start="${1:-20000}"
local end="${2:-65000}"
local port
# 优先随机尝试
if command -v shuf >/dev/null 2>&1; then
for _ in {1..30}; do
port=$(shuf -i "${start}-${end}" -n 1)
if ! is_port_in_use "$port"; then
echo "$port"
return 0
fi
done
fi
# fallback 顺序扫描(限制范围避免慢)
for port in $(seq "$start" "$((start + 2000))"); do
if ! is_port_in_use "$port"; then
echo "$port"
return 0
fi
done
return 1
}
# =========================
# 解析端口值(核心函数)
# =========================
resolve_port_value() {
local name="$1"
local value="$2"
local resolved
# auto / 空
if [ -z "$value" ] || [ "$value" = "auto" ]; then
resolved=$(find_available_port) || {
ui_error "${name} 端口分配失败" >&2
return 1
}
ui_warn "${name} 自动分配端口: ${resolved}" >&2
echo "$resolved"
return 0
fi
# 非数字
if ! [[ "$value" =~ ^[0-9]+$ ]]; then
ui_error "非法端口: $value" >&2
return 1
fi
# 被占用 → 自动替换
if is_port_in_use "$value"; then
resolved=$(find_available_port)
if [ -n "$resolved" ]; then
ui_warn "${name} 端口 ${value} 已被占用,已切换为 ${resolved}" >&2
echo "$resolved"
return 0
fi
fi
echo "$value"
}
# =========================
# 解析 host:port
# =========================
resolve_host_port() {
local name="$1"
local raw="$2"
local default_host="$3"
local host
local port
if [ -z "$raw" ] || [ "$raw" = "auto" ]; then
host="$default_host"
port="auto"
else
if [[ "$raw" == *:* ]]; then
host="${raw%:*}"
port="${raw##*:}"
else
host="$default_host"
port="$raw"
fi
fi
# host 兜底
[ -z "$host" ] && host="$default_host"
port=$(resolve_port_value "$name" "$port") || return 1
echo "${host}:${port}"
}
-221
View File
@@ -1,221 +0,0 @@
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
resolve_clash_arch() {
local raw_arch="$1"
case "$raw_arch" in
x86_64|amd64) echo "linux-amd64" ;;
aarch64|arm64) echo "linux-arm64" ;;
armv7*|armv7l) echo "linux-armv7" ;;
*) echo "linux-${raw_arch}" ;;
esac
}
get_latest_mihomo_version() {
local url="https://api.github.com/repos/MetaCubeX/mihomo/releases/latest"
if command -v curl >/dev/null 2>&1; then
curl -fsSL "$url" \
| grep '"tag_name"' \
| sed -E 's/.*"([^"]+)".*/\1/' \
| head -n 1
elif command -v wget >/dev/null 2>&1; then
wget -qO- "$url" \
| grep '"tag_name"' \
| sed -E 's/.*"([^"]+)".*/\1/' \
| head -n 1
fi
}
download_clash_bin() {
local server_dir="$1"
local detected_arch="$2"
local resolved_arch
local version
local download_url
local download_target
local archive_file
local tmp_bin
resolved_arch="$(resolve_clash_arch "$detected_arch")"
if [ -z "$resolved_arch" ]; then
ui_warn "无法识别 CPU 架构" >&2
return 1
fi
version="${MIHOMO_VERSION:-}"
if [ -z "$version" ]; then
version="$(get_latest_mihomo_version || true)"
fi
if [ -z "$version" ]; then
ui_error "无法获取 Mihomo 版本" >&2
return 1
fi
if [ -z "${CLASH_DOWNLOAD_URL_TEMPLATE:-}" ]; then
ui_error "CLASH_DOWNLOAD_URL_TEMPLATE 未设置" >&2
return 1
fi
download_url="${CLASH_DOWNLOAD_URL_TEMPLATE//\{arch\}/${resolved_arch}}"
download_url="${download_url//\{version\}/${version}}"
download_target="${server_dir}/bin/clash-${resolved_arch}"
archive_file="${server_dir}/runtime/.clash_download.tmp"
tmp_bin="${server_dir}/runtime/.clash_bin.tmp"
mkdir -p "${server_dir}/bin" "${server_dir}/runtime"
rm -f "$archive_file" "$tmp_bin"
ui_info "downloading: $download_url"
# =========================
# 下载
# =========================
if command -v curl >/dev/null 2>&1; then
if ! curl -fL -sS -o "$archive_file" "$download_url"; then
ui_error "下载失败: $download_url" >&2
return 1
fi
elif command -v wget >/dev/null 2>&1; then
if ! wget -q -O "$archive_file" "$download_url"; then
ui_error "下载失败: $download_url" >&2
return 1
fi
else
ui_error "未找到 curl 或 wget" >&2
return 1
fi
# =========================
# 基础校验(防 404 / HTML)
# =========================
if [ ! -s "$archive_file" ]; then
ui_error "下载文件为空" >&2
return 1
fi
if head -c 200 "$archive_file" | grep -qiE "not found|html"; then
ui_error "下载内容疑似错误页面(404/HTML)" >&2
return 1
fi
# =========================
# 解压 / 直写
# =========================
if gzip -t "$archive_file" >/dev/null 2>&1; then
if ! gzip -dc "$archive_file" > "$tmp_bin"; then
ui_error "gzip 解压失败" >&2
return 1
fi
else
cp "$archive_file" "$tmp_bin"
fi
# =========================
# ELF 校验(关键)
# =========================
if ! file "$tmp_bin" | grep -q "ELF"; then
ui_error "非有效 ELF 二进制" >&2
echo "[DEBUG] file result: $(file "$tmp_bin")" >&2
return 1
fi
chmod +x "$tmp_bin"
mv "$tmp_bin" "$download_target"
rm -f "$archive_file"
ui_ok "downloaded: $download_target"
echo "$download_target"
}
resolve_clash_bin() {
local server_dir="$1"
local detected_arch="$2"
local resolved_arch
local candidates=()
local candidate
local downloaded_bin
local mode
if [ -n "${CLASH_BIN:-}" ]; then
if [ -x "$CLASH_BIN" ]; then
echo "$CLASH_BIN"
return 0
fi
ui_error "CLASH_BIN 不可执行: $CLASH_BIN" >&2
return 1
fi
resolved_arch="$(resolve_clash_arch "$detected_arch")"
if [ -n "$resolved_arch" ]; then
candidates+=("${server_dir}/bin/clash-${resolved_arch}")
fi
candidates+=(
"${server_dir}/bin/clash-${detected_arch}"
"${server_dir}/bin/clash"
)
mode="${CLASH_AUTO_DOWNLOAD:-auto}"
case "$mode" in
false)
for candidate in "${candidates[@]}"; do
if [ -x "$candidate" ]; then
echo "$candidate"
return 0
fi
done
;;
auto)
for candidate in "${candidates[@]}"; do
if [ -x "$candidate" ]; then
echo "$candidate"
return 0
fi
done
if downloaded_bin="$(download_clash_bin "$server_dir" "$detected_arch")"; then
echo "$downloaded_bin"
return 0
fi
;;
true)
if downloaded_bin="$(download_clash_bin "$server_dir" "$detected_arch")"; then
echo "$downloaded_bin"
return 0
fi
for candidate in "${candidates[@]}"; do
if [ -x "$candidate" ]; then
echo "$candidate"
return 0
fi
done
;;
*)
ui_error "CLASH_AUTO_DOWNLOAD 非法值: $mode" >&2
return 1
;;
esac
ui_error "未找到可用 Mihomo 内核" >&2
echo "请放入: ${server_dir}/bin/" >&2
return 1
}
-191
View File
@@ -1,191 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
# 作用:
# - 根据 OS/ARCH 选择 tools/subconverter/<platform>/subconverter
# - 生成稳定入口 tools/subconverter/subconverter(优先软链接,失败则复制)
# -(可选)以守护进程模式启动本地 subconverter(HTTP 服务)
# - 导出统一变量供后续脚本使用:
# SUBCONVERTER_BIN / SUBCONVERTER_READY / SUBCONVERTER_URL
#
# 设计原则:
# - 永不 exit 1(不可用时标记 Ready=false,主流程继续)
# - 不阻塞 start.sh(快速启动,不等待健康检查)
Server_Dir="${Server_Dir:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
Temp_Dir="${Temp_Dir:-$Server_Dir/temp}"
mkdir -p "$Temp_Dir"
SC_DIR="$Server_Dir/tools/subconverter"
SC_LINK="$SC_DIR/subconverter" # 稳定入口(统一调用路径)
Subconverter_Bin="$SC_LINK"
Subconverter_Ready=false
# 配置项(可写入 .env)
SUBCONVERTER_MODE="${SUBCONVERTER_MODE:-daemon}" # daemon | off
SUBCONVERTER_HOST="${SUBCONVERTER_HOST:-127.0.0.1}"
SUBCONVERTER_PORT="${SUBCONVERTER_PORT:-25500}"
SUBCONVERTER_URL="${SUBCONVERTER_URL:-http://${SUBCONVERTER_HOST}:${SUBCONVERTER_PORT}}"
# pref.ini:不存在则从示例生成
SUBCONVERTER_PREF="${SUBCONVERTER_PREF:-$SC_DIR/pref.ini}"
PREF_EXAMPLE_INI="$SC_DIR/pref.example.ini"
PID_FILE="$Temp_Dir/subconverter.pid"
detect_os() {
local u
u="$(uname -s | tr '[:upper:]' '[:lower:]')"
case "$u" in
linux*) echo "linux" ;;
*) echo "unsupported" ;;
esac
}
detect_arch() {
local m
m="$(uname -m | tr '[:upper:]' '[:lower:]')"
case "$m" in
x86_64|amd64) echo "amd64" ;;
aarch64|arm64) echo "arm64" ;;
armv7l|armv7) echo "armv7" ;;
*) echo "unknown" ;;
esac
}
pick_platform_bin() {
local os="$1" arch="$2"
local p="$SC_DIR/${os}-${arch}/subconverter"
if [ -f "$p" ]; then
echo "$p"
return 0
fi
echo ""
return 0
}
make_stable_link_or_copy() {
local src="$1"
# 确保可执行
chmod +x "$src" 2>/dev/null || true
# 清理旧入口
rm -f "$SC_LINK" 2>/dev/null || true
# 优先创建软链接,失败则复制
if ln -s "$src" "$SC_LINK" 2>/dev/null; then
:
else
cp -f "$src" "$SC_LINK" 2>/dev/null || return 1
chmod +x "$SC_LINK" 2>/dev/null || true
fi
return 0
}
is_port_listening() {
local port="$1"
if command -v ss >/dev/null 2>&1; then
ss -lnt | awk '{print $4}' | grep -q ":${port}\$" && return 0
fi
# 无检测工具则不判断
return 1
}
main() {
# 0) 用户主动关闭
if [ "$SUBCONVERTER_MODE" = "off" ]; then
Subconverter_Ready=false
export Subconverter_Bin Subconverter_Ready SUBCONVERTER_BIN SUBCONVERTER_READY SUBCONVERTER_URL
true
return 0
fi
# 1) 选择平台二进制
local os arch platform_bin
os="$(detect_os)"
arch="$(detect_arch)"
if [ "$os" = "unsupported" ]; then
ui_warn "不支持的操作系统: $(uname -s),跳过 subconverter"
Subconverter_Ready=false
export Subconverter_Bin Subconverter_Ready SUBCONVERTER_BIN SUBCONVERTER_READY SUBCONVERTER_URL
true
return 0
fi
if [ "$arch" = "unknown" ]; then
ui_warn "不支持的架构: $(uname -m),跳过 subconverter"
Subconverter_Ready=false
export Subconverter_Bin Subconverter_Ready SUBCONVERTER_BIN SUBCONVERTER_READY SUBCONVERTER_URL
true
return 0
fi
platform_bin="$(pick_platform_bin "$os" "$arch")"
if [ -z "$platform_bin" ]; then
ui_warn "未找到 subconverter 二进制: $SC_DIR/${os}-${arch}/subconverter"
Subconverter_Ready=false
export Subconverter_Bin Subconverter_Ready SUBCONVERTER_BIN SUBCONVERTER_READY SUBCONVERTER_URL
true
return 0
fi
# 2) 创建稳定入口
if ! make_stable_link_or_copy "$platform_bin"; then
ui_warn "创建稳定入口失败: $SC_LINK"
Subconverter_Ready=false
export Subconverter_Bin Subconverter_Ready SUBCONVERTER_BIN SUBCONVERTER_READY SUBCONVERTER_URL
true
return 0
fi
Subconverter_Bin="$SC_LINK"
Subconverter_Ready=true
ui_info "已解析平台二进制: ${os}-${arch} -> $Subconverter_Bin"
# 3) 生成 pref.ini(仅 daemon 模式)
if [ "$Subconverter_Ready" = "true" ] && [ "$SUBCONVERTER_MODE" = "daemon" ]; then
if [ ! -f "$SUBCONVERTER_PREF" ] && [ -f "$PREF_EXAMPLE_INI" ]; then
cp -f "$PREF_EXAMPLE_INI" "$SUBCONVERTER_PREF"
fi
fi
# 4) 启动 daemon
if [ "$Subconverter_Ready" = "true" ] && [ "$SUBCONVERTER_MODE" = "daemon" ]; then
if [ -f "$PID_FILE" ] && kill -0 "$(cat "$PID_FILE" 2>/dev/null)" 2>/dev/null; then
:
else
if is_port_listening "$SUBCONVERTER_PORT"; then
:
else
(
cd "$SC_DIR"
nohup "$Subconverter_Bin" -f "$SUBCONVERTER_PREF" >/dev/null 2>&1 &
echo $! > "$PID_FILE"
)
sleep 0.2
fi
fi
fi
# 5) 导出变量
export Subconverter_Bin
export Subconverter_Ready
export SUBCONVERTER_BIN="$Subconverter_Bin"
export SUBCONVERTER_READY="$Subconverter_Ready"
export SUBCONVERTER_URL
true
}
main "$@"
-114
View File
@@ -1,114 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RUNTIME_DIR="$PROJECT_DIR/runtime"
LOG_DIR="$PROJECT_DIR/logs"
CONFIG_FILE="$RUNTIME_DIR/config.yaml"
PID_FILE="$RUNTIME_DIR/clash.pid"
mkdir -p "$RUNTIME_DIR" "$LOG_DIR"
FOREGROUND=false
DAEMON=false
# =========================
# 参数解析
# =========================
for arg in "$@"; do
case "$arg" in
--foreground) FOREGROUND=true ;;
--daemon) DAEMON=true ;;
*)
ui_error "未知参数: $arg" >&2
exit 2
;;
esac
done
if [ "$FOREGROUND" = true ] && [ "$DAEMON" = true ]; then
ui_error "不能同时使用 --foreground 和 --daemon" >&2
exit 2
fi
if [ "$FOREGROUND" = false ] && [ "$DAEMON" = false ]; then
ui_error "必须指定 --foreground 或 --daemon" >&2
exit 2
fi
# =========================
# 基础校验
# =========================
if [ ! -s "$CONFIG_FILE" ]; then
ui_error "未找到运行配置文件: $CONFIG_FILE" >&2
exit 2
fi
if grep -q '\${' "$CONFIG_FILE"; then
ui_error "配置文件存在未替换变量: $CONFIG_FILE" >&2
exit 2
fi
# =========================
# 加载依赖
# =========================
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/get_cpu_arch.sh"
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/resolve_clash.sh"
# shellcheck disable=SC1091
source "$PROJECT_DIR/scripts/service_lib.sh"
# =========================
# 获取二进制
# =========================
CLASH_BIN="$(resolve_clash_bin "$PROJECT_DIR" "${CpuArch:-}")"
if [ ! -x "$CLASH_BIN" ]; then
ui_error "Clash 二进制不可执行: $CLASH_BIN" >&2
exit 2
fi
# =========================
# 配置校验(仅执行一次)
# =========================
if ! "$CLASH_BIN" -t -f "$CONFIG_FILE" -d "$RUNTIME_DIR" >/dev/null 2>&1; then
ui_error "Clash 配置校验失败: $CONFIG_FILE" >&2
write_run_state "failed" "config-test"
exit 2
fi
# =========================
# 前台模式(systemd)
# =========================
if [ "$FOREGROUND" = true ]; then
write_run_state "running" "systemd"
exec "$CLASH_BIN" -f "$CONFIG_FILE" -d "$RUNTIME_DIR"
fi
# =========================
# 后台模式(脚本)
# =========================
cleanup_dead_pid
if is_script_running; then
pid="$(read_pid 2>/dev/null || true)"
ui_info "Clash 已在运行,pid=${pid:-未知}"
exit 0
fi
nohup "$CLASH_BIN" -f "$CONFIG_FILE" -d "$RUNTIME_DIR" >>"$LOG_DIR/clash.log" 2>&1 &
pid=$!
echo "$pid" > "$PID_FILE"
write_run_state "running" "script" "$pid"
echo "[SUCCESS] 已以脚本模式启动 Clash,pid=$pid"
-170
View File
@@ -1,170 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RUNTIME_DIR="$PROJECT_DIR/runtime"
PID_FILE="$RUNTIME_DIR/clash.pid"
STATE_FILE="$RUNTIME_DIR/state.env"
SERVICE_NAME="clash-for-linux.service"
mkdir -p "$RUNTIME_DIR"
# =========================
# 基础能力
# =========================
has_systemd() {
command -v systemctl >/dev/null 2>&1
}
service_unit_exists() {
has_systemd || return 1
systemctl show "$SERVICE_NAME" -p LoadState --value 2>/dev/null | grep -q '^loaded$'
}
read_pid() {
[ -s "$PID_FILE" ] || return 1
tr -d '[:space:]' < "$PID_FILE"
}
is_pid_running() {
local pid="$1"
[ -n "$pid" ] && kill -0 "$pid" 2>/dev/null
}
is_script_running() {
local pid
pid="$(read_pid 2>/dev/null || true)"
is_pid_running "$pid"
}
# =========================
# 清理僵尸 PID(关键)
# =========================
cleanup_dead_pid() {
local pid
pid="$(read_pid 2>/dev/null || true)"
if [ -n "${pid:-}" ] && ! is_pid_running "$pid"; then
rm -f "$PID_FILE"
fi
}
# =========================
# 模式检测(统一)
# =========================
systemd_available() {
command -v systemctl >/dev/null 2>&1 && [ -d /run/systemd/system ]
}
detect_mode() {
cleanup_dead_pid
if service_unit_exists && systemd_available && systemctl is-active --quiet "$SERVICE_NAME"; then
echo "systemd"
elif is_script_running; then
echo "script"
elif service_unit_exists && systemd_available; then
echo "systemd-installed"
else
echo "none"
fi
}
# =========================
# state 写入(唯一实现)
# =========================
write_state_kv() {
local key="$1"
local value="$2"
mkdir -p "$RUNTIME_DIR"
touch "$STATE_FILE"
if grep -q "^${key}=" "$STATE_FILE" 2>/dev/null; then
sed -i "s|^${key}=.*|${key}=${value}|" "$STATE_FILE"
else
echo "${key}=${value}" >> "$STATE_FILE"
fi
}
write_run_state() {
local status="${1:-unknown}"
local mode="${2:-unknown}"
local pid="${3:-}"
write_state_kv "LAST_RUN_STATUS" "$status"
write_state_kv "LAST_RUN_MODE" "$mode"
write_state_kv "LAST_RUN_AT" "$(date -Iseconds)"
if [ -n "$pid" ]; then
write_state_kv "LAST_RUN_PID" "$pid"
fi
}
# =========================
# systemd 模式
# =========================
start_via_systemd() {
systemctl start "$SERVICE_NAME"
}
stop_via_systemd() {
systemctl stop "$SERVICE_NAME" || true
cleanup_dead_pid
write_run_state "stopped" "systemd"
}
restart_via_systemd() {
systemctl restart "$SERVICE_NAME"
}
# =========================
# script 模式
# =========================
start_via_script() {
cleanup_dead_pid
if is_script_running; then
ui_info "clash already running (script)"
return 0
fi
"$PROJECT_DIR/scripts/run_clash.sh" --daemon
}
stop_via_script() {
local pid
pid="$(read_pid 2>/dev/null || true)"
if [ -n "${pid:-}" ] && is_pid_running "$pid"; then
ui_info "stopping clash pid=$pid"
kill "$pid" 2>/dev/null || true
for _ in 1 2 3 4 5; do
if ! is_pid_running "$pid"; then
break
fi
sleep 1
done
if is_pid_running "$pid"; then
kill -9 "$pid" 2>/dev/null || true
fi
fi
rm -f "$PID_FILE"
write_run_state "stopped" "script"
}
restart_via_script() {
stop_via_script || true
start_via_script
}
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
exec "$PROJECT_DIR/clashctl" status "$@"
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! declare -f ui_info >/dev/null 2>&1; then
# shellcheck source=scripts/ui.sh
source "$PROJECT_DIR/scripts/ui.sh"
fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
exec "$PROJECT_DIR/clashctl" stop "$@"
-465
View File
@@ -1,465 +0,0 @@
#!/usr/bin/env bash
# ============================================
# clashctl UI library (scripts/ui.sh)
# 用户优先版:清晰、稳健、兼容、可读
# ============================================
# ---------- env ----------
: "${CLASHCTL_ASCII:=0}"
: "${UI_WIDTH:=0}"
# ---------- color ----------
if [ -t 1 ] && [ -z "${NO_COLOR:-}" ]; then
C_RESET=$'\033[0m'
C_BOLD=$'\033[1m'
C_DIM=$'\033[2m'
C_RED=$'\033[31m'
C_GREEN=$'\033[32m'
C_YELLOW=$'\033[33m'
C_BLUE=$'\033[34m'
C_CYAN=$'\033[36m'
else
C_RESET=''
C_BOLD=''
C_DIM=''
C_RED=''
C_GREEN=''
C_YELLOW=''
C_BLUE=''
C_CYAN=''
fi
# ---------- unicode / ascii fallback ----------
_ui_is_utf8() {
case "${LC_ALL:-${LC_CTYPE:-${LANG:-}}}" in
*UTF-8*|*utf8*) return 0 ;;
*) return 1 ;;
esac
}
if [ "$CLASHCTL_ASCII" = "1" ] || ! _ui_is_utf8; then
UI_ASCII=1
ICON_INFO="i"
ICON_OK="OK"
ICON_WARN="!!"
ICON_ERR="XX"
ICON_ARROW=">"
ICON_DOT="-"
BOX_TL="+"
BOX_TR="+"
BOX_BL="+"
BOX_BR="+"
BOX_H="-"
BOX_V="|"
BOX_JL="+"
BOX_JR="+"
else
UI_ASCII=0
ICON_INFO="ℹ"
ICON_OK="✔"
ICON_WARN="⚠"
ICON_ERR="✖"
ICON_ARROW="→"
ICON_DOT="•"
BOX_TL="╔"
BOX_TR="╗"
BOX_BL="╚"
BOX_BR="╝"
BOX_H="═"
BOX_V="║"
BOX_JL="╠"
BOX_JR="╣"
fi
TAG_INFO="${C_BLUE}${ICON_INFO}${C_RESET}"
TAG_OK="${C_GREEN}${ICON_OK}${C_RESET}"
TAG_WARN="${C_YELLOW}${ICON_WARN}${C_RESET}"
TAG_ERR="${C_RED}${ICON_ERR}${C_RESET}"
# ---------- width ----------
_ui_term_width() {
local cols=""
if command -v tput >/dev/null 2>&1; then
cols="$(tput cols 2>/dev/null || true)"
fi
if [ -z "${cols:-}" ] && [ -n "${COLUMNS:-}" ]; then
cols="$COLUMNS"
fi
if [ -z "${cols:-}" ] || ! [ "$cols" -gt 0 ] 2>/dev/null; then
cols=80
fi
printf '%s\n' "$cols"
}
_ui_resolve_width() {
local cols width
cols="$(_ui_term_width)"
if [ "${UI_WIDTH:-0}" -gt 0 ] 2>/dev/null; then
width="$UI_WIDTH"
else
width=$((cols - 2))
fi
# 最小 56,最大 88,避免过窄/过宽
[ "$width" -lt 56 ] && width=56
[ "$width" -gt 88 ] && width=88
printf '%s\n' "$width"
}
_ui_get_width() {
printf '%s\n' "$(_ui_resolve_width)"
}
_ui_summary_inner_width() {
echo $(( $(_ui_get_width) - 2 ))
}
_ui_display_width() {
python3 - "$1" <<'PY'
import sys
import unicodedata
import re
# 去掉 ANSI 颜色控制符
s = re.sub(r'\x1b\[[0-9;]*m', '', sys.argv[1])
w = 0
for ch in s:
if unicodedata.combining(ch):
continue
ea = unicodedata.east_asian_width(ch)
if ea in ("F", "W"):
w += 2
else:
w += 1
print(w)
PY
}
_ui_pad_right() {
local text="$1"
local width="$2"
local w pad
w="$(_ui_display_width "$text")"
pad=$((width - w))
[ "$pad" -lt 0 ] && pad=0
printf '%s' "$text"
printf '%*s' "$pad" ''
}
# ---------- helpers ----------
ui_repeat() {
local ch="$1"
local n="$2"
local out=""
local i
[ "$n" -le 0 ] && return 0
for ((i=0; i<n; i++)); do
out+="$ch"
done
printf '%s' "$out"
}
ui_blank() {
printf '\n'
}
ui_line() {
local width
width="$(_ui_get_width)"
ui_repeat "-" "$width"
printf '\n'
}
_ui_section_title() {
local text="$1"
printf '%b%s%b\n' "$C_BOLD" "$text" "$C_RESET"
}
ui_header() {
local title="$1"
local width
width="$(_ui_get_width)"
ui_repeat "=" "$width"
printf '\n'
printf ' %b%s%b\n' "$C_BOLD" "$title" "$C_RESET"
ui_repeat "=" "$width"
printf '\n'
}
ui_subheader() {
local text="$1"
_ui_section_title "$text"
}
ui_info() {
printf '%b %s\n' "$TAG_INFO" "$*"
}
ui_ok() {
printf '%b %s\n' "$TAG_OK" "$*"
}
ui_warn() {
printf '%b %s\n' "$TAG_WARN" "$*"
}
ui_error() {
printf '%b %s\n' "$TAG_ERR" "$*"
}
ui_kv() {
local key="$1"
local value="$2"
printf ' %-14s : %s\n' "$key" "$value"
}
# ---------- text wrap ----------
_ui_wrap_print() {
local indent="$1"
local width="$2"
local text="$3"
local avail rest chunk
[ -z "$text" ] && {
printf '%s\n' "$indent"
return 0
}
avail=$((width - ${#indent}))
[ "$avail" -le 8 ] && avail=8
rest="$text"
while [ -n "$rest" ]; do
if [ "${#rest}" -le "$avail" ]; then
printf '%s%s\n' "$indent" "$rest"
break
fi
chunk="${rest:0:$avail}"
printf '%s%s\n' "$indent" "$chunk"
rest="${rest:$avail}"
done
}
# ---------- summary box ----------
__ui_summary_title=""
__ui_summary_rows=()
ui_summary_begin() {
__ui_summary_title="${1:-摘要}"
__ui_summary_rows=()
}
ui_summary_row() {
local key="$1"
local value="$2"
if [ -n "${value:-}" ]; then
__ui_summary_rows+=("${key} : ${value}")
else
__ui_summary_rows+=("${key} :")
fi
}
ui_summary_end() {
local max_len=0
local line len
local inner_width border_width
# 标题长度(注意这里把左右空格也算进去)
len="$(_ui_display_width " $__ui_summary_title ")"
[ "$len" -gt "$max_len" ] && max_len="$len"
# 行内容长度(同样把左右空格算进去)
for line in "${__ui_summary_rows[@]}"; do
len="$(_ui_display_width " $line ")"
[ "$len" -gt "$max_len" ] && max_len="$len"
done
# 最小宽度,避免太窄
[ "$max_len" -lt 24 ] && max_len=24
# 不超过终端允许宽度
inner_width="$(_ui_summary_inner_width)"
[ "$max_len" -gt "$inner_width" ] && max_len="$inner_width"
border_width="$max_len"
# 顶部
printf '%s' "$BOX_TL"
ui_repeat "$BOX_H" "$border_width"
printf '%s\n' "$BOX_TR"
# 标题
printf '%s' "$BOX_V"
_ui_pad_center " $__ui_summary_title " "$border_width"
printf '%s\n' "$BOX_V"
# 分隔线
printf '%s' "$BOX_JL"
ui_repeat "$BOX_H" "$border_width"
printf '%s\n' "$BOX_JR"
# 上 padding 空行
printf '%s' "$BOX_V"
_ui_pad_right "" "$border_width"
printf '%s\n' "$BOX_V"
# 内容
for line in "${__ui_summary_rows[@]}"; do
printf '%s' "$BOX_V"
_ui_pad_right " $line " "$border_width"
printf '%s\n' "$BOX_V"
done
# 下 padding 空行
printf '%s' "$BOX_V"
_ui_pad_right "" "$border_width"
printf '%s\n' "$BOX_V"
# 底部
printf '%s' "$BOX_BL"
ui_repeat "$BOX_H" "$border_width"
printf '%s\n' "$BOX_BR"
}
_ui_pad_center() {
local text="$1"
local width="$2"
local len pad left right
len="$(_ui_display_width "$text")"
pad=$((width - len))
if [ "$pad" -le 0 ]; then
printf '%s' "$text"
return
fi
left=$((pad / 2))
right=$((pad - left))
printf '%*s%s%*s' "$left" '' "$text" "$right" ''
}
# ---------- section blocks ----------
ui_next() {
local item
ui_blank
ui_subheader "下一步"
for item in "$@"; do
[ -z "$item" ] && continue
printf ' %s %s\n' "$ICON_ARROW" "$item"
done
}
ui_fix_block() {
local reason="$1"
shift || true
ui_blank
ui_subheader "原因"
printf ' %s\n' "$reason"
if [ "$#" -gt 0 ]; then
ui_blank
ui_subheader "修复建议"
local item
for item in "$@"; do
[ -z "$item" ] && continue
printf ' %s %s\n' "$ICON_DOT" "$item"
done
fi
}
ui_debug_block() {
[ "$#" -eq 0 ] && return 0
ui_blank
ui_subheader "调试信息"
local item
for item in "$@"; do
[ -z "$item" ] && continue
printf ' %s\n' "$item"
done
}
ui_security_block() {
[ "$#" -eq 0 ] && return 0
ui_blank
ui_subheader "安全提示"
local item
for item in "$@"; do
[ -z "$item" ] && continue
printf ' %s %s\n' "$ICON_DOT" "$item"
done
}
# ---------- optional helpers ----------
ui_tip() {
local text="$1"
ui_info "$text"
}
ui_success_block() {
local title="${1:-操作成功}"
shift || true
ui_blank
ui_subheader "$title"
local item
for item in "$@"; do
[ -z "$item" ] && continue
printf ' %s %s\n' "$ICON_DOT" "$item"
done
}
ui_warn_block() {
local title="${1:-注意事项}"
shift || true
ui_blank
ui_subheader "$title"
local item
for item in "$@"; do
[ -z "$item" ] && continue
printf ' %s %s\n' "$ICON_DOT" "$item"
done
}
# ---------- exit helpers ----------
die() {
local msg="$1"
shift || true
ui_error "$msg"
exit 1
}
die_with_reason() {
local msg="$1"
local reason="$2"
shift 2 || true
ui_error "$msg"
ui_fix_block "$reason" "$@"
exit 1
}
-5
View File
@@ -1,5 +0,0 @@
CLASH_HOME=/opt/clash-for-linux
# 可选:自定义 PID 文件路径
# CLASH_PID_FILE=/opt/clash-for-linux/temp/clash.pid
# 可选:自定义 Clash 二进制路径
# CLASH_BIN=/opt/clash-for-linux/bin/clash-linux-amd64
-33
View File
@@ -1,33 +0,0 @@
[Unit]
Description=Clash for Linux (Mihomo)
Documentation=https://github.com/wnlen/clash-for-linux
After=network-online.target nss-lookup.target
Wants=network-online.target
StartLimitIntervalSec=0
StartLimitBurst=10
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/clash-for-linux
Environment=HOME=/root
ExecStart=/bin/bash /opt/clash-for-linux/clashctl start
ExecStop=/bin/bash /opt/clash-for-linux/clashctl --from-systemd stop
Restart=always
RestartSec=5s
KillMode=mixed
TimeoutStartSec=120
TimeoutStopSec=30
StandardOutput=journal
StandardError=journal
UMask=0022
NoNewPrivileges=false
[Install]
WantedBy=multi-user.target
@@ -1,805 +0,0 @@
#---------------------------------------------------#
## 配置文件需要放置在 $HOME/.config/clash/config.yml
## 或者运行目录下的config.yml
#---------------------------------------------------#
# HTTP 代理端口
port: 7890
# SOCKS5 代理端口
socks-port: 7891
# Linux 和 macOS 的 redir 代理端口 (如需使用此功能,请取消注释)
# redir-port: 7892
# 允许局域网的连接(可用来共享代理)
allow-lan: true
# 仅在将allow-lan设置为true时适用
# #"*": 绑定所有IP地址
# #192.168.122.11: 绑定单个IPv4地址
# #"[aaaa::a8aa:ff:fe09:57d8]": 绑定单个IPv6地址
# bind-address: "*"
# 规则模式:Rule(规则) / Global(全局代理)/ Direct(全局直连)
mode: Rule
# 设置日志输出级别 (默认级别:silent,即不输出任何内容,以避免因日志内容过大而导致程序内存溢出)。
# 5 个级别:silent / error / warning / info / debug。级别越高日志输出量越大,越倾向于调试,若需要请自行开启。
log-level: info
# Clash 的 RESTful API
external-controller: '127.0.0.1:9090'
# 您可以将静态网页资源(如 clash-dashboard)放置在一个目录中,clash 将会服务于 `RESTful API/ui`
# 参数应填写配置目录的相对路径或绝对路径。
# http://127.0.0.1:9090/ui/#/
# external-ui: folder
# yacd面板: https://github.com/haishanh/yacd
# Razord面板:http://clash.razord.top/#/proxies
# external-ui: dashboard
# RESTful API 的口令 (可选)
# secret: ""
# 实验性功能
experimental:
ignore-resolve-fail: true # 忽略 DNS 解析失败,默认值为 true
# interface-name: en0 # outbound interface name
# 本地 SOCKS5 / HTTP(S) 服务认证
# authentication:
# - "user1:pass1"
# - "user2:pass2"
# 实验性功能 hosts, 支持通配符 (例如 *.clash.dev 甚至 *.foo.*.example.com)
# 静态的域名 比 通配域名 具有更高的优先级 (foo.example.com 优先于 *.example.com)
# 注意: hosts 在 fake-ip 模式下不生效
#hosts:
# '*.clash.dev': 127.0.0.1
# 'alpha.clash.dev': '::1'
#dns:
#enable: true # 是否启用dns false
#ipv6: false
#listen: 0.0.0.0:53
#enhanced-mode: redir-host # 模式:redir-host或fake-ip
#fake-ip-range: 198.18.0.1/16 #
#fake-ip-filter: # fake ip 白名单列表,如果你不知道这个参数的作用,请勿修改
#- '*.lan'
#- localhost.ptlogin2.qq.com
#nameserver:
#- 223.5.5.5 # 阿里DNS
#- 180.76.76.76 # 百度DNS
#- 119.29.29.29 # 腾讯DNS
#- 117.50.11.11 # ONE DNS拦截版 恶意网站拦截、广告过滤
#- 117.50.10.10 # ONE DNS纯净版 直接返回其真实的响应结果
#- 114.114.114.114 # 114DNS
#fallback:
#- 8.8.8.8 # 谷歌DNS
#- 1.1.1.1 # Cloudflare DNS
#- tls://dns.rubyfish.cn:853
#- tls://1.0.0.1:853
#- tls://dns.google:853
#- https://dns.rubyfish.cn/dns-query
#- https://cloudflare-dns.com/dns-query
#- https://dns.google/dns-query
#fallback-filter:
#geoip: true # 默认
#ipcidr: # 在这个网段内的 IP 地址会被考虑为被污染的 IP
#- 240.0.0.0/4
# 1. clash DNS 请求逻辑:
# (1) 当访问一个域名时, nameserver 与 fallback 列表内的所有服务器并发请求,得到域名对应的 IP 地址。
# (2) clash 将选取 nameserver 列表内,解析最快的结果。
# (3) 若解析结果中,IP 地址属于 国外,那么 clash 将选择 fallback 列表内,解析最快的结果。
#
# 因此,我在 nameserver 和 fallback 内都放置了无污染、解析速度较快的国内 DNS 服务器,以达到最快的解析速度。
# 但是 fallback 列表内服务器会用在解析境外网站,为了结果绝对无污染,我仅保留了支持 DoT/DoH 的两个服务器。
#
# 2. clash DNS 配置注意事项:
# (1) 如果您为了确保 DNS 解析结果无污染,请仅保留列表内以 tls:// 或 https:// 开头的 DNS 服务器,但是通常对于国内域名没有必要。
# (2) 如果您不在乎可能解析到污染的结果,更加追求速度。请将 nameserver 列表的服务器插入至 fallback 列表内,并移除重复项。
#
# 3. 关于 DNS over HTTPS (DoH) 和 DNS over TLS (DoT) 的选择:
# 对于两项技术双方各执一词,而且会无休止的争论,各有利弊。各位请根据具体需求自行选择,但是配置文件内默认启用 DoT,因为目前国内没有封锁或管制。
# DoH: 以 https:// 开头的 DNS 服务器。拥有更好的伪装性,且几乎不可能被运营商或网络管理封锁,但查询效率和安全性可能略低。
# DoT: 以 tls:// 开头的 DNS 服务器。拥有更高的安全性和查询效率,但端口有可能被管制或封锁。
# 若要了解更多关于 DoH/DoT 相关技术,请自行查阅规范文档。
# 代理组
# 下面这3个不要引到订阅里去 要不会出错
# Will be ignored after profile selection
Proxy:
- name: Shadowsocks
type: socks5
server: 127.0.0.1
port: 1080
Proxy Group:
- name: Proxy
type: select
proxies:
- Shadowsocks
Rule:
- 'MATCH,DIRECT'
# Clash for Windows
# Proxies module latency test settings
cfw-latency-timeout: 3000
cfw-latency-url: http://www.gstatic.com/generate_204
# 打断连接
# Identify strategy of breaking connections after switching to a new proxy/profile/mode
# Options for proxy: none, chain(proxy group in connection chains), all
# Options for profile: true, false
# Options for mode: true, false
cfw-conn-break-strategy:
proxy: none # none/chain/all
profile: true # true/false
mode: false # true/false
# 定义状态栏图标
#cfw-tray-icon:
#default: .\resources\static\imgs\logo_64.png # 默认图标
#system-proxy-on: .\resources\static\imgs\custom.ico # 开启系统代理后图标
# 子进程
# Run child process after CFW started
# Refer: https://docs.cfw.lbyczf.com/contents/childprocess.html
#cfw-child-process:
# 启动订阅转换程序,端口号7893
#- command: "subconverter.exe" # run.cmd 程序名称 subconverter.exe -cfw >>logs/run.log 2>&1
#args:
#- "-cfw" # 运行参数1
#- "-f" # 运行参数2
#- "pref-acl4ssr.yml" # 运行参数3
#options:
#cwd: subconverter # 子进程工作目录
#detached: true # 子进程独立于其父进程运行
#shell: true # 则在 shell 中运行 command
#windowsHide: true # 隐藏子进程的控制台窗口
# 启动网易云,端口号3333
#- command: "unblockneteasemusic.exe" # 启动网易云
#args:
#- "-p" # 运行参数1
#- "3333" # 运行参数2
#options:
#cwd: unblockNeteaseMusic # 子进程工作目录
#detached: true # 子进程独立于其父进程运行
#shell: true # 则在 shell 中运行 command
#windowsHide: true # 隐藏子进程的控制台窗口
# 系统代理跳过列表 cfw-bypass
# System proxy will ignore these domains(or ipnet)
# 系统代理跳过列表-备份的,不起作用,
# 使用时可以将cfw-bypass-bak与cfw-bypass内容互换
cfw-bypass-bak:
# 原有字段不用删除
- qq.com
- 'music.163.com' # 网易云域名1
- '*.music.126.net' # 网易云域名2
- localhost
- 127.*
- 10.*
- 172.16.*
- 172.17.*
- 172.18.*
- 172.19.*
- 172.20.*
- 172.21.*
- 172.22.*
- 172.23.*
- 172.24.*
- 172.25.*
- 172.26.*
- 172.27.*
- 172.28.*
- 172.29.*
- 172.30.*
- 172.31.*
- 192.168.*
- <local>
# 系统代理跳过列表 起作用的
cfw-bypass:
# 直连列表
# MyList
- "*.423down.com"
- "*.bitwarden.com"
- "*.chaipip.com"
- "*.hrtsea.com"
- "*.laomo.me"
- "*.mpyit.com"
# CN域名直连
- "*.cn"
- "*.中国"
- "*.公司"
- "*.网络"
# 中国国内常见域名关键词直连
- "*-cn*"
- "*360buy*"
- "*alicdn*"
- "*alimama*"
- "*alipay*"
- "*appzapp*"
- "*baidupcs*"
- "*bilibili*"
- "*ccgslb*"
- "*chinacache*"
- "*duobao*"
- "*duolingo*"
- "*jdpay*"
- "*moke*"
- "*qhimg*"
- "*vpimg*"
- "*xiami*"
- "*xiaomi*"
# 360
- "*.360.com"
- "*.360kuai.com"
- "*.360safe.com"
- "*.dhrest.com"
- "*.qhres.com"
- "*.qhstatic.com"
- "*.qhupdate.com"
- "*.so.com"
# 4399
- "*.4399.com"
- "*.4399pk.com"
- "*.5054399.com"
- "*.img4399.com"
# 58
- "*.58.com"
# Alibaba
- "*.1688.com"
- "*.aliapp.org"
- "*.alibaba.com"
- "*.alibabacloud.com"
- "*.alibabausercontent.com"
- "*.alicdn.com"
- "*.aliexpress.com"
- "*.aliimg.com"
- "*.alikunlun.com"
- "*.alipay.com"
- "*.alipayobjects.com"
- "*.alisoft.com"
- "*.aliyun.com"
- "*.aliyuncdn.com"
- "*.aliyuncs.com"
- "*.amap.com"
- "*.autonavi.com"
- "*.dingtalk.com"
- "*.ele.me"
- "*.hichina.com"
- "*.mmstat.com"
- "*.mxhichina.com"
- "*.soku.com"
- "*.taobao.com"
- "*.taobaocdn.com"
- "*.tbcache.com"
- "*.tbcdn.com"
- "*.tmall.com"
- "*.tmall.hk"
- "*.ucweb.com"
- "*.xiami.com"
- "*.xiami.net"
- "*.ykimg.com"
- "*.youku.com"
# Baidu
- "*.baidu.com"
- "*.baidubcr.com"
- "*.baidupcs.com"
- "*.baidustatic.com"
- "*.bcebos.com"
- "*.bdimg.com"
- "*.bdstatic.com"
- "*.bdurl.net"
- "*.hao123.com"
- "*.hao123img.com"
- "*.jomodns.com"
- "*.yunjiasu-cdn.net"
# Bilibili
- "*.acg.tv"
- "*.acgvideo.com"
- "*.b23.tv"
- "*.biliapi.com"
- "*.biliapi.net"
- "*.biligame.com"
- "*.biligame.net"
- "*.bilivideo.com"
- "*.hdslb.com"
- "*.im9.com"
# Blizzard
- "*.battle.net"
- "*.battlenet.com"
- "*.blizzard.com"
# ByteDance
- "*.bytedance.com"
- "*.byteimg.com"
- "*.feiliao.com"
- "*.gifshow.com"
- "*.huoshan.com"
- "*.iesdouyin.com"
- "*.ixigua.com"
- "*.kaishou.com"
- "*.kspkg.com"
- "*.pstatp.com"
- "*.snssdk.com"
- "*.toutiao.com"
- "*.yximgs.com"
# CCTV
- "*.cctv.com"
- "*.cctvpic.com"
- "*.livechina.com"
# ChinaNet
- "*.21cn.com"
# DiDi
- "*.didialift.com"
- "*.didiglobal.com"
- "*.udache.com"
# Douyu 斗鱼
- "*.douyu.com"
- "*.douyu.tv"
- "*.douyutv.com"
# Epic
- "*.epicgames.com"
- "*.helpshift.com"
- "*.paragon.com"
- "*.unrealengine.com"
# HuaWei
- "*.dbankcdn.com"
- "*.hc-cdn.com"
- "*.hicloud.com"
- "*.huawei.com"
- "*.huaweicloud.com"
- "*.huaweishop.net"
- "*.hwccpc.com"
- "*.vmall.com"
- "*.vmallres.com"
# Iflytek 科大讯飞
- "*.iflyink.com"
- "*.iflyrec.com"
- "*.iflytek.com"
# Iqiyi
- "*.71.am"
- "*.71edge.com"
- "*.iqiyi.com"
- "*.iqiyipic.com"
- "*.ppsimg.com"
- "*.qiyi.com"
- "*.qiyipic.com"
- "*.qy.net"
# JD
- "*.360buy.com"
- "*.360buyimg.com"
- "*.jcloudcs.com"
- "*.jd.com"
- "*.jd.hk"
- "*.jdcloud.com"
- "*.jdpay.com"
- "*.paipai.com"
# Kingsoft
- "*.iciba.com"
- "*.ksosoft.com"
- "*.ksyun.com"
# Meitu
- "*.meitu.com"
- "*.meitudata.com"
- "*.meitustat.com"
- "*.meipai.com"
# LeTV 乐视
- "*.le.com"
- "*.lecloud.com"
- "*.letv.com"
- "*.letvcloud.com"
- "*.letvimg.com"
- "*.letvlive.com"
- "*.letvstore.com"
# MGTV 芒果TV
- "*.hitv.com"
- "*.hunantv.com"
- "*.mgtv.com"
# MI
- "*.duokan.com"
- "*.mi-img.com"
- "*.mi.com"
- "*.miui.com"
- "*.miwifi.com"
- "*.xiaomi.com"
- "*.xiaomi.net"
- "*.xiaomicp.com"
# NetEase
- "*.126.com"
- "*.126.net"
- "*.127.net"
- "*.163.com"
- "*.163yun.com"
- "*.lofter.com"
- "*.netease.com"
- "*.ydstatic.com"
- "*.youdao.com"
# PPTV、PPLive
- "*.pplive.com"
- "*.pptv.com"
# PDD 拼多多
- "*.pinduoduo.com"
- "*.yangkeduo.com"
# Sina
- "*.leju.com"
- "*.miaopai.com"
- "*.sina.com"
- "*.sinaapp.com"
- "*.sinaimg.com"
- "*.weibo.com"
- "*.weibocdn.com"
- "*.xiaoka.tv"
# Sohu Sogo
- "*.go2map.com"
- "*.sogo.com"
- "*.sogou.com"
- "*.sogoucdn.com"
- "*.sohu-inc.com"
- "*.sohu.com"
- "*.sohucs.com"
- "*.sohuno.com"
- "*.sohurdc.com"
- "*.v-56.com"
# Sony
- "*.playstation.com"
- "*.playstation.net"
- "*.playstationnetwork.com"
- "*.sony.com"
- "*.sonyentertainmentnetwork.com"
# Spark
- "*.amplitude.com"
- "*.firebaseio.com"
- "*.hockeyapp.net"
- "*.smartmailcloud.com"
# Steam
- "*.steampowered.com"
- "*.steam-chat.com"
- "*.steamgames.com"
- "*.steamusercontent.com"
- "*.steamcontent.com"
- "*.steamstatic.com"
- "*.steamcdn-a.akamaihd.net"
- "*.steamstat.us"
# Tencent
- "*.foxmail.com"
- "*.gtimg.com"
- "*.idqqimg.com"
- "*.igamecj.com"
- "*.myapp.com"
- "*.myqcloud.com"
- "*.qq.com"
- "*.qqmail.com"
- "*.qqurl.com"
- "*.smtcdns.com"
- "*.smtcdns.net"
- "*.soso.com"
- "*.tencent-cloud.net"
- "*.tencent.com"
- "*.tencentmind.com"
- "*.tenpay.com"
- "*.weixin.com"
- "*.weiyun.com"
# Vip 唯品会
- "*.appsimg.com"
- "*.appvipshop.com"
- "*.vip.com"
- "*.vipstatic.com"
# Ximalaya 喜马拉雅
- "*.ximalaya.com"
- "*.xmcdn.com"
# YYeTs 人人影视
- "*.got001.com"
- "*.jstucdn.com"
- "*.zimuzu.io"
- "*.zimuzu.tv"
- "*.zmz001.com"
- "*.zmz002.com"
- "*.zmz003.com"
- "*.zmz004.com"
- "*.zmz2019.com"
- "*.zmzapi.com"
- "*.zmzapi.net"
- "*.zmzfile.com"
# Private Tracker
- "*.awesome-hd.me"
- "*.beitai.pt"
- "*.bittorrent.com"
- "*.broadcasthe.net"
- "*.chdbits.co"
- "*.classix-unlimited.co.uk"
- "*.empornium.me"
- "*.gazellegames.net"
- "*.hdchina.org"
- "*.hdsky.me"
- "*.hdtime.org"
- "*.icetorrent.org"
- "*.jpopsuki.eu"
- "*.keepfrds.com"
- "*.leaguehd.com"
- "*.m-team.cc"
- "*.madsrevolution.net"
- "*.msg.vg"
- "*.nanyangpt.com"
- "*.ncore.cc"
- "*.open.cd"
- "*.ourbits.club"
- "*.passthepopcorn.me"
- "*.privatehd.to"
- "*.pthome.net"
- "*.redacted.ch"
- "*.springsunday.net"
- "*.tjupt.org"
- "*.totheglory.im"
# TeamViewer
- "*.teamviewer.com"
# Public Direct CDN 公共直连cdn
- "*.baomitu.com"
- "*.bootcss.com"
- "*.jiasule.com"
- "*.jsdelivr.net"
- "*.staticfile.org"
- "*.upaiyun.com"
# Acceleratedirectsites
- "*.12306.com"
- "*.17173.com"
- "*.17k.com"
- "*.360doc.com"
- "*.36kr.com"
- "*.3dmgame.com"
- "*.51cto.com"
- "*.51job.com"
- "*.51jobcdn.com"
- "*.56.com"
- "*.8686c.com"
- "*.abchina.com"
- "*.abercrombie.com"
- "*.acfun.tv"
- "*.air-matters.com"
- "*.air-matters.io"
- "*.aixifan.com"
- "*.algocasts.io"
- "*.babytree.com"
- "*.babytreeimg.com"
- "*.baicizhan.com"
- "*.baidupan.com"
- "*.baike.com"
- "*.biqudu.com"
- "*.biquge.com"
- "*.bitauto.com"
- "*.c-ctrip.com"
- "*.camera360.com"
- "*.cdnmama.com"
- "*.che168.com"
- "*.chinacache.net"
- "*.chinaso.com"
- "*.chinaz.com"
- "*.chinaz.net"
- "*.chuimg.com"
- "*.cibntv.net"
- "*.clouddn.com"
- "*.cloudxns.net"
- "*.cn163.net"
- "*.cnbeta.com"
- "*.cnbetacdn.com"
- "*.cnblogs.com"
- "*.cnki.net"
- "*.cnmstl.net"
- "*.coolapk.com"
- "*.coolapkmarket.com"
- "*.csdn.net"
- "*.ctrip.com"
- "*.dangdang.com"
- "*.dfcfw.com"
- "*.dianping.com"
- "*.dilidili.wang"
- "*.douban.com"
- "*.doubanio.com"
- "*.dpfile.com"
- "*.duowan.com"
- "*.dxycdn.com"
- "*.dytt8.net"
- "*.easou.com"
- "*.eastday.com"
- "*.eastmoney.com"
- "*.ecitic.com"
- "*.ewqcxz.com"
- "*.fang.com"
- "*.fantasy.tv"
- "*.feng.com"
- "*.fengkongcloud.com"
- "*.fir.im"
- "*.frdic.com"
- "*.fresh-ideas.cc"
- "*.ganji.com"
- "*.ganjistatic1.com"
- "*.geetest.com"
- "*.geilicdn.com"
- "*.godic.net"
- "*.gravatar.com"
- "*.guazi.com"
- "*.gwdang.com"
- "*.gzlzfm.com"
- "*.haibian.com"
- "*.haosou.com"
- "*.hollisterco.com"
- "*.hongxiu.com"
- "*.huajiao.com"
- "*.hupu.com"
- "*.huxiucdn.com"
- "*.huya.com"
- "*.ifeng.com"
- "*.ifengimg.com"
- "*.images-amazon.com"
- "*.infzm.com"
- "*.ipip.net"
- "*.it168.com"
- "*.ithome.com"
- "*.ixdzs.com"
- "*.jianguoyun.com"
- "*.jianshu.com"
- "*.jianshu.io"
- "*.jianshuapi.com"
- "*.jiathis.com"
- "*.jmstatic.com"
- "*.jumei.com"
- "*.kanimg.com"
- "*.kankan.com"
- "*.kaola.com"
- "*.knewone.com"
- "*.koowo.com"
- "*.ksyungslb.com"
- "*.kuaidi100.com"
- "*.kugou.com"
- "*.lancdns.com"
- "*.landiannews.com"
- "*.lanzou.com"
- "*.lemicp.com"
- "*.letitfly.me"
- "*.linkedin.com"
- "*.lizhi.fm"
- "*.lizhi.io"
- "*.lizhifm.com"
- "*.loli.net"
- "*.luoo.net"
- "*.lvmama.com"
- "*.lxdns.com"
- "*.maoyan.com"
- "*.meilishuo.com"
- "*.meituan.com"
- "*.meituan.net"
- "*.meizu.com"
- "*.miguvideo.com"
- "*.mobike.com"
- "*.mogu.com"
- "*.mogucdn.com"
- "*.mogujie.com"
- "*.moji.com"
- "*.moke.com"
- "*.mubu.com"
- "*.myunlu.com"
- "*.nruan.com"
- "*.nuomi.com"
- "*.onlinedown.net"
- "*.oracle.com"
- "*.oschina.net"
- "*.ourdvs.com"
- "*.overcast.fm"
- "*.paypal.com"
- "*.polyv.net"
- "*.qbox.me"
- "*.qcloud.com"
- "*.qcloudcdn.com"
- "*.qdaily.com"
- "*.qdmm.com"
- "*.qhimg.com"
- "*.qianqian.com"
- "*.qidian.com"
- "*.qihucdn.com"
- "*.qin.io"
- "*.qiniu.com"
- "*.qiniucdn.com"
- "*.qiniudn.com"
- "*.qiushibaike.com"
- "*.quanmin.tv"
- "*.qunar.com"
- "*.qunarzz.com"
- "*.rarbg.to"
- "*.repaik.com"
- "*.rrmj.tv"
- "*.ruguoapp.com"
- "*.runoob.com"
- "*.sandai.net"
- "*.sankuai.com"
- "*.segmentfault.com"
- "*.sf-express.com"
- "*.shumilou.net"
- "*.simplecd.me"
- "*.sm.ms"
- "*.smzdm.com"
- "*.snwx.com"
- "*.soufunimg.com"
- "*.ssl-images-amazon.com"
- "*.sspai.com"
- "*.startssl.com"
- "*.suning.com"
- "*.taihe.com"
- "*.th-sjy.com"
- "*.tianqi.com"
- "*.tianqistatic.com"
- "*.tianyancha.com"
- "*.tianyaui.com"
- "*.tietuku.com"
- "*.tiexue.net"
- "*.tmiaoo.com"
- "*.trip.com"
- "*.ttmeiju.com"
- "*.tudou.com"
- "*.tuniu.com"
- "*.tuniucdn.com"
- "*.umengcloud.com"
- "*.upyun.com"
- "*.uxengine.net"
- "*.videocc.net"
- "*.vmware.com"
- "*.wandoujia.com"
- "*.weather.com"
- "*.weico.cc"
- "*.weidian.com"
- "*.weiphone.com"
- "*.weiphone.net"
- "*.womai.com"
- "*.wscdns.com"
- "*.xdrig.com"
- "*.xhscdn.com"
- "*.xiachufang.com"
- "*.xiaohongshu.com"
- "*.xiaojukeji.com"
- "*.xinhuanet.com"
- "*.xitek.com"
- "*.xiumi.us"
- "*.xslb.net"
- "*.xueqiu.com"
- "*.xunlei.com"
- "*.yach.me"
- "*.yeepay.com"
- "*.yhd.com"
- "*.yihaodianimg.com"
- "*.yinxiang.com"
- "*.yinyuetai.com"
- "*.yixia.com"
- "*.ys168.com"
- "*.yuewen.com"
- "*.yy.com"
- "*.yystatic.com"
- "*.zealer.com"
- "*.zhangzishi.cc"
- "*.zhanqi.tv"
- "*.zhaopin.com"
- "*.zhihu.com"
- "*.zhimg.com"
- "*.zhongsou.com"
- "*.zhuihd.com"
- "localhost"
- 127.*
- 10.*
- 172.16.*
- 172.17.*
- 172.18.*
- 172.19.*
- 172.20.*
- 172.21.*
- 172.22.*
- 172.23.*
- 172.24.*
- 172.25.*
- 172.26.*
- 172.27.*
- 172.28.*
- 172.29.*
- 172.30.*
- 172.31.*
- 192.168.*
- <local>
@@ -1,393 +0,0 @@
{% if request.target == "clash" or request.target == "clashr" %}
port: {{ default(global.clash.http_port, "7890") }}
socks-port: {{ default(global.clash.socks_port, "7891") }}
allow-lan: {{ default(global.clash.allow_lan, "true") }}
mode: Rule
log-level: {{ default(global.clash.log_level, "info") }}
external-controller: :9090
{% if default(request.clash.dns, "") == "1" %}
dns:
enable: true
listen: :1053
{% endif %}
{% if local.clash.new_field_name == "true" %}
proxies: ~
proxy-groups: ~
rules: ~
{% else %}
Proxy: ~
Proxy Group: ~
Rule: ~
{% endif %}
{% endif %}
{% if request.target == "surge" %}
[General]
loglevel = notify
bypass-system = true
skip-proxy = 127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,100.64.0.0/10,localhost,*.local,e.crashlytics.com,captive.apple.com,::ffff:0:0:0:0/1,::ffff:128:0:0:0/1
#DNS设置或根据自己网络情况进行相应设置
bypass-tun = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
dns-server = 119.29.29.29,223.5.5.5
[Script]
http-request https?:\/\/.*\.iqiyi\.com\/.*authcookie= script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js
{% endif %}
{% if request.target == "loon" %}
[General]
# IPV6 启动与否
ipv6 = false
# udp 类的 dns 服务器,用,隔开多个服务器,system 表示系统 dns
dns-server = 119.29.29.29, 223.5.5.5
# DNS over HTTPS服务器,用,隔开多个服务器
doh-server = https://223.5.5.5/resolve, https://sm2.doh.pub/dns-query
# 是否开启局域网代理访问
allow-wifi-access = false
# 开启局域网访问后的 http 代理端口
wifi-access-http-port = 7222
# 开启局域网访问后的 socks5 代理端口
wifi-access-socks5-port = 7221
# 测速所用的测试链接,如果策略组没有自定义测试链接就会使用这里配置的
proxy-test-url = http://connectivitycheck.gstatic.com
# 节点测速时的超时秒数
test-timeout = 2
# 指定流量使用哪个网络接口进行转发
interface-mode = auto
sni-sniffing = true
# 禁用 stun 是否禁用 stun 协议的 udp 数据,禁用后可以有效解决 webrtc 的 ip 泄露
disable-stun = true
# 策略改变时候打断连接
disconnect-on-policy-change = true
# 一个节点连接失败几次后会进行节点切换,默认 3 次
switch-node-after-failure-times = 3
# 订阅资源解析器链接
resource-parser = https://gitlab.com/lodepuly/vpn_tool/-/raw/main/Resource/Script/Sub-Store/sub-store-parser_for_loon.js
# 自定义 geoip 数据库的 url
geoip-url = https://gitlab.com/Masaiki/GeoIP2-CN/-/raw/release/Country.mmdb
# 配置了该参数,那么所配置的这些IP段、域名将不会转发到Loon,而是由系统处理
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, captive.apple.com, e.crashlynatics.com
# 配置了该参数,那么所配置的这些IP段、域名就会不交给Loon来处理,系统直接处理
bypass-tun = 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 239.255.255.250/32, 255.255.255.255/32
# 当切换到某一特定的WiFi下时改变Loon的流量模式,如"loon-wifi5g":DIRECT,表示在loon-wifi5g这个wifi网络下使用直连模式,"cellular":PROXY,表示在蜂窝网络下使用代理模式,"default":RULE,默认使用分流模式
ssid-trigger = "Ccccccc":DIRECT,"cellular":RULE,"default":RULE
[Proxy]
[Remote Proxy]
[Remote Filter]
[Proxy Group]
♻️ 自动选择=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Auto.png
🔰 节点选择=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Proxy.png
🌍 国外媒体=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/GlobalMedia.png
🌏 国内媒体=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/DomesticMedia.png
Ⓜ️ 微软服务=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Microsoft.png
📲 电报信息=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Telegram.png
🍎 苹果服务=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Apple.png
🎯 全球直连=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Direct.png
🛑 全球拦截=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Advertising.png
🐟 漏网之鱼=select, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Final.png
[Rule]
[Remote Rule]
[Rewrite]
[Host]
[Script]
# 多看阅读 (By @chavyleung)
# 我的 > 签到任务 等到提示获取 Cookie 成功即可
http-request ^https:\/\/www\.duokan\.com\/checkin\/v0\/status script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/duokan/duokan.cookie.js, requires-body=true, tag=多看_cookie
cron "16 9 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/duokan/duokan.js, tag=多看阅读
# 飞客茶馆 (By @chavyleung)
# 打开 APP, 访问下个人中心
http-request ^https:\/\/www\.flyertea\.com\/source\/plugin\/mobile\/mobile\.php\?module=getdata&.* script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/flyertea/flyertea.cookie.js, tag=飞客茶馆_cookie
cron "17 9 * * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/flyertea/flyertea.js,tag=飞客茶馆
# 10010 (By @chavyleung)
# 打开 APP , 进入签到页面, 系统提示: 获取刷新链接: 成功
# 然后手动签到 1 次, 系统提示: 获取Cookie: 成功 (每日签到)
# 首页>天天抽奖, 系统提示 2 次: 获取Cookie: 成功 (登录抽奖) 和 获取Cookie: 成功 (抽奖次数)
http-request ^https?:\/\/act.10010.com\/SigninApp\/signin\/querySigninActivity.htm script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js, tag=中国联通_cookie1
http-request ^https?:\/\/act.10010.com\/SigninApp(.*?)\/signin\/daySign script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js, tag=中国联通_cookie2
http-request ^https?:\/\/m.client.10010.com\/dailylottery\/static\/(textdl\/userLogin|active\/findActivityInfo) script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js, tag=中国联通_cookie3
cron "18 9 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.js, tag=中国联通
# 万达电影 (By @chavyleung)
# 进入签到页面获取,网页端:https://act-m.wandacinemas.com/2005/17621a8caacc4d190dadd/
http-request ^https:\/\/user-api-prd-mx\.wandafilm\.com script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/wanda/wanda.cookie.js, tag=万达电影_cookie
cron "19 9 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/wanda/wanda.js, tag=万达电影
[MITM]
hostname = m.client.10010.com, act.10010.com, www.flyertea.com, www.duokan.com, tieba.baidu.com
ca-p12 = MIIKGQIBAzCCCeMGCSqGSIb3DQEHAaCCCdQEggnQMIIJzDCCBBcGCSqGSIb3DQEHBqCCBAgwggQEAgEAMIID/QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQImj1O53xwYioCAggAgIID0HZE8LBl4XFV6NulqdzN58vwAkhwiiES++WDPqsE+NHCIa8VCBlfd6/MV21vO2zw8X90mSaO2/PEW7hyH6890zrF11J3rxDzkVtUnV7e8rq5vOdivjWl4s5Nx5zgyJ0AOHJU7Xe2f8OMb4VzsAqeqF/D6FwNGZBJhBn0nPCRFIIgEpOFUrcwvErPbySY6w8mmHm0DVbKvBFGqOth3fco6gIBpZBILgaQ8t9eLep3IiBFcyH1ezILwgOJ0G0qOJwRxOIXRYT3SaTD65rL90w2nW3xcD8jU5raF3PBDEpWf2+xis69nRU8QiWLjJEJkedE+GpZ/CEKR2BL02E9uB+IFF1/Y4bXk17Ty7D8D0WbIgKeLvRcKxFZoQEZfr/vEpdzedt704NBjDRPe3TPDApQgBtvXFvKZ9RB7uo17AJkLZbTGicFVP+a33+e0B1594zNy30eZ3zwwgpsdZ7S23JX/90FQwsTJWxpO4f9qaDqUHVcsSVlG21U4ujIPWkpIi51XE9gM+JmL6nWaU8cRY2CI0ETLnsSWIOJfQG4s6sy0P5liJfqVUtIpZqrSxdzmGlLe2HsOQYo+M6SVpwx8Liopqu5vrvZhuUlUAwmjDodianY57AObCYP5/fM/3yKeZW7v9JH0pQY9eQ5qT6+oWIWoxnERYbXqpEGUDWN6vUG/JkJ6paHIyJ07mCLs4hXXWCin3dAXzmwyMNyGPH3SH03EKK2o/aMWTQNSfSyzFSDS+xXrj3wAZLdzTlyLA4l0iZhzvWLcgfzqHaj922hFhuO3zxQr2cVQihMwXd0gCPsNA4b0Uqaor2GF3qHxctscIGyKafNpmsVM7pSvYmqi0lMijjVfYsx3zV4FgYfQBOQAEaD6VXIHHeg/JBDbfatoQOp6j+GW/Mz5djaeHarA6QdZVeKiGLkKOXT3JYLtxL8QUx2SINlLgWpR3XvMY7f8cIyPMsTrJdLix5wXVRtUVx2A83GyAOt3QxP/rtM+b+86YtAhBdSTRhJfuDL4sjW4//wtnU0B0CzpOlB1CXRprcnUSUeGyOD4eiOaBYnPpY5wUYyQ+eJYQvYdXWDiFx2sBSxyZMAiXMLtBxBoGoyirzFZKK3cw6DdjXrOGepcqFlesEzraz8yfXerOcPwgI4JD13oDKSiw3iUhjTnfrXpoAX+3rEhNfJeqFf7nooGd30z//v4u09KM3l2gEA9WJt60leoDkp3PjL8LPsgBjO5f+odey9O/YqHmxt3dpRD02HvL5VhnJG/kBeZpGd81yX0ceM8x5f2HKzMy38osE6Q/Ru+L0wggWtBgkqhkiG9w0BBwGgggWeBIIFmjCCBZYwggWSBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQIJsPUIRvXx3ACAggABIIEyJxMbTjKmMs37xEKKy5d8HBJzPs30yLXeSbO0taa3o6XGEGt6rbBIF3MIGSKAOLuLOwhddVqkFxdUkYiAUTMptSrN8YyR9yhn06mkZPViPHrKNMXIKlAomg87rD54e8AnQPxKvOVPUYne7WBu4QWrUnbuBTOnoWLQAY6dRRE4EDAdQbMRx34sWpjVBvNrgO1h36T11wnCIGDC+FNchV/zs0Xfpt+JB2HGe1KXxH2lO9QKo0ONQlx/GtKBto1HRyN0pzEbdifUBqy1hgVjb5KnK7z3ah3lcZITYQqprn85Mrc8sMfDJRWZlXJM4t4Tz27XbHIlGxnvSmSHGFl74yKbIGCgz/mr9LCwQt8HAeG5QR4+KpImehYGEZeqysAh1ywPTmWnojmdHrrjuUowPZPdihzKgONsiDgCHTRYzmAlDcPGNlipjIOacSC/hgf6lIZL/QelH8eC3lefpAbyE1paruw2a39yLRX4rb4DWcWk0n3dsy23PElhLBTwGQQsaHTbz7EIabEOb8/tPsOM9P/LaHrD3A3nODPvmgMyAdGsXJ+sHPTjFXOGn2vuB5edJvVARZnQZIpPskcDvcL/Ho+SEITaSYREm2iNkRya0jTBoQ7mtrR+DmE7plvWdjcDceOafDTs81rtrsJ5zdcxOHOmw4QTUtOiebnulbu6kChC5pddgVY9ahTSjQsnxJ5xkAn2AJeS/2GdmIV0edXdK0ojHxYgLWfDjv6WNZ3mag9+ntZw+m7dIwqLTQHPC+Q+YWJMHU8l8Mfu4vSAfG0k15GMjy40Pavi+6UdadTgKajm3N8ieCTyDoSsdf8HGUZkCNB2nAU2UhTwrCB/2APoKy7Mwg+DHIb6G5o9OCeA9ZmSov2dDsWrxTD6rlkjveGGfhIqvlotcpqKBMf752pj/qtCMJq1+SqcIWZEW20jL7AF5ZkEBNcDWkAaBAl1rvTqH8d6vjYQtQm3v9RD3z0cF/xu+og84O3OrKXp8vb3uTn7lOX42RsObEWKW7rBfvkiseSZH8QMzPcmy1oBt6R0mZlmqD/gOGN0V/ipkEY1+YGFmIkgvECziZjHOIvdeTKG09duCsbmm9lHIFcnRSNjVJC/z+ITpjzhh1LNPiKRGSu+pzMkO+nv6mKSXZRrZBI1suhidVSeISK5OqbH+EGYe5nQbG+8LEnWNyKPsMTZlG3v3RRKIi1Qe0blmqqISzfID+KmHjK1/aJIZP7QKhlfyGDfqlbl/hT3Pbxl85AI1iU4DeMrTbKfZgAHNExukebLZbZjumZ1PRKGruc5gIGFF9pc0QBt1O1DSNBoWCNiqsZWm1MlJ1o6sDKRZArHU2dvonkOfkk6h4wfHV2Pn2hBZnIubYvuOZ1vCfM9ghPeVGzilxhh2arerkC9E60VUJx1iMpPTfjU1uw94gA30GSrx2dWRo6HcP3gW9s/va/2NxrsjswVO9qEmOLLZS9BF+e2PQecncoDUsbbunZ8+sdtm/OXQOazWGS5W/Pl315yzH0o0bYcolAUWDYt1hPCFvwOAfxWNZFoTFYEw4dJUAYMGvaRdg3ywQ/jK2k1MOMv+gbHc8p/jpbHNVQQtbBIuwAsvICQNX6PCSDbCMS/K/AiKivnffQ8kSDMFX9ijGBkDAjBgkqhkiG9w0BCRUxFgQUlgCJh1d8WORIThv+Ju2NkD9fS0gwaQYJKoZIhvcNAQkUMVweWgBRAHUAYQBuAHQAdQBtAHUAbAB0ACAAQwBlAHIAdABpAGYAaQBjAGEAdABlACAARgBBADEAQQA5ADgANAA5ACAAKAAxADEAIABPAGMAdAAgADIAMAAxADkAKTAtMCEwCQYFKw4DAhoFAAQU8gunnEf1jIaelyXFamHM4uv0avgECFTS7nopsZ+Z
ca-passphrase = FA1A9849
skip-server-cert-verify = false
{% endif %}
{% if request.target == "quan" %}
[SERVER]
[SOURCE]
[BACKUP-SERVER]
[SUSPEND-SSID]
[POLICY]
[DNS]
1.1.1.1
[REWRITE]
[URL-REJECTION]
[TCP]
[GLOBAL]
[HOST]
[STATE]
STATE,AUTO
[MITM]
{% endif %}
{% if request.target == "quanx" %}
[general]
excluded_routes=192.168.0.0/16, 172.16.0.0/12, 100.64.0.0/10, 10.0.0.0/8
geo_location_checker=http://ip-api.com/json/?lang=zh-CN, https://github.com/KOP-XIAO/QuantumultX/raw/master/Scripts/IP_API.js
network_check_url=http://www.baidu.com/
server_check_url=http://www.gstatic.com/generate_204
[dns]
server=119.29.29.29
server=223.5.5.5
server=1.0.0.1
server=8.8.8.8
[policy]
static=♻️ 自动选择, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Auto.png
static=🔰 节点选择, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Proxy.png
static=🌍 国外媒体, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/GlobalMedia.png
static=🌏 国内媒体, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/DomesticMedia.png
static=Ⓜ️ 微软服务, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Microsoft.png
static=📲 电报信息, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Telegram.png
static=🍎 苹果服务, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Apple.png
static=🎯 全球直连, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Direct.png
static=🛑 全球拦截, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Advertising.png
static=🐟 漏网之鱼, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Final.png
[server_remote]
[filter_remote]
[rewrite_remote]
[server_local]
[filter_local]
[rewrite_local]
[mitm]
{% endif %}
{% if request.target == "mellow" %}
[Endpoint]
DIRECT, builtin, freedom, domainStrategy=UseIP
REJECT, builtin, blackhole
Dns-Out, builtin, dns
[Routing]
domainStrategy = IPIfNonMatch
[Dns]
hijack = Dns-Out
clientIp = 114.114.114.114
[DnsServer]
localhost
223.5.5.5
8.8.8.8, 53, Remote
8.8.4.4
[DnsRule]
DOMAIN-KEYWORD, geosite:geolocation-!cn, Remote
DOMAIN-SUFFIX, google.com, Remote
[DnsHost]
doubleclick.net = 127.0.0.1
[Log]
loglevel = warning
{% endif %}
{% if request.target == "surfboard" %}
[General]
loglevel = notify
interface = 127.0.0.1
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
ipv6 = false
dns-server = system, 223.5.5.5
exclude-simple-hostnames = true
enhanced-mode-by-rule = true
{% endif %}
{% if request.target == "sssub" %}
{
"route": "bypass-lan-china",
"remote_dns": "dns.google",
"ipv6": false,
"metered": false,
"proxy_apps": {
"enabled": false,
"bypass": true,
"android_list": [
"com.eg.android.AlipayGphone",
"com.wudaokou.hippo",
"com.zhihu.android"
]
},
"udpdns": false
}
{% endif %}
{% if request.target == "singbox" %}
{
"log": {
"disabled": false,
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tls://1.1.1.1",
"address_resolver": "dns_resolver"
},
{
"tag": "dns_direct",
"address": "h3://dns.alidns.com/dns-query",
"address_resolver": "dns_resolver",
"detour": "DIRECT"
},
{
"tag": "dns_fakeip",
"address": "fakeip"
},
{
"tag": "dns_resolver",
"address": "223.5.5.5",
"detour": "DIRECT"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"outbound": [
"any"
],
"server": "dns_resolver"
},
{
"geosite": [
"category-ads-all"
],
"server": "dns_block",
"disable_cache": true
},
{
"geosite": [
"geolocation-!cn"
],
"query_type": [
"A",
"AAAA"
],
"server": "dns_fakeip"
},
{
"geosite": [
"geolocation-!cn"
],
"server": "dns_proxy"
}
],
"final": "dns_direct",
"independent_cache": true,
"fakeip": {
"enabled": true,
{% if default(request.singbox.ipv6, "") == "1" %}
"inet6_range": "fc00::\/18",
{% endif %}
"inet4_range": "198.18.0.0\/15"
}
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
"server_port": 123,
"interval": "30m",
"detour": "DIRECT"
},
"inbounds": [
{
"type": "mixed",
"tag": "mixed-in",
{% if bool(default(global.singbox.allow_lan, "")) %}
"listen": "0.0.0.0",
{% else %}
"listen": "127.0.0.1",
{% endif %}
"listen_port": {{ default(global.singbox.mixed_port, "2080") }}
},
{
"type": "tun",
"tag": "tun-in",
"inet4_address": "172.19.0.1/30",
{% if default(request.singbox.ipv6, "") == "1" %}
"inet6_address": "fdfe:dcba:9876::1/126",
{% endif %}
"auto_route": true,
"strict_route": true,
"stack": "mixed",
"sniff": true
}
],
"outbounds": [],
"route": {
"rules": [],
"auto_detect_interface": true
},
"experimental": {
"cache_file": {
"enabled": true,
"store_fakeip": true
},
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "dashboard"
}
}
}
{% endif %}
@@ -1,17 +0,0 @@
mixed-port: 7890
allow-lan: true
mode: Rule
log-level: info
external-controller: 127.0.0.1:9090
proxy-providers:
HK:
type: http
path: proxy-providers/HK.yaml
url: {{ getLink("/sub?target=clash&list=true&include=HK&url=https%3A%2F%2Fexample.com%2Fsubscription") }}
interval: 86400
health-check:
enable: true
url: http://www.gstatic.com/generate_204
interval: 300
rule-providers: ~
rules: ~
File diff suppressed because it is too large Load Diff
@@ -1,30 +0,0 @@
[General]
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,e.crashlynatics.com
bypass-tun = 10.0.0.0/8,100.64.0.0/10,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.0.0.0/24,192.0.2.0/24,192.88.99.0/24,192.168.0.0/16,198.18.0.0/15,198.51.100.0/24,203.0.113.0/24,224.0.0.0/4,255.255.255.255/32
dns-server = system,119.29.29.29,223.5.5.5
allow-udp-proxy = false
host = 127.0.0.1
[Proxy]
[Remote Proxy]
[Proxy Group]
[Rule]
[Remote Rule]
[URL Rewrite]
enable = true
^https?:\/\/(www.)?(g|google)\.cn https://www.google.com 302
[Remote Rewrite]
https://raw.githubusercontent.com/Loon0x00/LoonExampleConfig/master/Rewrite/AutoRewrite_Example.list,auto
[MITM]
hostname = *.example.com,*.sample.com
enable = true
skip-server-cert-verify = true
#ca-p12 =
#ca-passphrase =
@@ -1,27 +0,0 @@
[Endpoint]
DIRECT, builtin, freedom, domainStrategy=UseIP
REJECT, builtin, blackhole
Dns-Out, builtin, dns
[Routing]
domainStrategy = IPIfNonMatch
[Dns]
hijack = Dns-Out
clientIp = 114.114.114.114
[DnsServer]
localhost
223.5.5.5
8.8.8.8, 53, Remote
8.8.4.4
[DnsRule]
DOMAIN-KEYWORD, geosite:geolocation-!cn, Remote
DOMAIN-SUFFIX, google.com, Remote
[DnsHost]
doubleclick.net = 127.0.0.1
[Log]
loglevel = warning
@@ -1,27 +0,0 @@
[SERVER]
[SOURCE]
[BACKUP-SERVER]
[SUSPEND-SSID]
[POLICY]
[DNS]
1.1.1.1
[REWRITE]
[URL-REJECTION]
[TCP]
[GLOBAL]
[HOST]
[STATE]
STATE,AUTO
[MITM]
@@ -1,37 +0,0 @@
[general]
excluded_routes=192.168.0.0/16, 172.16.0.0/12, 100.64.0.0/10, 10.0.0.0/8
geo_location_checker=http://ip-api.com/json/?lang=zh-CN, https://github.com/KOP-XIAO/QuantumultX/raw/master/Scripts/IP_API.js
network_check_url=http://www.baidu.com/
server_check_url=http://www.gstatic.com/generate_204
[dns]
server=119.29.29.29
server=223.5.5.5
server=1.0.0.1
server=8.8.8.8
[policy]
static=♻️ 自动选择, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Auto.png
static=🔰 节点选择, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Proxy.png
static=🌍 国外媒体, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/GlobalMedia.png
static=🌏 国内媒体, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/DomesticMedia.png
static=Ⓜ️ 微软服务, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Microsoft.png
static=📲 电报信息, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Telegram.png
static=🍎 苹果服务, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Apple.png
static=🎯 全球直连, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Direct.png
static=🛑 全球拦截, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Advertising.png
static=🐟 漏网之鱼, direct, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Final.png
[server_remote]
[filter_remote]
[rewrite_remote]
[server_local]
[filter_local]
[rewrite_local]
[mitm]
@@ -1,16 +0,0 @@
{
"route": "bypass-lan-china",
"remote_dns": "dns.google",
"ipv6": false,
"metered": false,
"proxy_apps": {
"enabled": false,
"bypass": true,
"android_list": [
"com.eg.android.AlipayGphone",
"com.wudaokou.hippo",
"com.zhihu.android"
]
},
"udpdns": false
}
@@ -1,9 +0,0 @@
port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
external-controller: 127.0.0.1:9090
Proxy: ~
Proxy Group: ~
Rule: ~
@@ -1,113 +0,0 @@
{
"log": {
"disabled": false,
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tls://1.1.1.1",
"address_resolver": "dns_resolver"
},
{
"tag": "dns_direct",
"address": "h3://dns.alidns.com/dns-query",
"address_resolver": "dns_resolver",
"detour": "DIRECT"
},
{
"tag": "dns_fakeip",
"address": "fakeip"
},
{
"tag": "dns_resolver",
"address": "223.5.5.5",
"detour": "DIRECT"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"outbound": [
"any"
],
"server": "dns_resolver"
},
{
"geosite": [
"category-ads-all"
],
"server": "dns_block",
"disable_cache": true
},
{
"geosite": [
"geolocation-!cn"
],
"query_type": [
"A",
"AAAA"
],
"server": "dns_fakeip"
},
{
"geosite": [
"geolocation-!cn"
],
"server": "dns_proxy"
}
],
"final": "dns_direct",
"independent_cache": true,
"fakeip": {
"enabled": true,
"inet6_range": "fc00::\/18",
"inet4_range": "198.18.0.0\/15"
}
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
"server_port": 123,
"interval": "30m",
"detour": "DIRECT"
},
"inbounds": [
{
"type": "mixed",
"tag": "mixed-in",
"listen": "0.0.0.0",
"listen_port": 2080
},
{
"type": "tun",
"tag": "tun-in",
"inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126",
"auto_route": true,
"strict_route": true,
"stack": "mixed",
"sniff": true
}
],
"outbounds": [],
"route": {
"rules": [],
"auto_detect_interface": true
},
"experimental": {
"cache_file": {
"enabled": true,
"store_fakeip": true
},
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "dashboard"
}
}
}
@@ -1,8 +0,0 @@
[General]
loglevel = notify
interface = 127.0.0.1
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
ipv6 = false
dns-server = system, 223.5.5.5
exclude-simple-hostnames = true
enhanced-mode-by-rule = true
@@ -1,7 +0,0 @@
[General]
loglevel = notify
bypass-system = true
skip-proxy = 127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,100.64.0.0/10,localhost,*.local,e.crashlytics.com,captive.apple.com,::ffff:0:0:0:0/1,::ffff:128:0:0:0/1
#DNS设置或根据自己网络情况进行相应设置
bypass-tun = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
dns-server = 119.29.29.29,223.5.5.5
@@ -1,40 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,44 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🆎 AdBlock,rules/ACL4SSR/Clash/BanEasyList.list
ruleset=🆎 AdBlock,rules/ACL4SSR/Clash/BanEasyListChina.list
ruleset=🆎 AdBlock,rules/ACL4SSR/Clash/BanEasyPrivacy.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🆎 AdBlock`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,32 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则 (流量回国)
;去广告:支持
;自动测速:不支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:支持
;增强国外GFW:支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Telegram.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ProxyGFWlist.list
ruleset=🚀 中国代理,rules/ACL4SSR/Clash/ChinaIp.list
ruleset=🚀 中国代理,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🚀 中国代理,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🚀 中国代理,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 中国代理`select`[]DIRECT`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 中国代理
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 中国代理`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,33 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/Telegram.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,34 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/Telegram.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`180
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`[]🔯 故障转移`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,35 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/Telegram.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`180
custom_proxy_group=🔮 负载均衡`load-balance`.*`http://www.gstatic.com/generate_204`180
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,32 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:不支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/Telegram.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]DIRECT`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,39 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Apple.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,39 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:不支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]DIRECT`.*
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,38 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:不支持
;微软分流:支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Apple.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]DIRECT`.*
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,36 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:不支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Apple.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]DIRECT`.*
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,38 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,44 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线更新版
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报信息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📢 谷歌FCM`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,48 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线更新版
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🆎 AdBlock,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyList.list
ruleset=🆎 AdBlock,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyListChina.list
ruleset=🆎 AdBlock,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyPrivacy.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报信息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📢 谷歌FCM`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🆎 AdBlock`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,86 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
;设置规则标志位
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软Bing,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Bing.list
ruleset=Ⓜ️ 微软云盘,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报消息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🎶 网易音乐,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Epic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Origin.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Sony.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Steam.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Nintendo.list
ruleset=📹 油管视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/YouTube.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
ruleset=📺 巴哈姆特,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bahamut.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/BilibiliHMT.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list
ruleset=🌏 国内媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
;ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
;设置规则标志位
;设置分组标志位
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📹 油管视频`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🎥 奈飞视频`select`[]🎥 奈飞节点`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 巴哈姆特`select`[]🇨🇳 台湾节点`[]🚀 节点选择`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 哔哩哔哩`select`[]🎯 全球直连`[]🇨🇳 台湾节点`[]🇭🇰 香港节点
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🌏 国内媒体`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软Bing`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软云盘`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🍎 苹果服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎮 游戏平台`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎶 网易音乐`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择`(网易|音乐|解锁|Music|NetEase)
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 广告拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]♻️ 自动选择`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇸🇬 狮城节点`url-test`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎥 奈飞节点`select`(NF|奈飞|解锁|Netflix|NETFLIX|Media)
;设置分组标志位
enable_rule_generator=true
overwrite_original_rules=true
;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml
;luck
@@ -1,93 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
;设置规则标志位
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🆎 AdBlock,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyList.list
ruleset=🆎 AdBlock,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyListChina.list
ruleset=🛡️ 隐私防护,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyPrivacy.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软Bing,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Bing.list
ruleset=Ⓜ️ 微软云盘,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报消息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🎶 网易音乐,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Epic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Origin.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Sony.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Steam.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Nintendo.list
ruleset=📹 油管视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/YouTube.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
ruleset=📺 巴哈姆特,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bahamut.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/BilibiliHMT.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list
ruleset=🌏 国内媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
;ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
;设置规则标志位
;设置分组标志位
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔮 负载均衡`load-balance`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📹 油管视频`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🎥 奈飞视频`select`[]🎥 奈飞节点`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 巴哈姆特`select`[]🇨🇳 台湾节点`[]🚀 节点选择`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 哔哩哔哩`select`[]🎯 全球直连`[]🇨🇳 台湾节点`[]🇭🇰 香港节点
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🌏 国内媒体`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软Bing`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软云盘`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🍎 苹果服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎮 游戏平台`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎶 网易音乐`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择`(网易|音乐|解锁|Music|NetEase)
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 广告拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🆎 AdBlock`select`[]REJECT`[]DIRECT
custom_proxy_group=🛡️ 隐私防护`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]♻️ 自动选择`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇸🇬 狮城节点`url-test`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎥 奈飞节点`select`(NF|奈飞|解锁|Netflix|NETFLIX|Media)
;设置分组标志位
enable_rule_generator=true
overwrite_original_rules=true
;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml
;luck
@@ -1,93 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
;设置规则标志位
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=📢 谷歌🇨🇳Play下载,[]DOMAIN-SUFFIX,xn--ngstr-lra8j.com
ruleset=📢 谷歌🇨🇳Play服务,[]DOMAIN-SUFFIX,services.googleapis.cn
ruleset=📢 谷歌🇨🇳Play服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleCNProxyIP.list
ruleset=📢 谷歌🇨🇳,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleCN.list
ruleset=📹 油管视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/YouTube.list
ruleset=📢 谷歌,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Google.list
ruleset=Ⓜ️ 微软Bing,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Bing.list
ruleset=Ⓜ️ 微软云盘,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报消息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🎶 网易音乐,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Epic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Origin.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Sony.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Steam.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Nintendo.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
ruleset=📺 巴哈姆特,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bahamut.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/BilibiliHMT.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list
ruleset=🌏 国内媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
;ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
;设置规则标志位
;设置分组标志位
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌🇨🇳Play下载`select`[]🚀 节点选择`[]DIRECT`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌🇨🇳Play服务`select`[]🚀 节点选择`[]DIRECT`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌🇨🇳`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌`select`[]🚀 节点选择`[]DIRECT`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=📹 油管视频`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🎥 奈飞视频`select`[]🎥 奈飞节点`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 巴哈姆特`select`[]🇨🇳 台湾节点`[]🚀 节点选择`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 哔哩哔哩`select`[]🎯 全球直连`[]🇨🇳 台湾节点`[]🇭🇰 香港节点
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🌏 国内媒体`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软Bing`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软云盘`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🍎 苹果服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎮 游戏平台`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎶 网易音乐`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择`(网易|音乐|解锁|Music|NetEase)
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 广告拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]♻️ 自动选择`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇸🇬 狮城节点`url-test`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎥 奈飞节点`select`(NF|奈飞|解锁|Netflix|NETFLIX|Media)
;设置分组标志位
enable_rule_generator=true
overwrite_original_rules=true
;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml
;luck
@@ -1,88 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
;设置规则标志位
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软Bing,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Bing.list
ruleset=Ⓜ️ 微软云盘,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报消息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🎶 网易音乐,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Epic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Origin.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Sony.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Steam.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Nintendo.list
ruleset=📹 油管视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/YouTube.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
ruleset=📺 巴哈姆特,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bahamut.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/BilibiliHMT.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list
ruleset=🌏 国内媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
;ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
;设置规则标志位
;设置分组标志位
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔮 负载均衡`load-balance`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📹 油管视频`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🎥 奈飞视频`select`[]🎥 奈飞节点`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 巴哈姆特`select`[]🇨🇳 台湾节点`[]🚀 节点选择`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 哔哩哔哩`select`[]🎯 全球直连`[]🇨🇳 台湾节点`[]🇭🇰 香港节点
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🌏 国内媒体`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软Bing`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软云盘`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🍎 苹果服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎮 游戏平台`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎶 网易音乐`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择`(网易|音乐|解锁|Music|NetEase)
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 广告拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]♻️ 自动选择`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇸🇬 狮城节点`url-test`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎥 奈飞节点`select`(NF|奈飞|解锁|Netflix|NETFLIX|Media)
;设置分组标志位
enable_rule_generator=true
overwrite_original_rules=true
;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml
;luck
@@ -1,89 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
;设置规则标志位
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软Bing,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Bing.list
ruleset=Ⓜ️ 微软云盘,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报消息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🎶 网易音乐,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Epic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Origin.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Sony.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Steam.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Nintendo.list
ruleset=📹 油管视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/YouTube.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/AmazonIp.list
ruleset=📺 巴哈姆特,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bahamut.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/BilibiliHMT.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list
ruleset=🌏 国内媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
;ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
;设置规则标志位
;设置分组标志位
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔮 负载均衡`load-balance`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📹 油管视频`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🎥 奈飞视频`select`[]🎥 奈飞节点`[]🚀 节点选择`[]♻️ 自动选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 巴哈姆特`select`[]🇨🇳 台湾节点`[]🚀 节点选择`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 哔哩哔哩`select`[]🎯 全球直连`[]🇨🇳 台湾节点`[]🇭🇰 香港节点
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🌏 国内媒体`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软Bing`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软云盘`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🍎 苹果服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎮 游戏平台`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎶 网易音乐`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择`(网易|音乐|解锁|Music|NetEase)
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 广告拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]♻️ 自动选择`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇸🇬 狮城节点`url-test`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎥 奈飞节点`select`(NF|奈飞|解锁|Netflix|NETFLIX|Media)
;设置分组标志位
enable_rule_generator=true
overwrite_original_rules=true
;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml
;luck
@@ -1,85 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:不支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
;设置规则标志位
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软Bing,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Bing.list
ruleset=Ⓜ️ 微软云盘,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报消息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🎶 网易音乐,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Epic.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Origin.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Sony.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Steam.list
ruleset=🎮 游戏平台,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Nintendo.list
ruleset=📹 油管视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/YouTube.list
ruleset=🎥 奈飞视频,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
ruleset=📺 巴哈姆特,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bahamut.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/BilibiliHMT.list
ruleset=📺 哔哩哔哩,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list
ruleset=🌏 国内媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
;ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
;设置规则标志位
;设置分组标志位
custom_proxy_group=🚀 节点选择`select`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📹 油管视频`select`[]🚀 节点选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🎥 奈飞视频`select`[]🎥 奈飞节点`[]🚀 节点选择`[]🇸🇬 狮城节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 巴哈姆特`select`[]🇨🇳 台湾节点`[]🚀 节点选择`[]🚀 手动切换`[]DIRECT
custom_proxy_group=📺 哔哩哔哩`select`[]🎯 全球直连`[]🇨🇳 台湾节点`[]🇭🇰 香港节点
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🌏 国内媒体`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🚀 手动切换
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软Bing`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软云盘`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🍎 苹果服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎮 游戏平台`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🎶 网易音乐`select`[]DIRECT`[]🚀 节点选择`(网易|音乐|解锁|Music|NetEase)
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 广告拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🚀 手动切换
custom_proxy_group=🇭🇰 香港节点`select`(港|HK|hk|Hong Kong|HongKong|hongkong)
custom_proxy_group=🇯🇵 日本节点`select`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)
custom_proxy_group=🇺🇲 美国节点`select`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)
custom_proxy_group=🇸🇬 狮城节点`select`(新加坡|坡|狮城|SG|Singapore)
custom_proxy_group=🇨🇳 台湾节点`select`(台|新北|彰化|TW|Taiwan)
custom_proxy_group=🇰🇷 韩国节点`select`(KR|Korea|KOR|首尔|韩|韓)
custom_proxy_group=🎥 奈飞节点`select`(NF|奈飞|解锁|Netflix|NETFLIX|Media)
;设置分组标志位
enable_rule_generator=true
overwrite_original_rules=true
;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml
;luck
@@ -1,34 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,35 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyListChina.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,36 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=💬 OpenAi,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/OpenAi.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=💬 OpenAi`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,35 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`180
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`[]🔯 故障转移`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,39 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇸🇬 狮城节点`[]🇺🇲 美国节点`[]🇯🇵 日本节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇸🇬 狮城节点`url-test`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,50
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,36 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🔯 故障转移`fallback`.*`http://www.gstatic.com/generate_204`180
custom_proxy_group=🔮 负载均衡`load-balance`.*`http://www.gstatic.com/generate_204`180
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`[]🔯 故障转移`[]🔮 负载均衡`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,33 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:不支持
;微软分流:不支持
;苹果分流:不支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]DIRECT`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,49 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线更新版
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
;多国家分组:支持港/日/美
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报信息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇺🇲 美国节点`[]🇯🇵 日本节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📢 谷歌FCM`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`600,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,42 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线版
;去广告:支持
;自动测速:不支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报信息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]DIRECT`.*
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📢 谷歌FCM`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,39 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线更新版
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报信息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📢 谷歌FCM`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,40 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:不支持
;设置规则标志位
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyLite.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaIp.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,41 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:支持
;增强国外GFW:支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyGFWlist.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaIp.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,40 +0,0 @@
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:支持
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/LocalAreaNetwork.list
ruleset=🛑 全球拦截,rules/ACL4SSR/Clash/BanAD.list
ruleset=🍃 应用净化,rules/ACL4SSR/Clash/BanProgramAD.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/GoogleCN.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,rules/ACL4SSR/Clash/Microsoft.list
ruleset=🍎 苹果服务,rules/ACL4SSR/Clash/Apple.list
ruleset=📲 电报信息,rules/ACL4SSR/Clash/Telegram.list
ruleset=🌍 国外媒体,rules/ACL4SSR/Clash/ProxyMedia.list
ruleset=🚀 节点选择,rules/ACL4SSR/Clash/ProxyGFWlist.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaDomain.list
ruleset=🎯 全球直连,rules/ACL4SSR/Clash/ChinaCompanyIp.list
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
enable_rule_generator=true
overwrite_original_rules=true
@@ -1,66 +0,0 @@
[custom]
;This is an example external configuration file
;All possible customization settings are shown below
;Options for custom groups
;custom_proxy_group=Proxy`select`.*`[]AUTO`[]DIRECT`.*
;custom_proxy_group=AUTO`url-test`.*`http://www.gstatic.com/generate_204`300
;custom_proxy_group=google`select`.*
;custom_proxy_group=netflix`select`.*
;custom_proxy_group=动画疯`select`(深台|彰化|新北|台)
;custom_proxy_group=fox+`select`(HGC|HKBN|PCCW|HKT|深台|彰化|新北|台|新加坡|sg|hk|tw)
;custom_proxy_group=美区影视`select`(美|美国)
;custom_proxy_group=Global_media`select`.*
;custom_proxy_group=Domestic`select`[]DIRECT`[]Proxy
;custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
;custom_proxy_group=Final`select`[]Proxy`[]DIRECT
;custom_proxy_group=屏蔽广告`select`[]REJECT`[]DIRECT
;custom_proxy_group=UnblockNeteaseMusic`select`云音乐解锁`[]DIRECT
;custom_proxy_group=Telegram`select`新加坡`[]Proxy
custom_proxy_group=!!import:snippets/groups_forcerule.txt
;Options for custom rulesets
enable_rule_generator=false
overwrite_original_rules=false
;ruleset=DIRECT,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Unbreak.list
;ruleset=⛔️ 广告拦截,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Advertising.list
;ruleset=🚫 运营劫持,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Hijacking.list
;ruleset=🌌 YouTube,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Media/YouTube.list
;ruleset=🎥 NETFLIX,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Media/Netflix.list
;ruleset=HBO,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Media/HBO.list
;ruleset=Fox,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Media/Fox.list
;ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/GlobalMedia.list
;ruleset=🌏 港台媒体,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/HKMTMedia.list
;ruleset=📲 电报信息,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Telegram.list
;ruleset=🔰 节点选择,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Global.list
;ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Apple.list
;ruleset=DIRECT,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/China.list
;Options for custom base configuration file
clash_rule_base=base/forcerule.yml
;surge_rule_base=base/surge.conf
;surfboard_rule_base=base/surfboard.conf
;mellow_rule_base=base/mellow.conf
;quan_rule_base=base/quan.conf
;quanx_rule_base=base/quanx.conf
;loon_rule_base=base/loon.conf
;sssub_rule_base=base/shadowsocks_base.json
;singbox_rule_base=base/singbox.json
;Options for renaming nodes
;rename=Test-(.*?)-(.*?)-(.*?)\((.*?)\)@\1\4x测试线路_自\2到\3
;rename=\(?((x|X)?(\d+)(\.?\d+)?)((\s?倍率?)|(x|X))\)?@$1x
;Options for adding emojis
;add_emoji=true
;remove_old_emoji=true
;emoji=(流量|时间|应急),🏳️‍🌈
;emoji=阿根廷,🇦🇷
;Options for filtering nodes
;include_remarks=
;exclude_remarks=
;[template]
;;variables in the local scope
;clash.dns.port=5353
@@ -1,33 +0,0 @@
version = 1
[custom]
enable_rule_generator = false
overwrite_original_rules = false
# Options for custom base configuration file
clash_rule_base = "base/forcerule.yml"
#surge_rule_base = "base/surge.conf"
#surfboard_rule_base = "base/surfboard.conf"
#mellow_rule_base = "base/mellow.conf"
#quan_rule_base = "base/quan.conf"
#quanx_rule_base = "base/quanx.conf"
#loon_rule_base = "base/loon.conf"
#sssub_rule_base = "base/shadowsocks_base.json"
#singbox_rule_base = "base/singbox.json"
# Options for adding emojis
#add_emoji = true
#remove_old_emoji = true
# Options for filtering nodes
#include_remarks = []
#exclude_remarks = []
[[custom_groups]]
import = "snippets/groups_forcerule.toml"
#[[rulesets]]
#import = ""
[[template_args]]
key = "clash.dns.port"
value = "5353"
@@ -1,32 +0,0 @@
custom:
enable_rule_generator: false
overwrite_original_rules: false
proxy_groups:
- {import: snippets/groups_forcerule.txt}
# rulesets:
# - {import: snippets/ruleset_remote.txt}
clash_rule_base: base/forcerule.yml
# surge_rule_base: base/surge.conf
# surfboard_rule_base: base/surfboard.conf
# mellow_rule_base: base/mellow.conf
# quan_rule_base: base/quan.conf
# quanx_rule_base: base/quanx.conf
# loon_rule_base: base/loon.conf
# sssub_rule_base: base/shadowsocks_base.json
# singbox_rule_base: base/singbox.json
# rename_node:
# - {import: snippet/rename.txt}
# add_emoji: true
# remove_old_emoji: true
# emojis:
# - {import: snippets/emoji.txt}
# include_remarks: []
# exclude_remarks: []
# template_args:
# - {key: clash.dns.port, value: 5353}
@@ -1,9 +0,0 @@
[test]
path=output.conf
target=surge
ver=4
url=ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpwYXNzd29yZA@www.example.com:1080#Example
[test_profile]
path=output.yml
profile=profiles/example_profile.ini

Some files were not shown because too many files have changed in this diff Show More