VelaCloud

v0.5.0 内置开箱即用 · 支持自有 VPS 一键自建 Built-in Out of the Box · 1-Minute Self-Hosting

VelaHub

端到端零知识 P2P 加速与自建盲中继服务 Zero-knowledge P2P acceleration & self-hosted blind relay

VelaCloud 为旗下跨设备互联能力内置了零知识 VelaHub,同时也通过独立分发镜像 https://download.velacloud.app/velahub/ 提供官方预编译静态单二进制与极简 <15 MB scratch Docker 镜像——只需一条命令即可在任意 Linux VPS 上线私有中继节点。节点默认开启「公共 P2P 加速」,让所有用户共享极低开销的 STUN 与盲槽打洞直连,而你的中继带宽始终受私有 VELAHUB_ACCESS_KEY 严格保护,并内置 SHA-256 自动更新。 VelaCloud ships built-in zero-knowledge VelaHub out of the box, and provides official prebuilt static binaries and minimal <15 MB scratch Docker images on https://download.velacloud.app/velahub/ so anyone can self-host a private relay on any Linux VPS in one command. Nodes enable Public P2P Acceleration by default—with zero public relay bandwidth consumed—while protecting your blind relay behind VELAHUB_ACCESS_KEY and built-in SHA-256 auto-update.

Linux AMD64 / ARM64 Pure Rust · <15 MB Image 公共 P2P 加速 · 默认开 / 可关Public P2P Accel · On by Default 内置自动更新 · SHA-256 校验Built-in Auto-Update · SHA-256
Linux 立即下载Linux Available 官方独立分发镜像与自动更新(闭源专有分发)Dedicated download mirror & auto-update (proprietary binary)

VelaHub 全部二进制与安装脚本已迁至独立分发镜像 https://download.velacloud.app/velahub/,以闭源预编译静态二进制与极简 scratch 镜像分发(不公开源码)。无论使用内置官方节点还是自有 VPS 自建,所有画面、终端输入输出、文件与密钥均在客户端间端到端加密,服务端永不可见明文。 All VelaHub binaries and installer scripts are served from our dedicated mirror https://download.velacloud.app/velahub/ as proprietary prebuilt static binaries and minimal scratch images (source code is not published). Whether using built-in nodes or self-hosting on your own VPS, screens, terminal I/O, files, and keys remain end-to-end encrypted.

1 分钟极简自建部署1-minute self-hosted deployment

选择最顺手的方式:一键脚本自动从 download.velacloud.app 下载、校验 SHA-256、识别公网出口 IP、放通宿主机防火墙、生成密钥并以 systemd 沙箱启动;同样支持 Docker Compose 与单二进制直接运行。 Pick the workflow you prefer: the one-line installer downloads from download.velacloud.app, verifies SHA-256, detects public egress IP, opens host firewall ports, generates keys, and sets up hardened systemd—or use Docker Compose or a standalone binary.

默认一键安装(自动识别出口 IP + 放通防火墙 + 生成密钥 + 开启公共 P2P 加速)Default one-line install (auto public IP + firewall + keygen + Public P2P Accel ON)
curl --proto '=https' --tlsv1.2 -fsSL https://download.velacloud.app/velahub/install.sh | sudo sh
可选:自定义端口 / 关闭公共 P2P 加速(纯私有模式)Optional: custom ports or disable Public P2P Acceleration
curl --proto '=https' --tlsv1.2 -fsSL https://download.velacloud.app/velahub/install.sh | \
  sudo VELAHUB_PUBLIC_HOST=hub.example.com \
       VELAHUB_SIGNAL_PORT=38416 \
       VELAHUB_RELAY_PORT=38417 \
       VELAHUB_PUBLIC_P2P_ACCEL=false sh

