核心特性Features 系统架构Architecture 方案对比Compare 使用场景Use Cases 部署教程Deployment 常见问题FAQ 查看源码View Source
✨ v3.2 全新发布Released

分布式内网穿透
与端口转发控制台
Distributed Tunneling
& Port Forwarding Console

GoRelay Pro 是一款安全、轻量、开源的分布式内网穿透与端口转发控制台。基于 Go 原生编写,采用 Master-Agent 架构,一个单文件即可完成全网节点的统一部署与实时监控。 GoRelay Pro is a secure, lightweight and open-source distributed tunneling & port-forwarding console. Written natively in Go with a Master-Agent architecture, a single binary is all it takes to deploy and monitor your entire fleet in real time.

TCP / UDP全协议Protocols
4种负载均衡LB strategies
TLS加密传输Encrypted
SQLite零外部依赖No deps
Stars Forks Commits
0
负载均衡策略Load-balancing strategies
0
平均部署耗时Average deploy time
0
开源免费Open source & free
0
外部运行时依赖External dependencies

一行命令,即刻部署Deploy With One Command

无需复杂配置,复制粘贴即可拥有完整的内网穿透能力 No complex configuration — copy, paste, and you're live.

relay@master: ~/gorelay
$ curl -fsSL https://raw.githubusercontent.com/jinhuaitao/relay/master/relay.sh | bash
# GoRelay Pro v3.2
正在安装 Master 主控…Installing Master…
初始化 SQLite 数据库…Setting up SQLite database…
注册 systemd 服务…Configuring systemd service…
控制台已启动:Panel started at http://localhost:8888
# 在面板中绑定域名后,将自动签发 HTTPS 证书# Bind a domain in the panel to auto-issue HTTPS certificates
$

✨ 核心特性✨ Core Features

强大的能力,克制的设计,只为提供最顺手的穿透体验 Powerful capabilities with restrained design — built for the smoothest tunneling experience.

转发与流量调度Forwarding & Traffic Scheduling

支持 TCP、UDP 及双栈端口转发,兼容 IPv4 / IPv6。内置 Random、Round Robin、Least Conn、Fastest 四种负载均衡策略,按需切换。 TCP, UDP and dual-stack port forwarding with IPv4 / IPv6 support. Four built-in strategies — Random, Round Robin, Least Conn and Fastest.

极致安全防护Security First

Auto TLS 全自动申请 Let's Encrypt 证书,内置 GitHub OAuth 登录,并支持 Google Authenticator 双因素认证。 Auto TLS issues Let's Encrypt certificates automatically. Built-in GitHub OAuth login with Google Authenticator 2FA support.

现代 Web UI & PWAModern Web UI & PWA

基于 WebSocket 的毫秒级状态同步,动态图表实时呈现速率与连接数。支持 PWA 添加到主屏,秒变独立 App。 Millisecond-level sync over WebSocket, with live charts for throughput and connections. Installable as a PWA — instantly your own app.

Telegram 智能助理Telegram Assistant

Inline Keyboard 快捷控制,发送 /menu 呼出全按键菜单。支持阶梯式流量告警与自动熔断,随时随地掌控节点。 Inline-keyboard controls — send /menu to open the full panel. Tiered traffic alerts and automatic circuit-breaking keep you in control anywhere.

轻量数据存储Lightweight Storage

纯 Go 驱动的 SQLite,无需任何外部数据库。备份与迁移只需拷贝一个文件,运维成本趋近于零。 Pure-Go SQLite with no external database. Backup and migration mean copying a single file — near-zero ops overhead.

高并发高性能High Concurrency

充分利用 Go 原生 Goroutine 与零拷贝转发,单机即可承载海量连接;Master-Agent 架构支持横向扩展。 Built on native Goroutines and zero-copy forwarding to handle massive connection counts, with a Master-Agent design that scales horizontally.

TCP / UDP 负载均衡Load Balancing TLS PWA Telegram Bot SQLite 高性能Performance MIT License

🏗️ 系统架构🏗️ System Architecture

Master-Agent 分布式架构,节点可随时横向扩展 A Master-Agent distributed architecture that scales out on demand.

用户 / 客户端User / Client
通过公网入口访问内网服务Accesses intranet services via a public entry
Master 主控Master Control
Web 面板 · 鉴权 · 调度中心Web panel · Auth · Scheduler
Agent 节点Agent Node
部署于内网,负责实际转发Deployed inside the intranet, handles forwarding
内网服务Internal Service
NAS / 数据库 / Web 应用等NAS, database, web apps and more
Agent 主动长连接注册,无需公网 IPAgents register via outbound long connections — no public IP needed 控制面与数据面 TLS 加密TLS encryption on both control and data planes WebSocket 实时指标回传Real-time metrics streamed over WebSocket

📊 方案对比📊 How It Compares

与常见穿透方案的能力对照,帮你快速做判断 A capability comparison against common tunneling solutions.

GoRelay Pro 与 frp、ngrok 的能力对比
能力Capability GoRelay Pro frp ngrok
TCP / UDP 转发TCP / UDP forwarding 支持 支持 部分Partial
自托管 · 数据自持Self-hosted data ownership 支持 支持 不支持
自动 HTTPS 证书Automatic HTTPS certificates 支持 不支持 支持
内置负载均衡Built-in load balancing 支持 4 种策略4 strategies 插件Plugin 支持
可视 Web 控制台Visual web console 支持 基础Basic 支持
Telegram 机器人Telegram bot 支持 不支持 不支持
PWA 移动端PWA mobile app 支持 不支持 不支持
单文件部署Single-file deployment 支持 支持 不支持

