portr
portr copied to clipboard
change default timeout
TL;DR DROPPING CONNECTION, GETTING 'Unregistered subdomain' CONSTANTLY on client. Have to restart client and comes back up.
The longer version: First of all, thank you for your project! It is EXACTLY what I was had in mind. Yay! I have used ngrok since before it was ngrok and ssh tunnels for Xen, bhyve, and other virt hosts before that. And this is SO MUCH BETTER than the horrible script(s) I wrote in zsh that I used for a couple of years.
So, thanks for open sourcing your project, it is awesome and I really appreciate it! <3 FYI: I had some issues getting set up and I figured that if I am having issues, you can definitely assume others are or will be, too.
Least I can do is take some time to report in with my thoughts and nitpicks :P
Couple of things (both with the binary and building the project, didn't try on mac as I am assuming that's what you dev on and prob works solid I'm guessing):
- docs were nice and unexpected! kudos!
- portr config = I am logged in via ssh to a remote server without X, I think you are trying to open a file manager or browser or something, yeah? If you could do a check first or even just dump WHERE the file is supposed to be/go, but I appreciate what you are trying to do, make it easier. Ideally, it would do an X/Wayland check (I use FreeBSD primarily which is a whole nother story)/DISPLAY env var check, and if no DISPLAY, check for EDITOR/vi/nano, if none, print /path/to/file. Actually, I suggest you have the /path/to/config print anyway, why not right?
- missing portr config file = the only other 'major' issue at that point was that the config file was blank, whereas it seemed like it was not supposed to be based on my understanding at that point. That took me a bit of hair pulling as while your docs are great, going from blank file to connecting remotely to my server portr endpoint successfully was a jump. Not only blank on the server but also the 4 or 5 clients I installed to as well.
Now, some 'get off my lawn' gripes:
- Docker Dependency (Ok ok, I am a FreeBSD guy, one of the few ppl on Earth that can't run a Docker container (well, we can on FreeBSD, using bhyve to run a container host, which ironically is what EVERYONE will be doing soon, including Linux (that's what Docker Desktop is). If I can figure it out, I will usually try fairly hard to shake the Docker dependency so I can run it on FreeBSD easily.
- Cloudflare ? How can I shake that one? We don't use Cloudflare and if it's for personal, I'm on afraid.org. Cloudflare is pretty cool, no doubt, but is there a not super difficult way for me to NOT use it? That would be killer.
- Github Auth: I love that you are security focused but ssh tunnels, I'm good with it. It would be SUPER NICE to just have a brute force login method. A simple hash. I mean, I am root, it's ok. Is that harder than OAUTH, I honestly have no idea, I'm a sysadmin (old, before 'devops'). Having been stuck a few times here and there, not able to 2-factor auth while at a datacenter really sucks so that is just an FYI, too.
Out of those 3, Github auteh dependency would be my REALLY want to have. Then Cloudflare, then docker.
++++++++++++++++++++++++++++++++ Alrighty then, now for my ACTUAL problem lol: ** Unregistered Subdomain =Timeout Too Soon? ** ++++++++++++++++++++++++++++++++
So, I have a flaky service on a flaky box at a flaky location (only half-kidding!) and so I have Supervisor kicking the service constantly to keep it available. It seems like the portr server endpoint drops it in a hot microsecond.
Is that adjustable anywhere somewhere? Like, it's not a big deal for me if it doesn't check for a minute or 3, you know? It would be extra sweet if that was a knob that was tunnel adjustable! Like tunnel1 is high availability if it isn't there in 5s, it's already spinning up elsewhere and trying to connect but tunnel2 is my sad offsite server in the desert on a satlink. Shady. It can wait 5m.
Anyway, I am also most likely 'doing it wrong', so feel free to educate me :D
Along those lines, can I easily turn a knob to quiet the logging too?
Once again, thanks for open sourcing, it was the right choice.
Maybe you will be bigger ngrok one day.
ciao, -matt
I'm having the same problem with connections closing after a couple of minutes. The client does not report any error. Are there any logs on the server where we can find details about why this happens?
We're running the server using Docker with the images of version 0.0.12-beta and Cloudflare
Thanks for a great product/project 🙏
Kind regards, Jacob
@molander
docs were nice and unexpected! kudos!
Thanks
portr config = I am logged in via ssh to a remote server without X, I think you are trying to open a file manager or browser or something, yeah? If you could do a check first or even just dump WHERE the file is supposed to be/go, but I appreciate what you are trying to do, make it easier. Ideally, it would do an X/Wayland check (I use FreeBSD primarily which is a whole nother story)/DISPLAY env var check, and if no DISPLAY, check for EDITOR/vi/nano, if none, print /path/to/file. Actually, I suggest you have the /path/to/config print anyway, why not right?
The auto-config file creation is only tested locally. I can add the check, but you can manually create the configuration file. Use this template
server_url: example.org
ssh_url: example.org:2222
secret_key:
tunnels:
- name: portr
subdomain: portr
port: 4321
- Docker was used to make it easy to set up with a few commands. If you want to install it without docker, feel free to do so; there shouldn't be any issues. I will add a section to the documentation for it.
- Cloudflare (or any other DNS provider) is used to set up wildcard SSL for subdomains. Could you check if Caddy supports your DNS provider?
Github Authwill soon be made optional, and email/password login will become the default.
@jacobhallenborgprototyp Does the disconnect issue happen too frequently? I have faced the issue, but not frequently; upon re-connecting, it works fine. Nevertheless, it is something I will look into.
@amalshaji Thanks for your reply :)
We've upgraded to amalshaji/portr-admin:0.0.15-beta but it's still an issue for us, now they disconnect after as little as 2 minutes, sometimes.
It's ofc easy to restart the tunnels, but we'd really like to have them running continuously, since we're using them to receive webhooks.
Let us know if we can gather more info somehow, like in the logs?
@molander GitHub auth is now optional https://github.com/amalshaji/portr/releases/tag/0.0.17-beta
@jacobhallenborgprototyp Does it happen too frequently? Like you connect and after some time you see the Unregistered subdomain screen, you reconnect and the pages comes back again?
@molander
missing portr config file
The setup script should auto download the config file into your clients.
@jacobhallenborgprototyp Does it happen too frequently? Like you connect and after some time you see the
Unregistered subdomainscreen, you reconnect and the pages comes back again?
I my opinion it happens too frequently. The manual reconnection works, but it would be smoother not having to worry at all about the tunnels once they are started.
@jacobhallenborgprototyp This is most likely a connection drop; we will implement re-connections.
@jacobhallenborgprototyp This is most likely a connection drop; we will implement re-connections.
That would be awesome :)
+1 :D
@jacobhallenborgprototyp @molander The latest release should auto reconnect on connection drop