libtailscale icon indicating copy to clipboard operation
libtailscale copied to clipboard

Add funnel functionality to C library

Open mastermakrela opened this issue 1 year ago • 0 comments

While working on Tailscale in js[^1] I've noticed that while tailscale server equivalent was present, tailscale funnel was missing, although it's available in the underlying tsnet library.

This PR exposes it to be usable from C.

Contributions:

  1. tailscale_listen_funnel — starts a funnel instead of tailnet only listener, otherwise equivalent to tailscale_listen

  2. tailscale_cert_domains — retrieves the domain name under which the funnel is accessible. nice to have for better terminal message

  3. tailscale_accept_nonblocking — not directly connected to the funnel, but helpful for not blocking the js event loop with tailscale_accept

Also, as I was editing it anyway, I've also fixed some typos in tailscale.h.


I see there is a failing check, but I can't see the whole message. Please let me know what I have to correct and I'll gladly do it. :)


[^1]: PR is a possible future work, but currently FFI in JS is not really standardized. So I've made a separate repo for now.

mastermakrela avatar Jan 19 '25 21:01 mastermakrela