Skip to content

Releases: OctopusGarage/net-auto-switch

v0.2.4 — built-in geo recognition + node diagnostics

Choose a tag to compare

@Kingson4Wu Kingson4Wu released this 17 Jun 12:09
93ad668

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); --probe adds the exit operator/country (retried, switches+restores the node, warns under TUN), plus a name/entry/exit consistency NOTE (中转 NL→AE, 名实相符).
  • Interactive init priority 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_priority are auto-translated, so existing configs keep loading.
  • CodeQL advanced setup (tests excluded from analysis).

Fixed

  • .gitignore now ignores config.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

Choose a tag to compare

@Kingson4Wu Kingson4Wu released this 16 Jun 06:05
affbdd0

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.sh offers to install it; or run npx skills add OctopusGarage/net-auto-switch -y -g.

Fixed

  • connections -w (watch) is now responsive: q or Ctrl-C quits immediately (previously Ctrl-C could hang while --whois worker 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 --whois caches 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 -w exits 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 | bash

Full Changelog: v0.2.2...v0.2.3

v0.2.2 — connections view, faster whois, shell completion

Choose a tag to compare

@Kingson4Wu Kingson4Wu released this 15 Jun 18:47
faf4615

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 /connections API (host → node → rule). Rows are folded by host + node with a connection count (--raw lists each); --whois labels each target's IP / operator / country, resolving the domain itself when Clash exposes no IP (proxied connections); -w/--watch refreshes 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 ~/.zshrc block, and update refreshes the completion in place.

Changed

  • The whois Clash-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 | bash

Full Changelog: v0.2.1...v0.2.2

v0.2.1 — Clash profile whois scan

Choose a tag to compare

@Kingson4Wu Kingson4Wu released this 15 Jun 16:21
abe057c

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 whois with no targets now reads the current Clash Verge profile and resolves each proxy server, 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 | bash

Full Changelog: v0.2.0...v0.2.1

v0.2.0 — cross-platform (Linux & Windows)

Choose a tag to compare

@Kingson4Wu Kingson4Wu released this 15 Jun 09:34
2f43c0b

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-send on 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 --once every main_interval minutes (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, then net-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

Choose a tag to compare

@Kingson4Wu Kingson4Wu released this 15 Jun 08:30
v0.1.0
d11226c

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 — init wizard auto-detects Clash Verge, infers regions, gates on a health check.
  • Notifications & whois — macOS banner on every switch (with exit operator); a standalone whois lookup (DoH by default).
  • Easy install — curl | bash one-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