超棒隧道:隧道软件与服务列表

Lobsters Hottest 工具

摘要

这是一个精选的隧道软件与服务列表,旨在通过自动HTTPS公开暴露本地服务器,面向自托管用户和开发者。

<p><a href="https://lobste.rs/s/myuake/awesome_tunneling_list_tunneling">评论</a></p>
查看原文
查看缓存全文

缓存时间: 2026/09/18 17:52

anderspitman/awesome-tunneling

来源:https://github.com/anderspitman/awesome-tunneling

更新于2026年8月10日: 我上周末清理了大量积压事项。我使用AI辅助自动化和撰写注释,但所有是/否决定都由我自己做出。有些问题可能仍被遗漏。如果您认为您的问题/PR被错误关闭,请发表评论以便我仔细查看。

更新于2026年2月16日: 鉴于隧道工具的敏感性,我将开始要求任何新增项目至少有100个GitHub星标。非GitHub托管的项目和商业产品将根据具体情况处理。如果您对此政策有疑问,请随时开启issue。

本列表用途

此列表旨在追踪和比较隧道解决方案。主要面向自托管者和开发者,他们需要通过公共域名(即使处于NAT或其他受限网络后)暴露本地网络服务器,并实现自动HTTPS等操作。

理想方案

我启动此列表是因为在寻找一个简单的工具/服务,它需要:

  • 允许我注册域名,并自动将记录指向运行隧道的服务器。
  • 为域名自动设置和管理HTTPS证书(包括主域名和子域名)。
  • 提供客户端工具,通过服务器隧道化HTTP/TCP连接,且客户端无需root权限。
  • 提供简单的GUI界面,以便将X域名/子域名映射到Z客户端的Y端口,并将所有连接代理至该域名。

目前尚未找到完全实现所有这些功能的工具。特别是,虽然部分工具可通过Let’s Encrypt实现自动证书,但没有一个能简单地整合域名注册和DNS管理。