对比基于各项目公开文档整理,仅供选型参考,具体以官方说明为准。 Compiled from each project's public documentation, for reference only — always check the official docs.

💡 适用场景💡 Where It Shines

从家庭实验室到企业内网,一套方案覆盖多种需求 From the home lab to the corporate intranet — one solution, many jobs.

家庭 NAS 与私有云Home NAS & Private Cloud

在外安全访问家里的 NAS、路由器、Home Assistant 等设备,无需固定公网 IP。Securely reach your NAS, router or Home Assistant from anywhere — no static public IP required.

开发联调与预览Dev Preview & Collaboration

把本地运行的服务一键暴露给同事或客户预览,回调调试、移动端真机测试都更省事。Expose a local service to teammates or clients in one step — ideal for webhook debugging and real-device mobile testing.

远程运维与统一纳管Remote Ops & Fleet Management

在单一控制台管理多台内网服务器的转发规则与运行状态,替代繁琐的 VPN 配置。Manage forwarding rules and health for many intranet servers from one console — replacing cumbersome VPN setups.

物联网与边缘设备IoT & Edge Devices

面向大量 Agent 节点的集中调度与监控,轻量单文件便于在资源受限设备上部署。Centralized scheduling and monitoring for large fleets of agents, with a lightweight single binary for constrained devices.

📖 部署教程📖 Deployment Guide

三种方式任选其一,按你的环境挑最顺手的 Three paths — pick whichever fits your environment.

1

一键安装脚本One-click Script 推荐Recommended

最省事的方式,一行命令自动完成下载、配置与开机自启。The easiest path — one command handles download, setup and autostart.

# 下载并运行安装脚本 curl -o relay.sh https://raw.githubusercontent.com/jinhuaitao/relay/master/relay.sh chmod +x relay.sh && ./relay.sh
2

Docker 部署Docker Deployment

使用官方镜像快速启动,数据持久化到独立卷,升级只需替换镜像。Spin up from the official image with a persistent volume; upgrading is just a new tag.

# 启动 Master 主控 docker run -d --name relay-master \ --restart=always --net=host \ -v relay_data:/app \ jhtone/relay -mode master
3

编译安装Build From Source

需要自定义构建或二次开发时,从源码编译静态单文件。For custom builds or further development, compile a static single binary from source.

# 需要 Go 1.20+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ go build -o relay main.go chmod +x relay && ./relay -mode master

❓ 常见问题❓ Frequently Asked

还没解决的问题,欢迎到 GitHub Issues 提出 Still stuck? Open an issue on GitHub.

GoRelay Pro 是免费的吗?Is GoRelay Pro free?
是的。项目基于 MIT 许可证开源,可自由用于个人与企业场景,也允许二次开发与商业集成。Yes. It's released under the MIT License — free for personal and commercial use, and open to modification and integration.
需要自己有公网服务器吗?Do I need a public server?
需要一台具备公网 IP 的服务器来部署 Master 主控。Agent 节点可运行在任意内网环境,通过主动外连注册,因此内网侧无需公网 IP 或端口映射。You need one server with a public IP to host the Master. Agents can run anywhere behind NAT, registering through outbound connections — no public IP or port forwarding needed on the intranet side.
支持哪些协议与网络环境?Which protocols and networks are supported?
支持 TCP 与 UDP 转发,兼容 IPv4 和 IPv6,并支持双栈监听。常见于 NAS、数据库、Web 服务、游戏服务器、远程桌面等场景。TCP and UDP forwarding, compatible with IPv4 and IPv6 including dual-stack listening — covering NAS, databases, web services, game servers, remote desktop and more.
数据传输安全吗?Is the traffic secure?
控制面与数据面均支持 TLS 加密。控制台可自动签发 Let's Encrypt 证书,并支持 GitHub OAuth 登录与 Google Authenticator 双因素认证。Both the control and data planes support TLS. The console can auto-issue Let's Encrypt certificates and supports GitHub OAuth with Google Authenticator 2FA.
如何升级与备份?How do I upgrade and back up?
升级只需重新执行安装脚本或拉取新镜像。所有配置与数据都存放在单个 SQLite 文件中,直接拷贝该文件即可完成备份或迁移。Upgrading means re-running the install script or pulling a new image. All configuration and data live in a single SQLite file — copy it to back up or migrate.
和 frp 这类工具的区别是什么?How is it different from tools like frp?
frp 更偏向底层配置文件驱动,灵活性高但上手成本也高。GoRelay Pro 在协议转发能力之上,额外提供了开箱即用的可视控制台、内置负载均衡、Telegram 助理与 PWA 移动端,更适合希望"部署完就能用"的场景。frp leans on config files — flexible but with a steeper learning curve. On top of solid forwarding, GoRelay Pro adds a ready-to-use visual console, built-in load balancing, a Telegram assistant and a PWA client, suiting teams that want it working right after install.

准备好开始了吗?Ready to get started?

免费开源,即刻拥有强大的内网穿透服务 Free and open source — powerful tunneling, starting right now.

已复制到剪贴板Copied to clipboard