No description
Find a file
David Crawshaw 926893f68c libtailscale: take a C.int, not a Go int
This was compiling because of the implicit integer conversion on the C
side. But -1 was becoming INT32MAX. Which was an invalid fd, so the logs
were hidden just as if the fd were -1. But it filled strace with EBADF.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2023-03-07 12:36:29 -08:00
.github/workflows ruby: add a gem that wraps the library 2023-03-02 11:07:17 -08:00
example libtailscale: Tailscale C library 2023-03-01 08:21:28 -08:00
python libtailscale: update tailscale_loopback 2023-03-06 11:58:20 -08:00
ruby libtailscale: update tailscale_loopback 2023-03-06 11:58:20 -08:00
tsnetctest libtailscale: call hostinfo.SetApp 2023-03-07 09:36:31 -08:00
.gitignore ruby: remove unnecessary artifacts from distribution 2023-03-03 16:57:51 -08:00
go.mod go.mod, go.sum: update tsnet 2023-03-06 11:58:20 -08:00
go.sum go.mod, go.sum: update tsnet 2023-03-06 11:58:20 -08:00
LICENSE LICENSE: add common 3-clause license we use 2023-03-01 20:22:42 -08:00
README.md LICENSE: add common 3-clause license we use 2023-03-01 20:22:42 -08:00
tailscale.c libtailscale: update tailscale_loopback 2023-03-06 11:58:20 -08:00
tailscale.go libtailscale: take a C.int, not a Go int 2023-03-07 12:36:29 -08:00
tailscale.h libtailscale: update tailscale_loopback 2023-03-06 11:58:20 -08:00
tailscale_test.go libtailscale: Tailscale C library 2023-03-01 08:21:28 -08:00

libtailscale

libtailscale is a C library that embeds Tailscale into a process.

Use this library to compile Tailscale into your program and get an IP address on a tailnet, entirely from userspace.

Building

With the latest version of Go, run:

go build -buildmode=c-archive

This will produce a libtailscale.a file. Link it into your binary, and use the tailscale.h header to reference it.

It is also possible to build a shared library using

go build -buildmode=c-shared

Bugs

Please file any issues about this code or the hosted service on the issue tracker.

License

BSD 3-Clause for this repository, see LICENSE.