安装脚本会自动探测本机公网出口 IP 填入 VELAHUB_PUBLIC_HOST,自动放通系统防火墙(firewalld / ufw / iptables / nftables),验证 http://127.0.0.1:9100/healthz 并直接打印开箱可用的脱敏 velahub://node/import?... 链接。私钥 /var/lib/velahub/server.pk8 强制 0600 权限,后续升级可直接运行内置自更新或重跑脚本(自动保留密钥与配置)。 The installer auto-detects your public egress IP into VELAHUB_PUBLIC_HOST, opens host firewall ports automatically (firewalld / ufw / iptables / nftables), verifies http://127.0.0.1:9100/healthz, and prints a ready-to-paste redacted velahub://node/import?... URI. Your Ed25519 key (/var/lib/velahub/server.pk8, mode 0600) and config are preserved across upgrades.

Step 01 · Ports

宿主机防火墙自动放通 + 核对云安全组Auto Host Firewall + Cloud Security Group

一键脚本会自动在宿主机防火墙放行信令端口(默认 28416/udp + tcp)与中继端口(默认 28417/udp + tcp);若你的 VPS 额外启用了云厂商外层安全组,也请在控制台放行这 2 组端口。9100/tcp 仅监听 127.0.0.1,绝不放通公网。 The installer automatically opens your signaling port (default 28416/udp+tcp) and relay port (default 28417/udp+tcp) on the host firewall; if your cloud provider also enforces an external security group, allow the same 2 port pairs there. Port 9100/tcp stays strictly loopback-only.

Step 02 · Client Import

1 次粘贴导入 VelaDesk / VelaTermPaste into VelaDesk / VelaTerm

将终端打印的 velahub://node/import?... 粘贴进客户端,再把 /etc/velahub/velahub.env 中的 VELAHUB_ACCESS_KEY 填入独立「访问密钥」安全框即可独享高速盲中继。 Paste the printed velahub://node/import?... link into VelaDesk or VelaTerm, then enter your VELAHUB_ACCESS_KEY from /etc/velahub/velahub.env into the separate Access Key field for private high-speed relay.

官方预编译二进制与模板下载Official prebuilt binaries & deployment templates

所有发布文件均托管于独立镜像 https://download.velacloud.app/velahub/,部署前请务必使用 SHA256SUMS 校验二进制完整性。 All release artifacts are hosted on our dedicated mirror https://download.velacloud.app/velahub/. Always verify binary integrity against SHA256SUMS before running.

产物Artifact 适用平台 / 说明Platform / Purpose 下载地址Download Link
velahub-0.5.0-linux-amd64 Linux x86_64 静态 musl 单二进制(主流云主机 / x86 VPS)Linux x86_64 static musl binary (standard x86 VPS) https://download.velacloud.app/velahub/velahub-0.5.0-linux-amd64
velahub-0.5.0-linux-arm64 Linux ARM64 静态 musl 单二进制(AWS Graviton / Oracle ARM / 树莓派)Linux ARM64 static musl binary (Graviton, Oracle ARM, Raspberry Pi) https://download.velacloud.app/velahub/velahub-0.5.0-linux-arm64
SHA256SUMS 二进制完整性校验清单(配合 sha256sum -c 使用)SHA-256 checksum manifest for sha256sum -c https://download.velacloud.app/velahub/SHA256SUMS
latest.json 自动更新元数据清单(供内置自更新与监控脚本读取)Auto-update metadata manifest (HTTPS-only with SHA-256 digests) https://download.velacloud.app/velahub/latest.json
install.sh 零依赖 Linux 一键安装脚本(自动校验、出口 IP 识别、防火墙放通、生成密钥与 systemd)Zero-dependency Linux one-line installer (checksum, auto public IP, firewall, keygen & systemd) https://download.velacloud.app/velahub/install.sh
docker-compose.yml 自建私有节点 Compose 模板(含自定义端口与 P2P 加速开关)Self-hosted Compose template (custom ports & P2P accel toggle) https://download.velacloud.app/velahub/docker-compose.yml
Caddyfile Caddy 2 自动 HTTPS 443 反代模板(预配 X-Real-IP 与无缓冲透传)Caddy 2 automatic HTTPS 443 proxy template (X-Real-IP & streaming) https://download.velacloud.app/velahub/Caddyfile

默认开启「公共 P2P 加速」,可随时关闭Public P2P Acceleration: enabled by default, toggleable anytime

