YOURSJEYO/claude-switcher

Fail-Closed 账号环境管理器:11项环境指纹审计(Block-on-Fail)、手写STUN协议栈的WebRTC泄漏探针、Kill-Switch断网急停、多账号快照隔离、配置漂移自愈 —— 让真实IP在物理上无法泄漏

Claude 切换器 – Fail‑Closed 环境管理器

What it is – A native macOS (and beta Windows/Linux) application that protects your Claude AI account from accidental IP leaks. Before launching Claude it runs a 14‑point audit of the network and system fingerprint (proxy, TUN, exit IP, timezone, locale, IPv6, DNS, WebRTC, etc.). If any check fails the app refuses to start, ensuring no direct connection can expose your real IP.

Key capabilities

Feature How it works
Block‑on‑Fail audit Runs 14 environment checks; any red flag aborts launch.
STUN‑based WebRTC probe Hand‑crafted RFC 5389 client (Python) that queries global and domestic STUN servers to detect hidden IP leaks without a browser.
Kill‑Switch daemon A watchdog process polls the tunnel every 10 s; loss of the proxy instantly terminates Claude.
Session snapshots Each Claude account gets its own isolated data volume (device fingerprint, OAuth token, local state) that can be swapped atomically.
Configuration self‑healing Watchdog restores proxy, timezone, routing, etc., if an update or other process resets them.
Pinned routing Critical Claude domains are forced through the proxy with top‑priority routing rules, bypassing any third‑party split‑tunnel rules.
Cross‑platform macOS (SwiftUI, zero external deps), Windows (PowerShell + WPF, beta), Linux (bash + systemd, beta).

Installation (macOS)

git clone https://github.com/YOURSJEYO/claude-switcher.git
# double‑click installer/安装.command – it auto‑detects your proxy client, group and target region

No Xcode project required – the SwiftUI UI lives in a single main.swift file and is compiled with a single swiftc call.

Typical workflow

  1. Launch Claude 切换器 → wait for the 14 checks (green = OK, red = problem).
  2. If all green, pick the Claude account to start.
  3. When you change proxy nodes, run ~/.local/bin/claude-switch.sh set‑region – the script re‑detects the exit country, updates timezone and locale, and rewrites the app’s config.
  4. The background watchdog will automatically fix drift (e.g., proxy client resets) and kill Claude if the tunnel drops.

Why it matters – Claude (and similar LLM services) now enforce multi‑dimensional risk scoring: IP, timezone, locale, DNS, WebRTC, ASN, etc. A single stray TCP SYN from your real ISP can trigger a ban. This tool moves the protection from “remember to enable a proxy” to a system‑level hard block, making accidental leaks practically impossible.

Project status – Actively maintained (roadmap shows macOS stable, Windows/Linux beta, upcoming web‑based detector and more fingerprint dimensions). MIT‑licensed, zero third‑party dependencies.


TL;DR – Claude Switcher is a security‑focused utility that audits and enforces a proxy‑only environment before launching Claude, with a kill‑switch, snapshot‑based account isolation, and self‑healing configuration. Ideal for power users who need to keep their Claude accounts from being flagged by aggressive anti‑abuse systems.

Related

  • Project
  • Project
  • Project
  • Project