tailscale / golink

A private shortlink service for tailnets
BSD 3-Clause "New" or "Revised" License
1.22k stars 78 forks source link

Deploying on Render #87

Open olivier-thatch opened 11 months ago

olivier-thatch commented 11 months ago

We use Render as our host. I tried deploying the Docker image for golink as a private service on Render, however it's not quite working.

I think it's because Docker services on Render do not have full networking capabilities. Render's team provides a sample script for running the Tailscale daemon here. The script uses the --tun=userspace-networking and --socks5-server=localhost:1055 flags and sets the ALL_PROXY environment variable to socks5://localhost:1055/.

I don't know enough about Tailscale or networking to say what exactly would be needed to make Golink work on Render, but AFAICT there is currently no way to pass custom arguments supported by the standalone Tailscale daemon like --tun to the Tailscale client embedded in the Golink service anyway (I think this is what #79 is requesting).

Happy to provide more details about the exact behavior I'm observing when trying to deploy on Render.

willnorris commented 11 months ago

golink uses the tsnet library, so there is no separate tailscale daemon... it's just part of the golink process. tsnet always uses userspace networking, so you don't need to do anything special for that. We would, however, need to add a way to instruct it to use a socks5 proxy. tsnet has support for that, we would just need to wire it up in golink. Very doable, so I'll leave this open to come back to when I've got some free cycles.

willnorris commented 11 months ago

err... the Render example looks like it's instructing other processes to use Tailscale's socks5 proxy? That shouldn't be relevant for golink. I'll setup a Render account and test myself.