Releases: OctopusGarage/net-auto-switch
Release list
v0.2.4 — built-in geo recognition + node diagnostics
Nodes are now recognized by a built-in country/city catalog (no per-user region config), switching is a country→city two-level hierarchy, and a new nodes command surfaces each node's region, entry operator, and (probed) exit.
Added
- Built-in geo catalog — ~60 countries + major cities, each with ISO code / English / 简 / 繁; the flag emoji is derived from the ISO code. Names like
SG01,日本节点01,🇦🇪|阿联酋resolve out of the box; you no longer write region regexes. net-auto-switch nodes— lists each node's recognized region and entry operator/country (whois on the server);--probeadds the exit operator/country (retried, switches+restores the node, warns under TUN), plus a name/entry/exit consistency NOTE (中转 NL→AE,名实相符).- Interactive
initpriority wizard — a numbered, count-sorted menu of the countries detected in your subscription; type indices to set country order, with a per-country city menu when cities are detected. Stdlib only, no new dependencies.
Changed
- Country→city two-level switching with an engine-derived, country-contiguous downgrade chain; the four selection invariants are unchanged and grouping is fully offline (the exit probe left the switching path). See ADR-0017.
- Config surface:
clash.priority(ordered country codes) + optional[clash.cities]; legacy[clash.patterns]/[clash.regions]/group_priorityare auto-translated, so existing configs keep loading. - CodeQL advanced setup (tests excluded from analysis).
Fixed
.gitignorenow ignoresconfig.toml.bak(it carries the Clash secret).
Install / update:
curl -fsSL https://raw.githubusercontent.com/OctopusGarage/net-auto-switch/main/install.sh | bash
Full Changelog: v0.2.3...v0.2.4
v0.2.3 — agent skill + responsive connections watch
Adds an AI agent skill and makes the live connections watch responsive and flicker-free.
Added
- Agent skill (
skills/net-auto-switch) — a Claude Code / cross-agent skill teaching an AI agent to operate and diagnose the tool (current node, operator behind a host, live connections, service status, update).install.shoffers to install it; or runnpx skills add OctopusGarage/net-auto-switch -y -g.
Fixed
connections -w(watch) is now responsive:qor Ctrl-C quits immediately (previously Ctrl-C could hang while--whoisworker threads were mid-lookup), the redraw is flicker-free (in-place repaint instead of a full-screen clear), and the cursor is hidden during watch.connections --whoiscaches only successful lookups, so a transient DoH/whois failure retries on the next tick instead of being pinned as a permanent blank for the session.connections -wexits cleanly on stdin EOF instead of busy-looping.- The whois profile-scan test now passes on the windows-latest CI matrix (Windows tmp paths were breaking TOML parsing).
Changed
- Internal: the concurrent whois fan-out is shared between the profile scan and connections enrichment.
Install:
curl -fsSL https://raw.githubusercontent.com/OctopusGarage/net-auto-switch/main/install.sh | bashFull Changelog: v0.2.2...v0.2.3
v0.2.2 — connections view, faster whois, shell completion
Adds a live connections view, speeds up the whois node scan, and ships zsh tab-completion.
Added
net-auto-switch connections— list what the machine is contacting right now and through which outbound node, read from Clash's/connectionsAPI (host → node → rule). Rows are folded byhost + nodewith a connection count (--rawlists each);--whoislabels each target's IP / operator / country, resolving the domain itself when Clash exposes no IP (proxied connections);-w/--watchrefreshes live. It only sees traffic that goes through Clash (proxied / TUN), not direct/bypassed traffic.- zsh tab-completion for every subcommand and flag, bundled in the release tarball and registered idempotently by
install.sh— re-installing never duplicates the~/.zshrcblock, andupdaterefreshes the completion in place.
Changed
- The
whoisClash-profile scan now runs lookups concurrently (≤8) and prints per-server[n/N]progress to stderr, so a 32-node profile no longer looks frozen for minutes. The stdout table is unchanged.
Install:
curl -fsSL https://raw.githubusercontent.com/OctopusGarage/net-auto-switch/main/install.sh | bashFull Changelog: v0.2.1...v0.2.2
v0.2.1 — Clash profile whois scan
Adds a default Clash profile scan to net-auto-switch whois, so running it without targets reports the provider behind each configured node server.
Added
net-auto-switch whoiswith no targets now reads the current Clash Verge profile and resolves each proxyserver, de-duplicating repeated hosts before lookup.- The output groups rows under the current profile uid/name and includes node name, server, resolved IP, operator, and country.
Changed
- Split whois lookups into reusable result objects while preserving the existing explicit target output path.
Install:
curl -fsSL https://raw.githubusercontent.com/OctopusGarage/net-auto-switch/main/install.sh | bashFull Changelog: v0.2.0...v0.2.1
v0.2.0 — cross-platform (Linux & Windows)
The Clash node auto-switch core now runs on Linux and Windows, with a native background service on each platform.
Added
- Cross-platform core — the Clash selection/switching loop only talks to the Clash Verge API over HTTP, so it runs on Linux/Windows too. macOS-only features degrade gracefully: WiFi switching and profile fallback are skipped off macOS; notifications use
notify-sendon Linux, no-op on Windows. (ADR-0015) service install / uninstall / status— one command, platform-native: launchd (macOS), systemd--user(Linux,Restart=always+ linger), Task Scheduler running--onceeverymain_intervalminutes (Windows). (ADR-0016)- CI matrix across ubuntu + macos + windows.
Notes
- macOS behavior is unchanged.
- On Linux/Windows: copy
config.example.toml→config.toml, fill in your Clash API settings, thennet-auto-switch service install.
Install / update
curl -fsSL https://raw.githubusercontent.com/OctopusGarage/net-auto-switch/main/install.sh | bash
Full Changelog: v0.1.0...v0.2.0
v0.1.0 — net-auto-switch
Layered network self-healing daemon for macOS — auto-switches WiFi and Clash Verge proxy nodes/profiles to keep you online with a good proxy.
Highlights
- Layered auto-switch — WiFi (physical) then Clash (proxy) every cycle; config-driven region groups, latency-based selection with priority fallback, profile fallback when all nodes are dead.
- Guided setup —
initwizard auto-detects Clash Verge, infers regions, gates on a health check. - Notifications & whois — macOS banner on every switch (with exit operator); a standalone
whoislookup (DoH by default). - Easy install —
curl | bashone-liner pulling a curated lean release asset; self-updating; launchd service.
Install
curl -fsSL https://raw.githubusercontent.com/OctopusGarage/net-auto-switch/main/install.sh | bash