# Self Vpn Setup

> Guide Codex to help users provision a personal VPN on Aliyun SWAS and configure a client (primarily v2rayN). Use when a user asks to set up a self-hosted VPN/proxy, wants a dedicated IP for AI subscriptions, needs higher stability/privacy than shared VPNs, or requests step-by-step Aliyun SWAS provisioning and client setup.

- **Type:** Skill
- **Install:** `agentstack add skill-gansxx-self-vpn-skill-self-vpn-setup`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [gansxx](https://agentstack.voostack.com/s/gansxx)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [gansxx](https://github.com/gansxx)
- **Source:** https://github.com/gansxx/self-vpn-skill/tree/main/skills/self-vpn-setup
- **Website:** https://github.com/gansxx/self-vpn-skill

## Install

```sh
agentstack add skill-gansxx-self-vpn-skill-self-vpn-setup
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Self VPN Setup

## Overview

Provide a step-by-step workflow to help the user buy an Aliyun SWAS instance, install the VPN stack with a one-line script, and configure their client. Keep the flow interactive by confirming prerequisites, OS, and credentials before running commands.

## Workflow

### 0. Collect Required Inputs First

- Request a single reply containing: client OS, Aliyun account status, target region, instance public IP, and whether the user allows credential sharing.
- If the user does not want to share credentials, switch to "user-runs-command" mode and provide exact copy-paste commands.

### 1. Qualify And Prepare

- Confirm the user wants a self-hosted VPN and understands they will pay the cloud provider directly.
- Ask which OS the user will run the client on. Default workflow assumes Windows with v2rayN.
- Ask whether the user already has an Aliyun account and a payment method.

### 2. Provision The Server

- Direct the user to the Aliyun SWAS purchase page and walk them through instance selection.
- Ensure the user opens all required ports in the SWAS firewall (TCP+UDP all).
- Ask for the instance public IP after purchase.

### 3. Install The VPN Stack

- Ask the user to reset the instance password in the SWAS console.
- If credentials are shared, use SSH to connect and run the install script.
- If credentials are not shared, instruct the user to run the same command locally and paste back the final share link line(s).
- Capture the output and return only the final share link line(s) to the user.

### 4. Configure The Client

- Provide the correct client download link for the user OS.
- For v2rayN, instruct how to import the share link and test latency.

### 5. Validate And Troubleshoot

- Recommend testing with the hysteria protocol first if present.
- If latency is -1 or no connectivity, check firewall settings and IP/password correctness first.
- If Google or other sites fail, advise checking client rules and enabling TUN mode.
- If campus/corporate networks block ports, suggest waiting or switching ports.
- Declare setup success only when latency is not `-1` and at least one target site is reachable.

## Reference

Follow the detailed workflow and troubleshooting checklist in `references/workflow.md`. Load it when you need the exact URLs, copy-paste commands, or testing steps.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [gansxx](https://github.com/gansxx)
- **Source:** [gansxx/self-vpn-skill](https://github.com/gansxx/self-vpn-skill)
- **License:** MIT
- **Homepage:** https://github.com/gansxx/self-vpn-skill

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-gansxx-self-vpn-skill-self-vpn-setup
- Seller: https://agentstack.voostack.com/s/gansxx
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
