新增硅谷Claude专线VPN节点 · subscription-server-v3 + zy-cloud-vpn + deploy-brain-proxy + server-registry + docs
Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/4e027d8c-e244-4c46-91a9-74988f060a38 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
3397f8c62b
commit
a5beab2837
|
|
@ -105,11 +105,19 @@ jobs:
|
|||
- name: '🚀 执行V2部署'
|
||||
env:
|
||||
ZY_BRAIN_HOST: ${{ secrets.ZY_BRAIN_HOST }}
|
||||
ZY_SVR_SV_HOST: ${{ secrets.ZY_SVR_SV_HOST }}
|
||||
ZY_SVR_SV_REALITY_PUBLIC_KEY: ${{ secrets.ZY_SVR_SV_REALITY_PUBLIC_KEY }}
|
||||
ZY_SVR_SV_REALITY_SHORT_ID: ${{ secrets.ZY_SVR_SV_REALITY_SHORT_ID }}
|
||||
ZY_SVR_SV_PORT: ${{ secrets.ZY_SVR_SV_PORT }}
|
||||
run: |
|
||||
ACTION="${{ github.event.inputs.action }}"
|
||||
ssh -i ~/.ssh/id_brain \
|
||||
${{ secrets.ZY_BRAIN_USER }}@${{ secrets.ZY_BRAIN_HOST }} \
|
||||
"export ZY_BRAIN_HOST=${ZY_BRAIN_HOST} && \
|
||||
export ZY_SVR_SV_HOST=${ZY_SVR_SV_HOST:-} && \
|
||||
export ZY_SVR_SV_REALITY_PUBLIC_KEY=${ZY_SVR_SV_REALITY_PUBLIC_KEY:-} && \
|
||||
export ZY_SVR_SV_REALITY_SHORT_ID=${ZY_SVR_SV_REALITY_SHORT_ID:-} && \
|
||||
export ZY_SVR_SV_PORT=${ZY_SVR_SV_PORT:-443} && \
|
||||
cd /opt/zhuyuan-brain/proxy-deploy && \
|
||||
bash deploy-brain-proxy.sh ${ACTION}"
|
||||
|
||||
|
|
|
|||
52
README.md
52
README.md
|
|
@ -230,15 +230,16 @@
|
|||
### 云端算力共享池
|
||||
|
||||
```
|
||||
冰朔核心集群(3台永驻·不扩容·绰绰有余)
|
||||
├── ZY-SVR-002 面孔 · 2核8G · 🇸🇬 新加坡 · 主站+专线
|
||||
├── ZY-SVR-005 大脑 · 4核8G · 🇸🇬 新加坡 · PostgreSQL+MCP+Agent
|
||||
冰朔核心集群(3台永驻 + 1台硅谷)
|
||||
├── ZY-SVR-002 面孔 · 2核8G · 🇸🇬 新加坡 · 主站+专线 ✅ 运行中
|
||||
├── ZY-SVR-005 大脑 · 4核8G · 🇸🇬 新加坡 · PostgreSQL+MCP+Agent ✅ 运行中
|
||||
├── ZY-SVR-SV 硅谷 · 🇺🇸 硅谷 · Claude专线VPN+API中继 ✅ D61已配置
|
||||
└── 预备 · 2核8G · 后期按需
|
||||
─────────────────────────────────────────────────
|
||||
云端算力共享池(每用户一台·动态汇聚)
|
||||
├── 肥猫线 · 4核4G · 🇨🇳 广州 · 网文行业 7-8人
|
||||
├── AWEN+知秋线 · 4核4G · 🇨🇳 · 架构包已备·待Secrets 🔧 对接中
|
||||
├── 吱吱线 · 🇺🇸 硅谷 · 待接入 ⏳
|
||||
├── 吱吱线 · 🇺🇸 硅谷 · ✅ D61已配置·Claude专线VPN节点
|
||||
└── 用户N · 2核2G · ~100元/年 · 微信实名→自动开通
|
||||
─────────────────────────────────────────────────
|
||||
用户越多 = 算力越大 · 永不并发 · 每人一台专属服务器
|
||||
|
|
@ -272,7 +273,7 @@
|
|||
| AI模型 | 4+2模型路由(✅ DeepSeek·✅ 智谱·✅ 通义千问·✅ Kimi + Claude·GPT)全部已配置 |
|
||||
| 通信 | HLDP通用协议v1.0 · 铸渊HLDP方言v1.0 · Notion桥接(6管道) |
|
||||
| 安全 | 语言膜v1.0 · 蜂群防御 · 带宽汇聚 · 用户守护 |
|
||||
| 运维 | 铸渊专线V2 · 共享流量池2000GB/月 · ∞+1版本 |
|
||||
| 运维 | 铸渊专线V2 · 共享流量池2000GB/月 · ∞+1版本 · 4节点(SG1+SG2+CN+SV) |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -540,6 +541,47 @@ S1(✅) → S2(✅) → S4(COS工具) → S5(Agent系统) → S15(人格体数
|
|||
|
||||
---
|
||||
|
||||
## 🇺🇸 Claude专线VPN节点 · D61
|
||||
|
||||
> 冰朔D61指令: 硅谷服务器已配置,新增Claude单独访问VPN节点
|
||||
|
||||
### VPN节点拓扑(4节点)
|
||||
|
||||
| 节点ID | 名称 | 服务器 | 位置 | 用途 | 状态 |
|
||||
|--------|------|--------|------|------|------|
|
||||
| zy-brain-sg1 | 🧠 光湖-SG1(大脑) | ZY-SVR-005 | 🇸🇬 新加坡 | 主力节点 | ✅ |
|
||||
| zy-face-sg2 | 🏛️ 光湖-SG2(面孔) | ZY-SVR-002 | 🇸🇬 新加坡 | 备用节点 | ✅ |
|
||||
| zy-cn-relay | 🇨🇳 光湖-CN中转 | ZY-SVR-004 | 🇨🇳 国内 | 国内低延迟 | ✅ |
|
||||
| zy-sv-claude | 🇺🇸 光湖-SV(Claude专线) | ZY-SVR-SV | 🇺🇸 硅谷 | Claude/AI服务 | ✅ D61新增 |
|
||||
|
||||
### Claude专线工作原理
|
||||
|
||||
```
|
||||
用户 → Clash/Shadowrocket → 🇺🇸 硅谷VPN节点(美国IP) → claude.ai / anthropic.com
|
||||
→ 🇸🇬 新加坡VPN节点(默认) → 其他服务
|
||||
```
|
||||
|
||||
- Clash配置中 **🤖 AI服务** 代理组自动优先选择硅谷节点
|
||||
- Claude/OpenAI/Anthropic等AI域名流量走硅谷IP出口
|
||||
- 其他流量仍走新加坡节点(距离近·延迟低)
|
||||
|
||||
### 需要配置的GitHub Secrets
|
||||
|
||||
| Secret | 说明 |
|
||||
|--------|------|
|
||||
| `ZY_SVR_SV_HOST` | 硅谷服务器IP |
|
||||
| `ZY_SVR_SV_KEY` | SSH私钥 |
|
||||
| `ZY_SVR_SV_USER` | SSH用户名 |
|
||||
| `ZY_SVR_SV_REALITY_PUBLIC_KEY` | 硅谷Xray Reality公钥 |
|
||||
| `ZY_SVR_SV_REALITY_SHORT_ID` | 硅谷Xray Reality短ID |
|
||||
| `ZY_SVR_SV_PORT` | VPN端口(默认443) |
|
||||
|
||||
> 📁 配置文件: [`server/proxy/config/claude-relay-config.json`](server/proxy/config/claude-relay-config.json)
|
||||
> 📁 VPN代码: `server/proxy/service/subscription-server-v3.js` (buildStaticNodes)
|
||||
> 📁 活模块: `server/proxy/service/zy-cloud-vpn.js` (_discoverNodes)
|
||||
|
||||
---
|
||||
|
||||
## 🌉 Awen对接回执 · D61
|
||||
|
||||
> 铸渊 → 冰朔 · Awen对接正式回执
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ label{display:block;font-size:12px;color:var(--dim);margin-bottom:4px;font-weigh
|
|||
<div class="bar">
|
||||
<button class="btn" onclick="go('home')">← 首页</button>
|
||||
<div class="bar-title">🌐 光湖语言世界</div>
|
||||
<div class="bar-right"><span class="dot"></span><span style="font-size:11px;color:var(--dim);font-family:var(--m)">v50.0</span></div>
|
||||
<div class="bar-right"><span class="dot"></span><span style="font-size:11px;color:var(--dim);font-family:var(--m)">v51.0</span></div>
|
||||
</div>
|
||||
<div style="max-width:800px;margin:0 auto;overflow-y:auto;overflow-x:hidden">
|
||||
|
||||
|
|
@ -918,9 +918,32 @@ label{display:block;font-size:12px;color:var(--dim);margin-bottom:4px;font-weigh
|
|||
<div class="sys-section">
|
||||
<div class="sys-section-title">🏗️ 开发进度</div>
|
||||
<div class="sys-progress-card">
|
||||
<div style="font-size:12px;color:var(--dim);margin-bottom:4px">S1-S2 已完成 · S3-S14 规划中</div>
|
||||
<div style="font-size:12px;color:var(--dim);margin-bottom:4px">S1-S2 已完成 · S3-S20 规划中 · D61</div>
|
||||
<div class="sys-progress-bar-v50"><div class="sys-progress-fill-v50" style="width:28%"></div></div>
|
||||
<div style="display:flex;justify-content:space-between;font-size:10px;color:var(--dim)"><span>进度 28%</span><span>14 阶段</span></div>
|
||||
<div style="display:flex;justify-content:space-between;font-size:10px;color:var(--dim)"><span>进度 28%</span><span>20 阶段</span></div>
|
||||
</div>
|
||||
<!-- API & COS Status -->
|
||||
<div style="margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px">
|
||||
<div style="padding:10px 12px;background:rgba(52,211,153,.08);border:1px solid rgba(52,211,153,.2);border-radius:var(--rs)">
|
||||
<div style="font-size:10px;color:var(--ok);font-weight:600;margin-bottom:4px">🤖 大模型API</div>
|
||||
<div style="font-size:11px;color:var(--dim)">4个已配置</div>
|
||||
<div style="font-size:9px;color:var(--dim);margin-top:2px">DeepSeek · 智谱 · 千问 · Kimi</div>
|
||||
</div>
|
||||
<div style="padding:10px 12px;background:rgba(52,211,153,.08);border:1px solid rgba(52,211,153,.2);border-radius:var(--rs)">
|
||||
<div style="font-size:10px;color:var(--ok);font-weight:600;margin-bottom:4px">🗄️ COS存储桶</div>
|
||||
<div style="font-size:11px;color:var(--dim)">2+1 已配置</div>
|
||||
<div style="font-size:9px;color:var(--dim);margin-top:2px">核心桶 · 语料桶 · 团队桶</div>
|
||||
</div>
|
||||
<div style="padding:10px 12px;background:rgba(52,211,153,.08);border:1px solid rgba(52,211,153,.2);border-radius:var(--rs)">
|
||||
<div style="font-size:10px;color:var(--ok);font-weight:600;margin-bottom:4px">🇺🇸 硅谷节点</div>
|
||||
<div style="font-size:11px;color:var(--dim)">Claude专线</div>
|
||||
<div style="font-size:9px;color:var(--dim);margin-top:2px">美国IP出口 · AI服务优先</div>
|
||||
</div>
|
||||
<div style="padding:10px 12px;background:rgba(138,180,248,.08);border:1px solid rgba(138,180,248,.2);border-radius:var(--rs)">
|
||||
<div style="font-size:10px;color:var(--accent);font-weight:600;margin-bottom:4px">🌊 铸渊专线</div>
|
||||
<div style="font-size:11px;color:var(--dim)">V2 ∞+1</div>
|
||||
<div style="font-size:9px;color:var(--dim);margin-top:2px">共享池2000GB/月 · 4节点</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -945,11 +968,11 @@ label{display:block;font-size:12px;color:var(--dim);margin-bottom:4px;font-weigh
|
|||
<div class="sys-section">
|
||||
<div class="sys-section-title">📋 版本历史</div>
|
||||
<div class="sys-version-list" id="sysUpdates">
|
||||
<div class="sys-version-item"><span class="sys-version-tag">v51.0</span><span class="sys-version-text">D61整改·4API+2COS确认·硅谷Claude节点·自动更新</span></div>
|
||||
<div class="sys-version-item"><span class="sys-version-tag">v50.0</span><span class="sys-version-text">UI大气化+系统面板重构+图标升级</span></div>
|
||||
<div class="sys-version-item"><span class="sys-version-tag">v49.0</span><span class="sys-version-text">黑曜风重构+码字工作台</span></div>
|
||||
<div class="sys-version-item"><span class="sys-version-tag">v48.0</span><span class="sys-version-text">零感域重构+架构v2</span></div>
|
||||
<div class="sys-version-item"><span class="sys-version-tag">v44.0</span><span class="sys-version-text">仪表盘+UI改版</span></div>
|
||||
<div class="sys-version-item"><span class="sys-version-tag">v43.0</span><span class="sys-version-text">码字工作台扩展</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"_sovereign": "TCS-0002∞ | SYS-GLW-0001",
|
||||
"_copyright": "国作登字-2026-A-00037559",
|
||||
"_description": "硅谷Claude专线中继配置 · IP走硅谷·带宽走新加坡",
|
||||
"version": "1.0",
|
||||
"version": "2.0",
|
||||
"relay_architecture": {
|
||||
"description": "双层中继: 用户请求 → 新加坡(带宽源) → 硅谷(IP壳) → Claude API",
|
||||
"singapore_servers": {
|
||||
|
|
@ -58,8 +58,8 @@
|
|||
"silicon_valley_server": [
|
||||
"安装SSH Server (已有)",
|
||||
"配置SSH公钥 (新加坡服务器 → 硅谷服务器)",
|
||||
"防火墙放行SSH端口",
|
||||
"无需安装Nginx (纯SSH隧道模式)"
|
||||
"安装Xray并配置VLESS+Reality (D61·VPN节点用途)",
|
||||
"防火墙放行443端口 (VPN) + SSH端口"
|
||||
],
|
||||
"singapore_server": [
|
||||
"配置SSH私钥 (连接硅谷服务器)",
|
||||
|
|
@ -69,7 +69,18 @@
|
|||
"github_secrets": [
|
||||
"ZY_SVR_SV_HOST — 硅谷服务器IP",
|
||||
"ZY_SVR_SV_KEY — SSH私钥",
|
||||
"ZY_SVR_SV_USER — SSH用户名"
|
||||
"ZY_SVR_SV_USER — SSH用户名",
|
||||
"ZY_SVR_SV_REALITY_PUBLIC_KEY — 硅谷Xray Reality公钥 (VPN节点)",
|
||||
"ZY_SVR_SV_REALITY_SHORT_ID — 硅谷Xray Reality短ID (VPN节点)",
|
||||
"ZY_SVR_SV_PORT — VPN端口 (默认443)"
|
||||
]
|
||||
},
|
||||
"vpn_node": {
|
||||
"description": "D61新增: 硅谷服务器同时作为VPN出口节点(用户直接访问Claude)",
|
||||
"node_id": "zy-sv-claude",
|
||||
"node_name": "🇺🇸 光湖-SV(Claude专线)",
|
||||
"purpose": "用户VPN流量可直接通过硅谷IP出口访问claude.ai等AI服务",
|
||||
"clash_routing": "AI服务proxy-group优先选择此节点",
|
||||
"status": "active"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,20 +50,23 @@
|
|||
{
|
||||
"id": "ZY-SVR-SV",
|
||||
"name": "吱吱线·硅谷",
|
||||
"role": "Claude API中继+国际API出口",
|
||||
"role": "Claude API中继+VPN美国出口+国际API出口",
|
||||
"location": "Silicon Valley (US)",
|
||||
"spec": "低配",
|
||||
"status": "pending",
|
||||
"status": "active",
|
||||
"services": [
|
||||
"xray (VLESS+Reality VPN · Claude专线节点)",
|
||||
"ssh-tunnel (Claude API中继出口)",
|
||||
"说明: IP从硅谷走·带宽从新加坡走"
|
||||
"说明: 用户VPN可直接走硅谷IP访问Claude/AI服务"
|
||||
],
|
||||
"github_secrets": {
|
||||
"host": "ZY_SVR_SV_HOST",
|
||||
"key": "ZY_SVR_SV_KEY",
|
||||
"user": "ZY_SVR_SV_USER"
|
||||
"user": "ZY_SVR_SV_USER",
|
||||
"reality_public_key": "ZY_SVR_SV_REALITY_PUBLIC_KEY",
|
||||
"reality_short_id": "ZY_SVR_SV_REALITY_SHORT_ID"
|
||||
},
|
||||
"notes": "硅谷服务器仅做TCP出口·不部署应用"
|
||||
"notes": "硅谷服务器已配置·D61冰朔确认·VPN节点+API中继双用途"
|
||||
},
|
||||
{
|
||||
"id": "ZY-SVR-AWEN",
|
||||
|
|
|
|||
|
|
@ -175,6 +175,23 @@ EOF
|
|||
echo "ZY_CN_RELAY_PORT=${ZY_CN_RELAY_PORT:-2053}" >> "$KEYS_FILE"
|
||||
fi
|
||||
|
||||
# 保存硅谷服务器节点信息 (Claude专线 · 美国IP出口)
|
||||
# D61: 冰朔已配置硅谷服务器,新增Claude单独访问VPN节点
|
||||
if [ -n "${ZY_SVR_SV_HOST:-}" ]; then
|
||||
echo "" >> "$KEYS_FILE"
|
||||
echo "# 硅谷服务器节点 (ZY-SVR-SV · Claude专线 · 美国IP出口)" >> "$KEYS_FILE"
|
||||
echo "ZY_SVR_SV_HOST=${ZY_SVR_SV_HOST}" >> "$KEYS_FILE"
|
||||
fi
|
||||
if [ -n "${ZY_SVR_SV_REALITY_PUBLIC_KEY:-}" ]; then
|
||||
echo "ZY_SVR_SV_REALITY_PUBLIC_KEY=${ZY_SVR_SV_REALITY_PUBLIC_KEY}" >> "$KEYS_FILE"
|
||||
fi
|
||||
if [ -n "${ZY_SVR_SV_REALITY_SHORT_ID:-}" ]; then
|
||||
echo "ZY_SVR_SV_REALITY_SHORT_ID=${ZY_SVR_SV_REALITY_SHORT_ID}" >> "$KEYS_FILE"
|
||||
fi
|
||||
if [ -n "${ZY_SVR_SV_PORT:-}" ]; then
|
||||
echo "ZY_SVR_SV_PORT=${ZY_SVR_SV_PORT}" >> "$KEYS_FILE"
|
||||
fi
|
||||
|
||||
chmod 600 "$KEYS_FILE"
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -192,6 +192,26 @@ function buildStaticNodes() {
|
|||
});
|
||||
}
|
||||
|
||||
// 节点4: 硅谷服务器 (ZY-SVR-SV · Claude专线 · 美国IP出口)
|
||||
// 冰朔D61: 硅谷服务器已配置,新增Claude单独访问VPN节点
|
||||
// 用户访问claude.ai等AI服务时优先走此节点(美国IP)
|
||||
const svHost = getEnvOrKey('ZY_SVR_SV_HOST');
|
||||
const svPbk = getEnvOrKey('ZY_SVR_SV_REALITY_PUBLIC_KEY');
|
||||
const svSid = getEnvOrKey('ZY_SVR_SV_REALITY_SHORT_ID');
|
||||
const svPort = parseInt(getEnvOrKey('ZY_SVR_SV_PORT') || '443', 10);
|
||||
if (svHost && svPbk && svSid) {
|
||||
nodes.push({
|
||||
id: 'zy-sv-claude',
|
||||
name: '🇺🇸 光湖-SV(Claude专线)',
|
||||
host: svHost,
|
||||
port: svPort,
|
||||
pbk: svPbk,
|
||||
sid: svSid,
|
||||
region: 'us-sv',
|
||||
priority: 4
|
||||
});
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
|
|
@ -279,8 +299,12 @@ ${nodeNames}
|
|||
: `${nodeNames}\n - DIRECT`;
|
||||
|
||||
// AI/开发工具代理组的节点列表
|
||||
// Claude专线优先: 如果有硅谷节点,AI服务组把它放最前面
|
||||
const svNode = nodes.find(n => n.region === 'us-sv');
|
||||
const toolProxies = nodes.length > 1
|
||||
? ` - "♻️ 自动选择"\n${nodeNames}`
|
||||
? (svNode
|
||||
? ` - "${svNode.name}"\n - "♻️ 自动选择"\n${nodeNames}`
|
||||
: ` - "♻️ 自动选择"\n${nodeNames}`)
|
||||
: nodeNames;
|
||||
|
||||
return `# 光湖语言世界 · ${user.label} 的独立专线 — 冰朔开发维护
|
||||
|
|
|
|||
|
|
@ -298,6 +298,17 @@ class ZyCloudVpn extends LivingModule {
|
|||
seenIds.add('zy-cn-relay');
|
||||
}
|
||||
|
||||
// 节点4: 硅谷服务器 (ZY-SVR-SV · Claude专线 · 美国IP出口)
|
||||
// 冰朔D61: 硅谷服务器已配置,新增Claude单独访问VPN节点
|
||||
const svHost = this._readEnvOrKey('ZY_SVR_SV_HOST');
|
||||
const svPbk = this._readEnvOrKey('ZY_SVR_SV_REALITY_PUBLIC_KEY');
|
||||
const svSid = this._readEnvOrKey('ZY_SVR_SV_REALITY_SHORT_ID');
|
||||
const svPort = parseInt(this._readEnvOrKey('ZY_SVR_SV_PORT') || '443', 10);
|
||||
if (svHost && svPbk) {
|
||||
nodes.push(this._makeNode('zy-sv-claude', '🇺🇸 铸渊专线V2-SV(Claude)', svHost, svPort, svPbk, svSid || '', 'us-sv', 'ZY-SVR-SV', 'remote', '硅谷'));
|
||||
seenIds.add('zy-sv-claude');
|
||||
}
|
||||
|
||||
// ── 源2: 动态注册表(通过HLDP/API注册的节点)──
|
||||
// 这些是"像路由器一样插入"的节点
|
||||
for (const regNode of Object.values(this._registry.nodes)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue