Ater.Free.EscapeHole 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Ater.Free.EscapeHole --version 0.2.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Ater.Free.EscapeHole --version 0.2.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Ater.Free.EscapeHole&version=0.2.1
                    
nuke :add-package Ater.Free.EscapeHole --version 0.2.1
                    

Ater.Free.EscapeHole

NuGet

Ater.Free.EscapeHole 是一个基于 Mihomo (Clash Meta) 代理核心的 dotnet tool工具。它让你无需打开图形界面即可管理代理订阅、测试节点延迟、启动和停止本地代理。

当前版本仅支持 Windows,因为只打包了mihomo.exe.

运行要求

  • 操作系统:Windows 10/11
  • .NET 10 Runtime

非 Windows 平台当前不受支持。

安装

安装 .NET 工具

dotnet tool install --global Ater.Free.EscapeHole

安装后,全局命令为 escape。

快速开始

1. 添加订阅

escape sub add mysub https://example.com/subscribe

2. 查看订阅

escape sub list

3. 查看节点

escape node list mysub

4. 连接代理

escape connect mysub

工具会自动测试所有节点的延迟,然后让你交互式选择一个节点启动本地代理。

5. 使用系统全局代理模式

escape connect mysub --global

代理启动后会自动设置 Windows 系统代理;退出时自动恢复原始设置。

6. 查看/停止代理

查看当前运行的代理:

escape status

停止当前代理:

escape stop

可以使用escape connect命令直接连接上次的节点,无需指定订阅名称。

命令参考

escape sub add <名称> <URL>

添加一个新的订阅。

  • <名称> — 订阅的名称,用于后续管理。
  • <URL> — 订阅链接(Clash YAML 或 Base64 编码格式)。

escape sub refresh <名称>

重新下载并刷新订阅的节点列表。

escape sub list

列出所有已添加的订阅(名称、URL、节点数、最后更新时间)。

escape sub delete <名称>

删除指定的订阅。

escape node list <名称>

列出指定订阅中的所有代理节点。

escape connect [名称] [--global]

连接代理。

  • [名称] — 可选。不指定时尝试恢复上次的连接。
  • --global — 可选。启用系统全局代理模式(设置 Windows 系统代理)。

执行流程:

  1. 启动临时 Mihomo 实例。
  2. 测试所有节点的连接延迟。
  3. 列出可达节点,让用户交互选择。
  4. 保存会话并启动正式代理。

escape stop

停止当前 CLI 管理的 Mihomo 代理进程。

  • 如果之前使用了 --global,会自动恢复 Windows 系统代理设置。
  • 如果 Mihomo 进程意外退出,则仅清理会话记录。

escape config proxy_port <端口号>

配置本地代理端口(默认:7890)。

数据文件

所有配置和会话数据存储在:

%LOCALAPPDATA%\EscapeService\
文件 说明
config.json 订阅配置和应用设置
escape-session.json CLI 活动代理会话记录
winnet\ Winnet 可执行文件、GeoIP 数据、运行时配置

日志

如果需要排查问题,可以使用 .NET 工具的诊断日志:

export DOTNET_CLI_TELEMETRY_OPTOUT=1
dotnet tool run escape -- --help

或者直接运行 escape 命令,错误信息会打印到终端。

许可证

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.2.3 219 7/21/2026
0.2.2 137 7/6/2026
0.2.1 140 6/16/2026
0.2.0 147 5/27/2026
0.1.4 130 5/15/2026
0.1.2 131 5/11/2026
0.1.1 130 5/9/2026
0.1.0 127 5/9/2026

1. add https-proxy support.