自建 VelaHub 时,你可以在 100% 保护自己 VPS 中继带宽的前提下,顺手为所有人提供极低开销的 P2P 打洞加速;也可以随时一条配置切换为完全静默的纯私有节点。 Self-hosters can help everyone establish direct P2P hole-punching with zero relay bandwidth spent—or flip one switch for a completely silent private-only node.

Default: ON · VELAHUB_PUBLIC_P2P_ACCEL=true

所有人共享 P2P 加速,零公网中继流量P2P Acceleration for All, 0 Relay Bandwidth

默认开启状态下,未持有 VELAHUB_ACCESS_KEY 的外部客户端可借你的节点完成 RFC 5389 STUN 探测与盲槽撮合以直接打洞建立端到端 QUIC P2P 直连;服务端不会为公网请求签发任何中继令牌(返回空令牌与 0.0.0.0:0),你的 VPS 出口带宽 0 字节被蹭用。 When enabled by default, unauthenticated peers may use low-overhead STUN and blind-slot matchmaking to punch direct end-to-end QUIC P2P connections. The server never mints relay tokens for public callers (returning an empty token and 0.0.0.0:0), keeping your VPS relay bandwidth 100% untouched.

Strict Isolation · Anti-Flood

私有盲槽隔离 + 自动抗洪保护Private Slot Isolation & Anti-Flood

公网 P2P 盲槽与你持有 VELAHUB_ACCESS_KEY 的私有盲槽在内存中严格分区隔离——外部用户既无法探测、认领或撤销你的私有槽位,也无法调用 RelayAllocate。公网入口强制启用 20 req/s 无状态抗洪 Cookie 与单 IP 12 槽位上限,绝不挤占站长配额。 Public P2P slots are strictly isolated from authenticated VELAHUB_ACCESS_KEY slots—external peers can never probe, claim, or revoke your private slots or call RelayAllocate. Public traffic enforces a 20 req/s stateless anti-flood cookie and a 12 slots/IP cap automatically.

Optional: OFF · VELAHUB_PUBLIC_P2P_ACCEL=false

随时一键关闭为纯私有静默节点One Switch for Strict Private-Only Mode

如果你希望节点对外完全不可探测,只需在配置中设置 VELAHUB_PUBLIC_P2P_ACCEL=false(或启动加 --no-public-p2p-accel)并重启,节点即刻丢弃一切未携带 VELAHUB_ACCESS_KEY 的信令包,仅服务你自己的设备。 Prefer a completely silent private node? Set VELAHUB_PUBLIC_P2P_ACCEL=false (or pass --no-public-p2p-accel) and restart—every signaling packet without your VELAHUB_ACCESS_KEY is silently dropped.

自定义端口、Caddy 443 与可观测性Custom ports, Caddy 443 & observability

无需改动客户端代码即可自由更换端口;如需叠加 443 端口 HTTPS 反代,可直接使用预置 Caddy 模板。 Use any custom port pair with zero client code changes, and optionally pair with Caddy on port 443 using our ready-made template.

