mirror of
https://github.com/tailscale/libtailscale.git
synced 2024-10-23 08:53:45 +08:00
Tailscale C library
9095651d2d
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 |
||
---|---|---|
.github/workflows | ||
example | ||
python | ||
ruby | ||
sourcepkg | ||
tsnetctest | ||
.gitignore | ||
go.mod | ||
go.sum | ||
LICENSE | ||
README.md | ||
tailscale_test.go | ||
tailscale.c | ||
tailscale.go | ||
tailscale.h |
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.