vpn-localhost-fix

Fix VPN proxy conflicts with local development tools. Use when apps like OpenCode Desktop, VS Code, or other Electron/Tauri-based applications fail to start or connect to their local servers when a VPN proxy is enabled. Symptoms include "Failed to spawn server" errors, connection refused to 127.0.0.1 ports, or apps hanging on startup. Supports Clash Verge and other system proxy VPNs on macOS.

16 stars

Best use case

vpn-localhost-fix is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Fix VPN proxy conflicts with local development tools. Use when apps like OpenCode Desktop, VS Code, or other Electron/Tauri-based applications fail to start or connect to their local servers when a VPN proxy is enabled. Symptoms include "Failed to spawn server" errors, connection refused to 127.0.0.1 ports, or apps hanging on startup. Supports Clash Verge and other system proxy VPNs on macOS.

Teams using vpn-localhost-fix should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/vpn-localhost-fix/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/vpn-localhost-fix/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/vpn-localhost-fix/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How vpn-localhost-fix Compares

Feature / Agentvpn-localhost-fixStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Fix VPN proxy conflicts with local development tools. Use when apps like OpenCode Desktop, VS Code, or other Electron/Tauri-based applications fail to start or connect to their local servers when a VPN proxy is enabled. Symptoms include "Failed to spawn server" errors, connection refused to 127.0.0.1 ports, or apps hanging on startup. Supports Clash Verge and other system proxy VPNs on macOS.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# VPN Localhost Bypass Fix

## Overview

This skill fixes issues where VPN system proxies interfere with local development tools and applications. When a VPN enables system-wide proxying, local connections (localhost/127.0.0.1) may be intercepted, preventing apps from connecting to their own backend servers.

**Common symptoms:**
- Electron/Tauri apps (OpenCode Desktop, VS Code) fail to start
- Error: `Failed to spawn server` or `Connection refused` to 127.0.0.1
- Apps work fine when VPN is disabled, fail when enabled

**Root cause:** VPN system proxy lacks bypass rules for localhost traffic.

---

## Quick Diagnosis

Confirm the issue with these checks:

```bash
# Check if system proxy is enabled
scutil --proxy | grep "HTTPSEnable : 1"

# Check if localhost is in bypass list
scutil --proxy | grep "ExceptionsList"
```

If HTTPSEnable is 1 but ExceptionsList doesn't include localhost/127.0.0.1, use this skill.

---

## Supported VPNs

### Clash Verge (macOS)

**Config file:** `~/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/verge.yaml`

**Add/modify these settings:**

```yaml
use_default_bypass: true
system_proxy_bypass: localhost, 127.0.0.1, *.local, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
```

**Steps:**
1. Backup config: `cp verge.yaml verge.yaml.backup`
2. Edit `verge.yaml` with the bypass settings above
3. Restart Clash Verge
4. Verify: `scutil --proxy | grep ExceptionsList`

### Other VPNs

Look for settings named:
- "Bypass List" / "例外列表" / "绕过规则"
- "Proxy Exclusions" / "Direct Connection"
- "Local addresses bypass"

Add: `localhost, 127.0.0.1, *.local`

---

## Verification

After applying the fix:

```bash
# Verify bypass rules are active
scutil --proxy | grep -A 10 "ExceptionsList"
```

Expected output should include:
```
ExceptionsList : <array> {
  0 : 127.0.0.1
  1 : localhost
  2 : *.local
  ...
}
```

---

## Standard Bypass Rules

Recommended bypass list for most users:

```
localhost, 127.0.0.1, *.local, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
```

| Entry | Purpose |
|-------|---------|
| `localhost` | Local hostname |
| `127.0.0.1` | Loopback interface |
| `*.local` | Bonjour/mDNS local domains |
| `192.168.0.0/16` | Private network class C |
| `10.0.0.0/8` | Private network class A |
| `172.16.0.0/12` | Private network class B |

---

## Troubleshooting

**Problem:** Still failing after adding bypass rules

**Solutions:**
1. Restart the VPN application completely
2. Restart the affected application (OpenCode Desktop, etc.)
3. Check for multiple VPNs running simultaneously - disable extras
4. Verify config file syntax (YAML for Clash)

**Problem:** Multiple VPNs with conflicting ports

**Solution:** Ensure each VPN uses different proxy ports (e.g., Clash: 7897)

Related Skills

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

websocket-engineer

16
from diegosouzapw/awesome-omni-skill

Real-time communication specialist implementing scalable WebSocket architectures. Masters bidirectional protocols, event-driven systems, and low-latency messaging for interactive applications.

webscraping-ai-automation

16
from diegosouzapw/awesome-omni-skill

Automate Webscraping AI tasks via Rube MCP (Composio). Always search tools first for current schemas.

webflow-automation

16
from diegosouzapw/awesome-omni-skill

Automate Webflow CMS collections, site publishing, page management, asset uploads, and ecommerce orders via Rube MCP (Composio). Always search tools first for current schemas.

Webex Automation

16
from diegosouzapw/awesome-omni-skill

Automate Cisco Webex messaging, rooms, teams, webhooks, and people management through natural language commands

webapp-testing

16
from diegosouzapw/awesome-omni-skill

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

webapp-test-docker-demo

16
from diegosouzapw/awesome-omni-skill

Dedicated test Agent responsible for managing all E2E tests for the webapp-test-docker-demo project. Use this skill when you need to run tests, view test lists, generate test reports, or create new tests. This Agent knows all test files in the project, can execute tests and provide detailed reports. The project uses Docker Compose and Playwright for end-to-end testing.

web3-testing

16
from diegosouzapw/awesome-omni-skill

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or va...

web-search

16
from diegosouzapw/awesome-omni-skill

Web search and content extraction toolkit. Use for searching documentation, facts, current information, or extracting readable content from URLs. Supports multiple providers (ddgs keyless, brave_api with key), caching, and safe defaults. Prefer this over browser-tools when no interaction is needed.

web-scraping

16
from diegosouzapw/awesome-omni-skill

Web scraping best practices for AI coding agents. Covers tmux session management for long-running scrapes, Crawl4AI integration, parallel pipeline orchestration, resume-friendly architecture, and rate limit handling. Use this skill when building scrapers, running data extraction jobs, or managing lead generation pipelines.

web-research

16
from diegosouzapw/awesome-omni-skill

Perform web research using OpenAI APIs. Fast mode uses gpt-5-search-api for quick lookups. Normal/deep modes use o3-deep-research model for comprehensive multi-step research with code interpreter. Invoke when user needs current web information or thorough research on a topic.

web-qa-bot

16
from diegosouzapw/awesome-omni-skill

AI-powered automated QA for web apps. Smoke tests, accessibility, visual regression. Works with Cursor, Claude, ChatGPT, Copilot. Vibe-coding ready.