mcpField
S
sc-vpn

sc-vpn

github.com/starchild-ai-agent云与 DevOps30141 次安装6 天前更新
代码仓库

关于 sc-vpn

sc-vpn 是面向 Starchild 内部网络用户的 VPN 网关技能,可为受地域限制或连接受阻的请求指定出口国家。它支持 18 个固定国家的单请求代理,并提供隧道与流量状态的 REST API。

主要功能

  1. 01按请求使用 HTTP 和 HTTPS 代理
  2. 02覆盖 18 个固定国家的出口节点
  3. 03按延迟每日选择服务器
  4. 04提供隧道、状态和用量 REST 接口
  5. 05按源 IP 识别用量

适用场景

  1. 01通过指定国家出口发送受地域限制的 API 请求
  2. 02检查隧道状态和延迟
  3. 03按源 IP 查看流量统计

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/starchild-ai-agent/official-skills --skill sc-vpn

安装后在 Claude Code 中输入/sc-vpn确认已加载。

详细介绍

SC-VPN Gateway

Starchild 平台的内部 VPN 服务。提供 18 个固定国家/地区的出口节点——仅可从 Starchild 内部网络访问。无需凭据或设置。

⚠️ 何时使用

SC-VPN 是最后的手段,而不是默认选项。 大多数 Agent 的 HTTP 流量已通过 sc-proxy(平台用于付费 API 的透明计费代理)。设置全局 VPN 代理会 破坏 sc-proxy 的路由。

仅在以下情况下使用 SC-VPN:

  • 特定请求遭到 地理位置屏蔽或返回区域错误
  • 你需要在某个特定 API 调用中显示来自 特定国家/地区
  • 目标网站/API 拒绝来自默认出口的连接

始终使用单请求代理(向 requests.get() 传入 proxies=,或向 curl 传入 -x)。切勿设置全局 HTTP_PROXY / HTTPS_PROXY 环境变量

可用国家/地区

国家/地区代码示例城市
🇦🇺 澳大利亚auAdelaide、Sydney、Melbourne
🇨🇭 瑞士chZürich
🇩🇪 德国deBerlin、Frankfurt
🇯🇵 日本jpTokyo、Osaka
🇲🇾 马来西亚myKuala Lumpur
🇲🇽 墨西哥mxQuerétaro
🇹🇭 泰国thBangkok
🇿🇦 南非zaJohannesburg
🇧🇷 巴西brSão Paulo、Fortaleza
🇦🇷 阿根廷arBuenos Aires
🇸🇬 新加坡sgSingapore
🇭🇰 香港hkHong Kong
🇬🇧 英国gbLondon、Manchester
🇳🇱 荷兰nlAmsterdam
🇫🇷 法国frParis、Marseille
🇸🇪 瑞典seStockholm、Malmö
🇪🇸 西班牙esMadrid
🇮🇹 意大利itMilan、Rome

仅支持这 18 个国家/地区。 其他地区的请求会被拒绝(502)。每个国家/地区使用的具体服务器会根据延迟每天自动选择。

快速开始

curl(单请求代理)
# Route ONE request through Japan
curl -x "http://jp:[email protected]:8080" https://ifconfig.me

# Route ONE request through Brazil
curl -x "http://br:[email protected]:8080" https://example.com/api
Python requests(单请求代理)
import requests

def vpn_proxy(region: str) -> dict:
    """Return proxy dict for a given region code."""
    return {
        "https": f"http://{region}:[email protected]:8080",
        "http":  f"http://{region}:[email protected]:8080",
    }

# Only the geo-blocked request goes through VPN
resp = requests.get("https://geo-restricted-api.example.com", proxies=vpn_proxy("jp"))

# All other requests go through normal sc-proxy routing (no proxies= arg)
resp2 = requests.get("https://api.coingecko.com/...")
❌ 请勿这样做
# WRONG — may influence other requests
export HTTP_PROXY="http://jp:[email protected]:8080"
export HTTPS_PROXY="http://jp:[email protected]:8080"

区域选择

代理 URL 中的 用户名用于选择出口国家/地区:

输入解析为
jp 或 japanJapan
au 或 australiaAustralia
de 或 germanyGermany
ch 或 switzerlandSwitzerland
th 或 thailandThailand
br 或 brazilBrazil
ar 或 argentinaArgentina
mx 或 mexicoMexico
my 或 malaysiaMalaysia
za 或 south_africaSouth Africa
sg 或 singaporeSingapore
hk 或 hong_kongHong Kong
gb 或 uk 或 united_kingdomUnited Kingdom
nl 或 netherlandsNetherlands
fr 或 franceFrance
se 或 swedenSweden
es 或 spainSpain
it 或 italyItaly

REST API

基础 URL:http://sc-vpn.internal:8081

端点说明
GET /api/tunnels所有 18 条隧道的状态(区域、延迟、运行时间)
GET /api/status网关概览
GET /api/usage你的流量统计(根据源 IP 识别)
GET /health健康检查

速率限制

限制默认值
每个客户端的月度配额500 GB
最大并发连接数50
每秒请求数100

客户端根据源 IP 识别。无需 API 密钥——仅限内部网络访问。

验证是否正常工作

# Your real exit IP
curl https://ifconfig.me

# VPN exit IP (should be different, from Japan)
curl -x "http://jp:[email protected]:8080" https://ifconfig.me

故障排除

问题解决方法
502 Bad Gateway: Unknown region使用以下代码之一:au、ch、de、jp、my、mx、th、za、br、ar、sg、hk、gb、nl、fr、se、es、it
502 Bad Gateway: Tunnel not active网关可能需要重启——检查 /api/status
400 Bad Request: No region specified在代理 URL 中添加用户名:http://jp:[email protected]:8080
sc-vpn.internal 的 DNS 解析失败仅可从 Starchild 内部网络访问
使用 VPN 后其他请求异常你设置了全局 HTTP_PROXY——立即取消设置

评论

支持 Markdown