Caddy 2 自动 HTTPS 443 反代模板(/ws/relay/*)Caddy 2 automatic HTTPS 443 proxy (/ws/relay/*)
hub.example.com {
    handle /ws/relay/* {
        reverse_proxy 127.0.0.1:28417 {
            header_up X-Real-IP {remote_host}
            flush_interval -1
        }
    }
    handle {
        respond 404
    }
}

搭配本机 Caddy 时,请在 VelaHub 中开启 VELAHUB_TRUST_LOOPBACK_PROXY_HEADERS=true 并通过回环地址(127.0.0.1)互联,确保按真实客户端 IP 限流。 When running behind local Caddy, set VELAHUB_TRUST_LOOPBACK_PROXY_HEADERS=true on VelaHub and connect over loopback (127.0.0.1) so per-IP limits track real client IPs.

Custom Ports · Zero Code Changes

任意自定义信令与中继端口Any Custom Signaling & Relay Ports

通过 VELAHUB_SIGNAL_PORT 与 VELAHUB_RELAY_PORT(如 3478 / 8443 或 38416 / 38417)自由定制。客户端导入 velahub://node/import?... 后自动按自定义端口通信;Docker 下请保持容器内外端口一致。 Set VELAHUB_SIGNAL_PORT and VELAHUB_RELAY_PORT (e.g. 3478 / 8443 or 38416 / 38417). Clients honor custom ports automatically from velahub://node/import?...; in Docker, keep host and container ports identical.

Loopback Metrics · /healthz

回环健康检查与 Prometheus 指标Loopback /healthz & Prometheus Metrics

仅监听 127.0.0.1:9100:/healthz 返回版本、模式、public_p2p_accel 开关与活跃会话;/metrics 暴露 30+ velahub_* Prometheus 指标(含 velahub_public_p2p_matches_total 与 velahub_relay_bytes_total)。 Bound strictly to 127.0.0.1:9100: /healthz returns version, mode, public_p2p_accel status, and active counts, while /metrics exposes 30+ velahub_* Prometheus metrics including velahub_public_p2p_matches_total and velahub_relay_bytes_total.

技术规格与安全边界Technical specifications & security boundaries

当前版本Current version v0.5.0
官方下载与自动更新Downloads & auto-update https://download.velacloud.app/velahub/(自动更新清单 latest.json,严格 HTTPS 与 SHA-256 校验,支持 velahub update check 与 sudo velahub update apply --restart)。https://download.velacloud.app/velahub/ (auto-update manifest latest.json, HTTPS-only with SHA-256 verification via velahub update check & sudo velahub update apply --restart).
分发与许可Distribution & license 闭源预编译静态二进制与极简 <15 MB scratch 容器镜像分发(免费用于个人与团队自建,不公开源码)。Proprietary prebuilt static binaries and minimal <15 MB scratch Docker images (free to self-host on your own VPS; source code is not published).
默认端口(可自定义)Default ports (customizable) 28416/udp+tcp(信令 + RFC 5389 双栈 STUN)、28417/udp+tcp(UDP/TCP/WS 盲中继)、127.0.0.1:9100/tcp(仅回环 /healthz 与 /metrics)。28416/udp+tcp (signaling + dual-stack RFC 5389 STUN), 28417/udp+tcp (UDP/TCP/WS blind relay), and loopback-only 127.0.0.1:9100/tcp (/healthz & /metrics).
公共 P2P 加速开关Public P2P Acceleration VELAHUB_PUBLIC_P2P_ACCEL=true(默认开启,0 字节公网中继流量、私有槽位隔离、20 req/s 抗洪 Cookie);设为 false 或传 --no-public-p2p-accel 切为纯私有模式。VELAHUB_PUBLIC_P2P_ACCEL=true (on by default, 0 bytes public relay bandwidth, isolated from private slots, 20 req/s anti-flood cookie); set false or pass --no-public-p2p-accel for private-only mode.
零知识与密钥安全Zero-knowledge & key hygiene 全链路端到端加密(Ed25519 + SPAKE2 + TLS 1.3 / QUIC),无明文设备目录;持久化 server.pk8 强校验 0600 权限,支持 server.prev.pk8 双公钥零停机轮换,默认日志永不输出 ak=。End-to-end encrypted (Ed25519 + SPAKE2 + TLS 1.3 / QUIC) with no online device directory. Persistent server.pk8 enforces 0600 permissions, supports zero-downtime server.prev.pk8 rotation, and startup logs never print ak=.
兼容客户端Compatible clients VelaTerm(macOS / iOS)与 VelaDesk(Windows / macOS),支持 velahub://node/import?... 一键导入与失败关闭(绝不静默回退内置节点)。VelaTerm (macOS / iOS) and VelaDesk (Windows / macOS) via velahub://node/import?... with fail-closed routing (never silently falls back to built-in nodes).

需要自建协助或企业多区域部署咨询?Need help self-hosting or planning multi-region relays?

欢迎来信交流你的 VPS 网络环境、自定义端口或防火墙穿透需求。请勿在邮件中附带 server.pk8 私钥或 VELAHUB_ACCESS_KEY。 Write to share your VPS setup, custom port layout, or firewall requirements. Never include your server.pk8 private key or VELAHUB_ACCESS_KEY in support emails.