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.

Bore: A simple CLI tool for making tunnels to localhost

272 pointsby willmorrisonabout 3 years ago

15 comments

apitmanabout 3 years ago
I maintain a list of ngrok&#x2F;Cloudflare Tunnel alternatives here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;anderspitman&#x2F;awesome-tunneling" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;anderspitman&#x2F;awesome-tunneling</a><p>It&#x27;s interesting to me how many times this particular wheel has been reinvented. That said, it&#x27;s a great exercise and one I highly recommend if you want to learn a bit more about networking.<p>I like the minimalism of this implementation.
评论 #30973629 未加载
评论 #30973805 未加载
评论 #30974512 未加载
Klasiasterabout 3 years ago
How about UPNPC when your local gateway supports it?<p><pre><code> sudo apt install miniupnpc upnpc -r 22 57922 TCP # forward 57922 on public address to this client&#x27;s port 22 </code></pre> Together with something like <a href="https:&#x2F;&#x2F;dynv6.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dynv6.com&#x2F;</a> you even get a subdomain that you can point to the public address:<p><pre><code> curl &quot;https:&#x2F;&#x2F;ipv4.dynv6.com&#x2F;api&#x2F;update?ipv4=auto&amp;token=$TOKEN&amp;zone=$ZONE.dynv6.net&quot; curl &quot;https:&#x2F;&#x2F;ipv6.dynv6.com&#x2F;api&#x2F;update?ipv6=auto&amp;token=$TOKEN&amp;zone=$ZONE.dynv6.net&quot;</code></pre>
PeterWhittakerabout 3 years ago
While this may be very simple to use, why would I use this in preference to SSH, given that SSH has figured out authentication, session security, etc?<p>Yes, setting this up with SSH is (mildly) more complex, but given the inherent security, one wonders why one would opt for simplicity.
评论 #30972090 未加载
评论 #30972110 未加载
评论 #30974533 未加载
ekzhangabout 3 years ago
Hey, author of bore here! I&#x27;ve been summoned by my friend who saw this on the front page of HN. Thanks for posting.<p>Happy to answer any questions, though the README has most of the technical details already. Quick FAQ:<p>--<p>Q: What inspired this?<p>A: I wanted to make a really simple CLI tool for forwarding local TCP ports. No TLS termination or any other features. Localtunnel is unmaintained, slow, and requires Node.js. Ngrok v2 is proprietary, while Ngrok v1 is unmaintained, leaks memory, and is complicated to set up (requires wildcard certificates...). Why can&#x27;t we just write a simple, minimal binary that does this? And focus on user experience (good error messages, clean code, systems correctness). That&#x27;s the goal.<p>--<p>Q: Why Rust?<p>A: Because Rust gives you a lot of things: tracking lifetimes of variables statically, very fast code execution, data-race freedom guaranteed by the compiler, documentation, unit testing, simple binary distribution in the form of `cargo install`, and a strong focus on correctness. Tokio is also a _really_ great asynchronous runtime for writing network services.<p>--<p>Q: Why release a public server?<p>A: Mostly because I want it to be as easy as possible to try and access Bore, even if you don&#x27;t have access or the technical means to run an instance in the cloud yourself. That said, &quot;bore.pub&quot; is not hard-coded anywhere inside the source code. The CLI usage examples explicitly pass in a mandatory `--to bore.pub` option to make sure that this software is not tied to any particular server instance. And an explicit goal of bore is to be easy to self-host, just run a single command (it&#x27;s `bore server`) and you&#x27;re all set.<p>--<p>Q: How much does this cost you?<p>A: I&#x27;m running the public server (bore.pub) on a $6&#x2F;mo DigitalOcean droplet right now, the smallest size on shared vCPU. I just checked my dashboard, and it&#x27;s only using 2% CPU at the moment. Will upgrade if I need to, but I don&#x27;t expect the public server to incur significant fees unless bore gets _really_ popular.<p>--<p>Q: Is there potential for abuse?<p>A: I don&#x27;t believe there&#x27;s much potential for abuse here, in terms of distributing illegal content. If you wanted to do that, you could just set up port forwarding on your router and have people connect directly. Also, bore.pub doesn&#x27;t guarantee you a stable TCP port to share with people; it&#x27;s intended as a developer tool. So the risk seems fairly low.<p>--<p>Q: How can I help with this?<p>A: You can star the repository, share it with your friends, try using bore, and give any feedback on the issues page. Any help with packaging in software repositories or CI&#x2F;CD binary builds would always be appreciated as well! Right now the only installation option is from source, using `cargo install bore-cli`. Finally, feel free to follow me on Twitter (<a href="https:&#x2F;&#x2F;twitter.com&#x2F;ekzhang1" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;ekzhang1</a>) where I&#x27;ve been posting some updates on this work.<p>--<p>Q: How can I learn more?<p>A: Read the source code — it&#x27;s literally 400 lines of Rust, super short if you have an hour or so this afternoon. :)
评论 #30973452 未加载
评论 #30973039 未加载
评论 #30975563 未加载
评论 #30972265 未加载
评论 #30974587 未加载
评论 #30987856 未加载
评论 #30982772 未加载
评论 #30972269 未加载
heinrichhartmanabout 3 years ago
This is a very slick tool that allows you to forward ports from your local machine to a public server at `bore.pub`.<p>I hope this service will continue to be available, however it looks to me as if this service is very easily abused (e.g. by spreading illegal content). But even if it just gets popular there are bandwidth costs which may run high quickly, if you have a few 100 heavy users.<p>If the author is here:<p>- How much of a concern is this for you?<p>- Do you have plans to offset the bandwidth fees?<p>- The backend is a single host, right? When would you need to scale this?
评论 #30971997 未加载
评论 #30972085 未加载
评论 #30972266 未加载
评论 #30973035 未加载
评论 #30971969 未加载
bnertabout 3 years ago
This is super cool. Well done!
评论 #30973553 未加载
lapserabout 3 years ago
I&#x27;m assuming the bore server would have to be listening on all ports right? Doesn&#x27;t that cause risk as all ports (or lots of them anyway) are open?<p>Also, seems like it&#x27;d be trivial to add TLS termination. I&#x27;ve used ngrok for it&#x27;s TLS termination when developing GH Webhook listeners.
评论 #30973595 未加载
评论 #30973949 未加载
scnsabout 3 years ago
Have nearly finished Domain Driven made functional by Scott Wlaschin, highly recommend it. Have to disagree with the conclusion of refactoring legacy system to an event driven one. Subscribing to events makes it implicit and thus hard to follow what is happening. Being explicit pays off.
joshbaptisteabout 3 years ago
Binary musl self contained release would be great for adoption..
hsbauauvhabzbabout 3 years ago
Why not just use ssh with local or remote port forwarding? You get free auth, stream encryption, and battle tested code.<p>Legitimately, what benefits does this have?
评论 #30973578 未加载
pabs3about 3 years ago
I think I would just use Tor onion services for this.
anonuabout 3 years ago
Isn&#x27;t this socat?
评论 #30974565 未加载
skangaabout 3 years ago
Can we get binaries for Linux, Mac &amp; Windows
polioabout 3 years ago
What would this be used for?
评论 #30972661 未加载
评论 #30973793 未加载
lmcabout 3 years ago
&gt; This will expose your local port at localhost:8000 to the public internet at bore.pub:&lt;PORT&gt;, where the port number is assigned randomly.<p>Port numbers are limited to 65535. Isn&#x27;t this un-scalable and a <i>massive</i> security risk?
评论 #30973571 未加载