zlacker

Show HN: Serveo–Expose local servers using only SSH

submitted by trevor+(OP) on 2017-07-24 21:38:16 | 62 points 17 comments
[view article] [source] [links] [go to bottom]
replies(7): >>trevor+02 >>skanga+tJ >>chaz6+WK >>fishnc+bL >>kodfod+wV >>thinxe+y51 >>dr_fau+Oa1
1. trevor+02[view] [source] 2017-07-24 21:53:36
>>trevor+(OP)
Inspired by https://medium.com/@shazow/ssh-how-does-it-even-9e43586e4ffc and ngrok, I made this SSH server that assigns a public url for each remote port forwarding request you make. Start a web server on 8080, then try this:

ssh -R 80:localhost:8080 serveo.net

It's an attempt to make port forwarding as easy as ngrok or localtunnel, but using the SSH client you already have.

Also includes HTTP inspection and replay like ngrok.

replies(1): >>gerdus+YO
2. skanga+tJ[view] [source] 2017-07-25 07:18:02
>>trevor+(OP)
Looks interesting. Somehow it would not work on a image file.
replies(1): >>trevor+hR
3. chaz6+WK[view] [source] 2017-07-25 07:34:11
>>trevor+(OP)
I like it!

Edit: How about support for HTTP/2 and TLS 1.3?

replies(1): >>trevor+iS
4. fishnc+bL[view] [source] 2017-07-25 07:35:53
>>trevor+(OP)
Great job! Have you considered adding HTTPS support?
replies(2): >>kennyd+AN >>trevor+5R
◧◩
5. kennyd+AN[view] [source] [discussion] 2017-07-25 08:07:17
>>fishnc+bL
Full HTTPS would probably require more than just ssh. Ideally ngrok and this are mostly used for exposing developer sites where that doesn't really matter
◧◩
6. gerdus+YO[view] [source] [discussion] 2017-07-25 08:27:06
>>trevor+02
very cool. Any plans to open source the code?
◧◩
7. trevor+5R[view] [source] [discussion] 2017-07-25 08:54:24
>>fishnc+bL
The public Serveo web server supports HTTPS. You'll get a URL like https://exussum.serveo.net.

Do you mean something like https://ngrok.com/docs#tls, so TLS isn't terminated until it reaches the user's machine? Should be doable; haven't considered it yet!

◧◩
8. trevor+hR[view] [source] [discussion] 2017-07-25 08:57:08
>>skanga+tJ
I've noticed occasional hiccups too, but it usually works on photos! Consider it alpha quality.
◧◩
9. trevor+iS[view] [source] [discussion] 2017-07-25 09:14:54
>>chaz6+WK
I'm using the stock Go HTTP and TLS stack. When I connect with Chrome, I see HTTP/2 and TLS 1.2, which is the version Go implements according to https://golang.org/pkg/crypto/tls/.
10. kodfod+wV[view] [source] 2017-07-25 10:09:57
>>trevor+(OP)
I cannot see a privacy policy, or any statement regarding the handling of the data flowing through this tool, nor any code which could be audited.
replies(1): >>trevor+p01
◧◩
11. trevor+p01[view] [source] [discussion] 2017-07-25 11:20:22
>>kodfod+wV
Good point! HTTP requests and responses are retained in the program's memory for the duration of an SSH session, then forgotten on SSH disconnect. IP addresses are logged on SSH connect. I'll add a statement to the website and the tool's help message.
12. thinxe+y51[view] [source] 2017-07-25 12:19:09
>>trevor+(OP)
The site is using Let's Encrypt for https. Currently there is a hard limit of 2000 subdomains per week, meaning there will be at most 2000 simultaneous connections!

It seems that Wildcard support is coming Jan 2018.

replies(1): >>trevor+r71
◧◩
13. trevor+r71[view] [source] [discussion] 2017-07-25 12:46:51
>>thinxe+y51
You can only get certificates for up to 2000 new subdomains per week, but you can renew many more than that, so I can work my up to a few tens of thousands of subdomains if needed.

From https://letsencrypt.org/docs/rate-limits/:

"The main limit is Certificates per Registered Domain (20 per week)...

"If you have a lot of subdomains, you may want to combine them into a single certificate, up to a limit of 100 Names per Certificate. Combined with the above limit, that means you can issue certificates containing up to 2,000 unique subdomains per week...

"To make sure you can always renew your certificates when you need to, we have a Renewal Exemption to the Certificates per Registered Domain limit. Even if you’ve hit the limit for the week, you can still issue new certificates that count as renewals...

"Note that the Renewal Exemption also means you can gradually increase the number of certificates available to your subdomains. You can issue 20 certificates in week 1, 20 more certificates in week 2, and so on, while not interfering with renewals of existing certificates."

A wildcard certificate would be far more convenient! I'm looking forward to that.

replies(1): >>dijit+c91
◧◩◪
14. dijit+c91[view] [source] [discussion] 2017-07-25 13:03:28
>>trevor+r71
I would highly recommend talking to LetsEncrypt staff, since those limits are there to mainly prevent abuse; and they have been quite forthcoming with raising them or even lifting them completely in some cases.
replies(1): >>trevor+6b1
15. dr_fau+Oa1[view] [source] 2017-07-25 13:17:25
>>trevor+(OP)
would you consider open sourcing this?
replies(1): >>trevor+xb1
◧◩◪◨
16. trevor+6b1[view] [source] [discussion] 2017-07-25 13:19:53
>>dijit+c91
Oh, good to know. Thank you!
◧◩
17. trevor+xb1[view] [source] [discussion] 2017-07-25 13:25:28
>>dr_fau+Oa1
Yes, someday. It would probably take me 15 or 20 hours to get something published on GitHub. I'll get around to it eventually!
[go to top]