Tailscale C library
Go to file
James Tucker 9095651d2d sourcepkg: add a complete source package build
There is a makefile that will produce a libtailscale.tar.zst. This
archive contains a vendored Go source tree for libtailscale, and a
`configure` and `Makefile` that will produce a .so, a .a, and a .pc file
for building & linking against.

Updates tailscale/tailscale#8912
2023-08-29 11:56:40 -07:00
.github/workflows sourcepkg: add a complete source package build 2023-08-29 11:56:40 -07:00
example libtailscale: make tailscale_listener pollable 2023-03-18 15:04:28 -07:00
python libtailscale: make tailscale_listener pollable 2023-03-18 15:04:28 -07:00
ruby libtailscale: make tailscale_listener pollable 2023-03-18 15:04:28 -07:00
sourcepkg sourcepkg: add a complete source package build 2023-08-29 11:56:40 -07:00
tsnetctest libtailscale: make tailscale_listener pollable 2023-03-18 15:04:28 -07:00
.gitignore sourcepkg: add a complete source package build 2023-08-29 11:56:40 -07:00
go.mod go.mod: bump to recent tailscale and gvisor 2023-08-16 11:43:53 -07:00
go.sum go.mod: bump to recent tailscale and gvisor 2023-08-16 11:43:53 -07: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_test.go libtailscale: make tailscale_listener pollable 2023-03-18 15:04:28 -07:00
tailscale.c libtailscale: make header compatible with c++ 2023-03-18 17:44:38 -07:00
tailscale.go libtailscale: make header compatible with c++ 2023-03-18 17:44:38 -07:00
tailscale.h libtailscale: make header compatible with c++ 2023-03-18 17:44:38 -07: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.