
Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP — instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare's global network. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare.
才了解到 Cloudflare 提供了 Tunnel 服务,买一台 Mac Mini 放家里,就是一台实打实的服务器了。
大致的原理是:它会在你的服务器和 Cloudflare 全球网络之间建立一条私密、加密的地下通道。所有访问你的服务的请求都会先到达 Cloudflare,然后通过这条安全的通道转发到你的本地服务器。你要做的就是在自己的服务器上运行 cloudflared
这个命令。