{"id":46627523,"url":"https://github.com/coolapijust/snishaper","last_synced_at":"2026-03-11T05:00:49.095Z","repository":{"id":338935835,"uuid":"1159768927","full_name":"coolapijust/SniShaper","owner":"coolapijust","description":"通过透传或本地中间人重写绕过 SNI 阻断的桌面代理工具，支持加密客户端握手 (ECH) 与优选 IP 池。","archived":false,"fork":false,"pushed_at":"2026-02-20T06:22:19.000Z","size":450,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-08T02:29:28.738Z","etag":null,"topics":["cdn","cloudflare","domain-fronting","dpi","dpi-bypass","ech","gfw","gfw-breaker","golang","mitm","privacy","proxy","sni","tls","wails"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coolapijust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-17T06:09:53.000Z","updated_at":"2026-02-28T13:30:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/coolapijust/SniShaper","commit_stats":null,"previous_names":["coolapijust/snishaper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coolapijust/SniShaper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapijust%2FSniShaper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapijust%2FSniShaper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapijust%2FSniShaper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapijust%2FSniShaper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolapijust","download_url":"https://codeload.github.com/coolapijust/SniShaper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolapijust%2FSniShaper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn","cloudflare","domain-fronting","dpi","dpi-bypass","ech","gfw","gfw-breaker","golang","mitm","privacy","proxy","sni","tls","wails"],"created_at":"2026-03-07T23:06:46.490Z","updated_at":"2026-03-11T05:00:49.086Z","avatar_url":"https://github.com/coolapijust.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SniShaper\n\n[![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat-square\u0026logo=go)](https://golang.org)\n[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=flat-square)]()\n[![License](https://img.shields.io/badge/License-MIT-blue?style=flat-square)]()\n\n通过透传或本地中间人重写绕过 SNI 阻断的桌面代理工具，支持普通域前置和 ECH fronting。\n\n## 核心特性\n\n- **三模式代理**\n  - `transparent`：透明透传（TCP 隧道，不解密 TLS，完成自定义 host）\n  - `mitm`：中间人模式（本地 CA 解密，修改 sni 绕过阻断）\n  - `server`：服务端模式（连接上游动态反代服务器，无感中转）\n\n- **Cloudflare ECH 一键加速**\n  - **动态 ECH**：通过内置 DoH 处理，动态获取 ECH 配置，避免明文 SNI 暴露导致的阻断\n  - **全球优选 IP 池**：智能优选边缘节点，极大提升访问稳定性\n\n- **协议深度控制**\n  - `sni_policy`：自定义 SNI 行为（fake / original / upstream / none）\n  - `utls_policy`：内置指纹伪装，有效对抗针对性探查\n  - `alpn_policy`：灵活控制 HTTP 协议版本选择\n\n## 工作原理\n\n```\n浏览器 → SniShaper(127.0.0.1:8080) → 规则匹配 → [模式选择: transparent/mitm] → 上游握手 (ECH/uTLS) → 目标直连\n```\n\n## 快速开始\n\n### 1. 启动\n运行 `snishaper.exe`。默认监听端口为 `127.0.0.1:8080`（可在设置中修改）。\n\n### 2. 安装证书（MITM 模式必需）\n点击界面「证书管理」按钮，安装生成的根证书到「受信任的根证书颁发机构」，并重启浏览器。\n\n### 3. 配置加速\n在 **Cloudflare ECH** 页面输入想要加速的域名，点击添加即可一键生成配置。\n\n### 4. 启用代理\n点击主界面的「启动代理」并开启「系统代理」即可。\n\n## 配置字段说明\n\n| 字段 | 说明 |\n|------|------|\n| `domains` | 域名匹配列表 |\n| `website` | 网站分组名（用于 UI 聚合展示） |\n| `mode` | `transparent` 或 `mitm` |\n| `upstream` | 上游地址（可指定 IP:443 或留空由程序自动解析） |\n| `sni_policy` | SNI 处理策略 |\n| `utls_policy` | 指纹伪装策略 (`on` / `off` / `auto`) |\n| `ech_enabled` | 是否开启 ECH 加密（绕过封锁的关键） |\n| `use_cf_pool` | 是否启用优选 IP 池平衡负载与稳定性 |\n\n## 服务端部署\n\nSniShaper 支持两种服务端部署方式：\n\n### 方式一：Cloudflare Worker（免费）\n\n```\n客户端 → Worker → 目标网站\n```\n\n**部署步骤：**\n\n1. 登录 [Cloudflare Dashboard](https://dash.cloudflare.com/)\n2. 创建一个新的 Worker（hello world 模板）\n3. 将 `sni-server/worker.js` 的内容复制到 Worker 编辑器\n4. 在 Worker 设置中添加环境变量 `AUTH_SECRET`，设置密码\n5. 部署 Worker，获取 Worker 域名（如 `xxx.workers.dev`）\n6. 在客户端 Server 节点设置中填写域名和鉴权密码\n\n### 方式二：VPS 部署（sni-server）\n\n```\n客户端 → Cloudflare Tunnel → VPS (sni-server) → 目标网站\n```\n\n**部署步骤：**\n\n1. 准备一台 VPS（任何支持 Go 的 Linux 服务器）\n2. 运行一键部署脚本：\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/coolapijust/Shaper-Next/main/server/install.sh -o /tmp/sni-server-install.sh\nsudo bash /tmp/sni-server-install.sh\n```\n\n3. 配置域名解析。推荐使用 Cloudflare Tunnel：\n```bash\nbash \u003c(curl -sSL https://github.com/sky22333/shell/raw/main/dev/cf-tunnel.sh)\n```\n\n4. 在客户端配置中填写 Tunnel给的域名和鉴权密码\n\n\n\n## 常见问题\n\n- **证书错误**：请确认证书已导入「受信任的根证书」分类，并务必重启浏览器\n- **访问速度慢**：建议在「优选 IP 池」中添加更多当前环境下延迟较低的 Cloudflare 任播 IP\n\n## 致谢\n\n本项目在开发过程中参考并受益于以下优秀开源项目：\n\n- [SNIBypassGUI](https://github.com/racpast/SNIBypassGUI)\n- [DoH-ECH-Demo](https://github.com/0xCaner/DoH-ECH-Demo)\n\n## 许可\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolapijust%2Fsnishaper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolapijust%2Fsnishaper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolapijust%2Fsnishaper/lists"}