推荐

  • 对于大多数用户,我目前推荐Cloudflare Tunnel (https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/)。虽然它是闭源的,但这是最接近实现理想方案的生产级服务。它也是Cloudflare其他产品的引流工具,因此可以免费提供。
  • 如果您希望自托管,有很多选择。对于生产环境,我会考虑Pangolin (https://github.com/fosrl/pangolin) 或 frp (https://github.com/fatedier/frp)。如果您是开发者且想要非常简单的方案,建议从我的SirTunnel (https://github.com/anderspitman/SirTunnel) 项目开始,根据需求修改。

开源项目(至少使用合理宽松许可证)

  • Telebit (https://telebit.cloud/) - 使用JavaScript编写。代码 (https://git.coolaj86.com/coolaj86/telebit.js)。
  • tunnel.pyjam.as (https://tunnel.pyjam.as/) - 无自定义客户端;直接使用WireGuard。使用Python编写。源代码 (https://gitlab.com/pyjam.as/tunnel)
  • SSH-J.com (https://bitbucket.org/ValdikSS/dropbear-sshj/) - 公共SSH跳板与端口转发服务器。无软件、无注册,仅为匿名SSH转发服务器。鼓励用户仅用于SSH暴露,以保持端到端加密。无公共端口,仅限SSH内连接。运行ssh ssh-j.com将显示使用信息。
  • Greenhouse (https://git.sequentialread.com/sqr/greenhouse) - 即时最低权限端口转发与自动HTTPS;作者“真的不想要您的TLS私钥”。托管服务(greenhouse.server.garden)目前不可用且项目似乎未维护(最后活动2023年)。
  • frp (https://github.com/fatedier/frp) frp GitHub星标徽章 (https://github.com/fatedier/frp/stargazers) - ngrok的全面开源替代方案。支持UDP,具有P2P模式。支持TCP多路复用(单连接或连接池)、QUIC和KCP。
  • ngrok 1.0 (https://github.com/inconshreveable/ngrok) ngrok 1.0 GitHub星标徽章 (https://github.com/inconshreveable/ngrok/stargazers) - ngrok原始版本。不再开发,转向商业2.0版本。
  • localtunnel/localtunnel (https://github.com/localtunnel) localtunnel GitHub星标徽章 (https://github.com/localtunnel/localtunnel/stargazers) - 使用Node.js编写。流行建议。
  • Pangolin (https://github.com/fosrl/pangolin) pangolin GitHub星标徽章 (https://github.com/fosrl/pangolin) - 完全可自托管的隧道反向代理管理服务器,具有身份和访问控制、自动化SSL证书和仪表板UI。
  • chisel (https://github.com/jpillora/chisel) chisel GitHub星标徽章 (https://github.com/jpillora/chisel/stargazers) - 底层为SSH,但仍使用自定义客户端二进制文件。支持来自Let’s Encrypt的自动证书。使用Go编写。
  • rathole (https://github.com/rapiz1/rathole) rathole GitHub星标徽章 (https://github.com/rapiz1/rathole/stargazers) - 类似frp,包括配置格式,但性能有所提升。资源消耗低。热重载。使用Rust编写。
  • sshuttle (https://github.com/sshuttle/sshuttle) sshuttle GitHub星标徽章 (https://github.com/sshuttle/sshuttle/stargazers) - 源自Tailscale一位创始人的开源项目。服务器无需root;客户端需要。明确设计以避免TCP-over-TCP问题。
  • bore (https://github.com/ekzhang/bore) bore GitHub星标徽章 (https://github.com/ekzhang/bore/stargazers) - 极简隧道解决方案。MIT许可证。使用Rust编写。
  • gost (https://latest.gost.run/en/) gost GitHub星标徽章 (https://github.com/go-gost/gost/stargazers) - 看起来是个全面的选择。TCP和UDP隧道。TAP/TUN设备。负载均衡。Web API。使用Go编写。
  • tunnelto (https://tunnelto.dev/) tunnelto GitHub星标徽章 (https://github.com/agrinman/tunnelto/stargazers) - 开源(MIT)。使用Rust编写。
  • wstunnel (https://github.com/erebe/wstunnel) wstunnel GitHub星标徽章 (https://github.com/erebe/wstunnel/stargazers) - 通过WebSocket代理。专注于在阻止某些协议的网络后进行代理。使用Rust编写,提供可执行文件。
  • sish (https://github.com/antoniomika/sish) sish GitHub星标徽章 (https://github.com/antoniomika/sish/stargazers) - 开源ngrok/serveo替代方案。基于SSH但使用用Go编写的自定义服务器。支持WebSocket隧道。
  • zrok (https://zrok.io/) zrok GitHub星标徽章 (https://github.com/openziti/zrok/stargazers) - 旨在轻松公开和私下共享。支持多种资源类型,包括HTTP端点和文件。基于OpenZiti构建(见下文overlay部分)。Apache 2许可证。使用Go编写。
  • expose (https://github.com/beyondcode/expose) expose GitHub星标徽章 (https://github.com/beyondcode/expose/stargazers) - 使用PHP编写的ngrok替代方案。
  • pgrok/pgrok (https://github.com/pgrok/pgrok) pgrok GitHub星标徽章 (https://github.com/pgrok/pgrok/stargazers) - 通过SSH远程端口转发的多租户HTTP反向隧道解决方案。
  • go-http-tunnel (https://github.com/mmatczuk/go-http-tunnel) go-http-tunnel GitHub星标徽章 (https://github.com/mmatczuk/go-http-tunnel/stargazers) - 使用单个HTTP/2连接进行多路复用。需要为服务器和手动生成证书。
  • progrium/localtunnel (https://github.com/progrium/localtunnel) localtunnel GitHub星标徽章 (https://github.com/progrium/localtunnel/stargazers) - 据我所知,这是史上第一个此类工具,早于ngrok和其他localtunnel。不再维护,但在此留存。MIT许可证。使用Go编写。
  • portr (https://portr.dev/) portr GitHub星标徽章 (https://github.com/amalshaji/portr/stargazers) - 具有JavaScript/Python管理页面以及请求检查/重放功能。AGPL-3.0许可证。隧道功能使用Go实现。
  • piko (https://github.com/andydunstall/piko) piko GitHub星标徽章 (https://github.com/andydunstall/piko/stargazers) - Piko是Ngrok的开源替代品,旨在服务生产流量且易于托管(特别是在Kubernetes上)。MIT许可证。使用Go编写。
  • gsocket/Global Socket (https://www.gsocket.io/) gsocket GitHub星标徽章 (https://github.com/hackerschoice/gsocket/stargazers) - Global Socket工具包允许NAT/防火墙后的两个用户安全地建立TCP连接。使用C编写。
  • Tunnelmole (https://github.com/robbie-cahill/tunnelmole-client/) tunnelmole GitHub星标徽章 (https://github.com/robbie-cahill/tunnelmole-client/stargazers) - 开源且可选自托管。客户端和服务器均使用TypeScript编写。
  • Selfhosted Gateway (https://github.com/hintjen/selfhosted-gateway) selfhosted-gateway GitHub星标徽章 (https://github.com/hintjen/selfhosted-gateway/stargazers) - 自托管的Docker原生Cloudflare Tunnel/ngrok替代方案。使用WireGuard、Caddy和NGINX的反向代理over VPN (RPoVPN),通过自动HTTPS将本地docker-compose服务暴露于互联网。AGPL-3.0许可证。
  • Wiredoor (https://github.com/wiredoor/wiredoor) wiredoor GitHub星标徽章 (https://github.com/wiredoor/wiredoor) - 自托管的ingress即服务(WireGuard反向VPN + NGINX),用于暴露私有HTTP/TCP/UDP服务,支持OAuth2认证、自动TLS、CLI和仪表板。
  • SirTunnel (https://github.com/anderspitman/SirTunnel) SirTunnel GitHub星标徽章 (https://github.com/anderspitman/SirTunnel/stargazers) - 极简、自托管的ngrok替代方案,零配置。类似sish但利用Caddy+OpenSSH而非自定义服务器代码。
  • jprq (https://github.com/azimjohn/jprq) jprq GitHub星标徽章 (https://github.com/azimjohn/jprq/stargazers) - 通过WebSocket代理。使用Go编写。
  • boringproxy (https://boringproxy.io/) boringproxy GitHub星标徽章 (https://github.com/boringproxy/boringproxy/stargazers) - 旨在非常易于使用。无配置文件。客户端可通过服务器上的简单WebUI和/或REST API进行远程控制。
  • Wiretap (https://github.com/sandialabs/wiretap) wiretap GitHub星标徽章 (https://github.com/sandialabs/wiretap/stargazers) - 基于用户空间网络栈通过WireGuard (UDP)进行透明隧道。服务器无需root。支持多个客户端和服务器。使用Go编写。
  • NPS Enhanced (https://github.com/djylb/nps) NPS Enhanced GitHub星标徽章 (https://github.com/djylb/nps/stargazers) - 具有Web UI、HTTP/HTTPS和TCP/UDP转发以及自动证书支持的自托管NAT穿透和反向代理。GPL-3.0许可证。使用Go编写。
  • reverst (https://github.com/flipt-io/reverst) reverst GitHub星标徽章 (https://github.com/flipt-io/reverst/stargazers) - 自托管的HTTP反向隧道,基于HTTP/3和QUIC,具有负载均衡的隧道组和基于主机的路由。Apache-2.0许可证。需要手动配置TLS/DNS;无正式发布;最新标签v0.2.0 (2024-05-27)。
  • PageKite (https://pagekite.net/) pagekite GitHub星标徽章 (https://github.com/pagekite/PyPagekite/stargazers) - 具有托管选项的综合开源解决方案。
  • rustunnel (https://github.com/joaoh82/rustunnel) rustunnel GitHub星标徽章 (https://github.com/joaoh82/rustunnel/stargazers) - 复制ngrok的核心功能。通过中继服务器(自托管或托管)将NAT/防火墙后的本地服务暴露于公共互联网。AGPL-3.0许可证。使用Rust编写。
  • onionpipe (https://github.com/cmars/onionpipe) onionpipe GitHub星标徽章 (https://github.com/cmars/onionpipe/stargazers) - 任何服务的onion地址。onionpipe将本地主机上的端口转发到远程Onion地址作为Tor隐藏服务,反之亦然。使用Go编写。
  • Port Buddy (https://github.com/amak-tech/port-buddy) portbuddy GitHub星标徽章 (https://github.com/amak-tech/port-buddy) - Port Buddy是一个允许您将本地主机或私有网络上打开的端口共享到公共网络的工具。HTTP/TCP/UDP隧道。Apache 2.0许可证。使用Java编写。
  • tunnl.gg (https://tunnl.gg/) tunnl.gg GitHub星标徽章 (https://github.com/klipitkas/tunnl.gg/stargazers) - 基于SSH的托管隧道,使用标准OpenSSH客户端,无需账户:ssh -t -R 80:localhost:8080 proxy.tunnl.gg即提供公共HTTPS URL。完整的MIT许可Go中继,可自托管。
  • pipenet (https://github.com/punkpeye/pipenet) pipenet GitHub星标徽章 (https://github.com/punkpeye/pipenet/stargazers) - localtunnel的现代替代品。捆绑客户端和服务器,提供SDK和CLI。支持云部署的单端口模式。MIT许可证。使用TypeScript编写。
  • tunneller (https://github.com/skx/tunneller) tunneller GitHub星标徽章 (https://github.com/skx/tunneller/stargazers) - 开源。使用Go编写。
  • Crowbar (https://github.com/q3k/crowbar) crowbar GitHub星标徽章 (https://github.com/q3k/crowbar/stargazers) - 通过HTTP GET和POST请求隧道化TCP连接。
  • tunelo (https://github.com/jiweiyuan/tunelo) tunelo GitHub星标徽章 (https://github.com/jiweiyuan/tunelo/stargazers) - 单二进制Rust QUIC隧道,包含客户端、可自托管中继和内置文件服务器/Web浏览器。仅出站,即时公共HTTPS子域名,无需账户。MIT(已声明;LICENSE文件待定)。
  • tunnel (https://github.com/koding/tunnel) tunnel GitHub星标徽章 (https://github.com/koding/tunnel/stargazers) - 这是一个Golang库,而非可直接运行的程序。然而,它看起来易于用于创建自定义解决方案。使用单个TCP套接字,并使用yamux (https://github.com/hashicorp/yamux) 进行多路复用。
  • mmar (https://github.com/yusuf-musleh/mmar) mmar GitHub星标徽章 (https://github.com/yusuf-musleh/mmar/stargazers) - 一个零依赖、可自托管、跨平台的HTTP隧道,将您的localhost通过公共URL暴露给世界。AGPL-3.0许可证。使用Go编写。
  • remotemoe (https://github.com/fasmide/remotemoe) remotemoe GitHub星标徽章 (https://github.com/fasmide/remotemoe/stargazers) - 基于SSH,具有自定义golang服务器。实现了一些独特且实用的功能。不是单纯的隧道,而是将您带入一个基本CLI UI,提供多个交互式有用命令,例如添加自定义主机名。也允许HTTPS和上游SSH的端到端加密。似乎不提供非e2e HTTPS,即无自动Let’s Encrypt支持。
  • docker-tunnel (https://github.com/vitobotta/docker-tunnel) docker-tunnel GitHub星标徽章 (https://github.com/vitobotta/docker-tunnel/stargazers) - 简单的基于Docker的nginx+SSH解决方案。
  • EXPOSE (https://github.com/exposesh) EXPOSE GitHub星标徽章 (https://github.com/exposesh/expose-server/stargazers) - 基于SSH的开源工具,无需配置或安装,全球分发,用于暴露您的本地服务。使用您的GitHub用户名和公共SSH密钥进行身份验证,并为您提供一个短的个性化URL。AGP-3.0许可证。使用Python编写。
  • tunwg (https://github.com/ntnj/tunwg) tunwg GitHub星标徽章 (https://github.com/ntnj/tunwg/stargazers) - 基于用户空间的Wireguard。提供端到端加密TLS,由客户端自动生成Let’s Encrypt证书,支持自定义域名。服务器可自托管且无需存储任何数据。
  • jerson/pgrok (https://www.proxy.jetzt/) pgrok GitHub星标徽章 (https://github.com/jerson/pgrok/stargazers) - ngrok 1.0的fork,包含更新提交。已归档。
  • BitBang (https://github.com/richlegrand/bitbang-cli) bitbang GitHub星标徽章 (https://github.com/richlegrand/bitbang-cli/stargazers) - 将您的机器变成一个URL。您的计算机和浏览器通过WebRTC进行点对点连接。打开链接的人无需账户也无需安装任何东西。通过单一URL提供Shell、文件共享和HTTP/WebSocket代理。使用Go编写。
  • hypertunnel (https://github.com/berstend/hypertunnel) frp GitHub星标徽章 (https://github.com/berstend/hypertunnel)

相似文章

用 SSH 和 nginx 搭建自建 HTTP 隧道

Lobsters Hottest

一篇博客教程,介绍如何搭建一个自建的 HTTP 隧道服务——类似于 ngrok 或 Cloudflare Quick Tunnels——只需使用 OpenSSH 反向转发配合一个 nginx 代理,再加上通配符 DNS、Let's Encrypt 证书,以及 ngx_http_secure_link_module 来生成带哈希、会过期的访问 URL。