1. 6
    untls: Reexposes a TCP over TLS port as a local TCP port show networking github.com/lucasew

This is a basic service to workaround a limitation in Tailscale Funnel. Basically I wanted to expose a Minecraft server to play with the boys but Minecraft doesn’t support TCP over TLS sockets.

    1. 7

      Like stunnel?

      1. 7

        socat can do this too, using an OPENSSL address on one side.

        1. 1

          It doesn’t listen a TLS socket.

          It connects to a TLS socket and reexpose as a unencrypted TCP socket on localhost

        2. 5

          GetFreePort is inherently racy and not a pattern you should copy. It’s better to just pass 0 to listen and then get the socket’s local address if you need to know it.

          1. 1

            I have a small suggestion. You may want to use a bytes.Buffer here where you call Reset after acquiring one from the pool.

            Thanks for sharing!