TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tunnel via Cloudflare to any TCP service

193 pointsby sharjeelsayedalmost 2 years ago

12 comments

niruialmost 2 years ago
OK... if you want to know the REAL benefit of doing this...<p>With this method, you effectively turn Cloudflare into a transport, which enables you to get around the limitation of Cloudflare. Say what if you want to transport UDP packets now (for your Wireguard for example)? Cloudflare don&#x27;t really support that currently, but now it&#x27;s achievable (albeit, not the best way).<p>The software used, both websocat, and gost is there to convert&#x2F;proxy (non-Cloudflare specific) WebSocket connections to arbitrary TCP&#x2F;UDP (supported by gost). You need to install them on both end of your endpoint through, to enable full conversion (App TCP client -&gt; websocat&#x2F;gost client -&gt; [Cloudflare via Websocket] -&gt; websocat&#x2F;gost server -&gt; App TCP server).<p>Also, you can use Tor network to do similar things, just with .onion service. Tor only supports TCP proxying (if I remembered it correctly), now you can do UDP too.
rabusealmost 2 years ago
Cloudflare tunnels have been a blessing for me, as someone locked behind an apartments router trying to host services without the ability to forward ports. The fact that it&#x27;s free, is the cherry on top.
评论 #36008038 未加载
评论 #36007974 未加载
SadTrombonealmost 2 years ago
I see options in my Cloudflare control panel to tunnel things besides HTTP(S) services (including TCP and SSH) via Cloudflare Tunnel. Am I misunderstanding the blog post?
评论 #36008135 未加载
评论 #36008059 未加载
adamchalmost 2 years ago
You don&#x27;t need a websocket proxy. CF tunnel supports TCP and UDP just fine.
评论 #36009755 未加载
评论 #36010311 未加载
评论 #36014974 未加载
评论 #36010069 未加载
jftugaalmost 2 years ago
I wrote something tangentially related, but for single user.<p>&quot;gofwd&quot; is a cross-platform TCP port forwarder with Duo 2FA and Geographic IP integration. Its use case is to help protect services when using a VPN is not possible. Before a connection is forwarded, the remote IP address is geographically checked against city, region (state), and&#x2F;or country. Distance (in miles) can also be used. If this condition is satisfied, a Duo 2FA request can then be sent to a mobile device. The connection is only forwarded after Duo has verified the user.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jftuga&#x2F;gofwd">https:&#x2F;&#x2F;github.com&#x2F;jftuga&#x2F;gofwd</a>
boringuser2almost 2 years ago
Nobody has yet mentioned that they get full unencrypted access to all of your traffic if you do this, so I shall.
评论 #36010173 未加载
评论 #36010299 未加载
anderspitmanalmost 2 years ago
Cloudflare Tunnel is a great service, but if you&#x27;re looking for selfhosted alternatives I maintain a list here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;anderspitman&#x2F;awesome-tunneling">https:&#x2F;&#x2F;github.com&#x2F;anderspitman&#x2F;awesome-tunneling</a>
评论 #36011713 未加载
lapinotalmost 2 years ago
I&#x27;m quite surprised to read what feels like a cloudflare ad from THC..
alexellisukalmost 2 years ago
Hi, I&#x27;m the author of Inlets. We&#x27;ve seen a recent rise in users looking to tunnel TCP traffic w&#x2F;o these kinds of hacks and additional tools.<p>I wrote up a quick guide back in early May - seems relevant to this article as one of the newest users couldn&#x27;t get Cloudflare to work with TCP how he wanted.<p><a href="https:&#x2F;&#x2F;inlets.dev&#x2F;blog&#x2F;2023&#x2F;05&#x2F;04&#x2F;expose-local-tcp-ports.html" rel="nofollow">https:&#x2F;&#x2F;inlets.dev&#x2F;blog&#x2F;2023&#x2F;05&#x2F;04&#x2F;expose-local-tcp-ports.ht...</a>
accrualalmost 2 years ago
I&#x27;ve been thinking about using a tunnel like this to host a retro computing website. My idea was to run OpenBSD i386 on an AMD K6-III (1999) host, then use the built-in webserver httpd(8) to render and serve a static site. The machine would be tunneled via Wireguard to a VPS, and the VPS could optionally terminate the TLS (and transmit plain HTTP over WG) to free up some CPU cycles. :)
评论 #36008610 未加载
efreconalmost 2 years ago
I wrote something similar to be able to run vscode against any remote machine. This was before vscode&#x27;s own tunnels.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;efrecon&#x2F;sshd-cloudflared">https:&#x2F;&#x2F;github.com&#x2F;efrecon&#x2F;sshd-cloudflared</a><p>It automatically runs a dockerised sshd to access your directory. The sshd is configured using your github&#x27;s keys to protect access.
m3kw9almost 2 years ago
Why would I want to do that? Would certain firewalls setup cause issues?
评论 #36009011 未加载