cso1z

A Claude Code hook plugin for IP-based access control · 防 Claude 封号 · Claude IP 检测 · IP 地理位置拦截 · Claude 账号保护

18
2
100% credibility
Found Mar 27, 2026 at 18 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Shell
AI Summary

A Claude Code hook plugin that intercepts user prompts to block or warn based on IP geolocation in restricted countries and direct connectivity checks, aiming to prevent Claude account bans due to IP issues.

Star Growth

See how this repo grew from 18 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is claude-ip-guard?

This Shell-based plugin hooks into Claude Code CLI to enforce IP-based access control, blocking prompts from restricted countries like China or Russia that could trigger Anthropic account bans. It checks your public IP geolocation on session start and every prompt, with proxy-aware logic that skips verification for third-party proxies via ANTHROPIC_BASE_URL. Developers get fail-safe access (no blocks on network errors), 30-day IP history tracking, and graded warnings for new IPs, all via a one-command install.sh for global or per-project setup on macOS, Linux, WSL, or Windows Git Bash.

Why is it gaining traction?

It stands out with smart split-tunnel detection—allowing access sans history logging if you're direct-connecting from a blocked country—and lightweight caching that skips full checks for repeat IPs under 10 minutes. The graded new-IP alerts (info to critical) plus daily logs give visibility without paranoia, and dual geo APIs ensure reliability. Free MIT license and Claude Code GitHub plugin simplicity make it a quick claude code install for ban prevention, unlike manual VPN fiddling.

Who should use this?

Claude Code users in sanctioned regions (CN, RU, IR) or with frequent IP changes from travel/VPNs, especially backend devs scripting via claude code cli on Linux/WSL. Teams integrating claude github actions or claude github connector can commit hooks for shared claude access control. Windows devs running claude code windows via Git Bash will appreciate the no-WSL setup for claude code free account protection.

Verdict

Grab it from claude code github if IP bans haunt your Claude workflow—docs are thorough, install is dead simple, and features deliver real claude code pricing peace of mind without downtime. At 18 stars and 1.0% credibility, it's immature with no tests, so test in a throwaway account first.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.