4 releases (breaking)

0.4.0 Dec 27, 2023
0.3.0 Aug 23, 2023
0.2.0 Aug 21, 2023
0.1.0 Aug 21, 2023

#2 in #socket-client

Download history 7/week @ 2024-02-16 13/week @ 2024-02-23 3/week @ 2024-03-01 8/week @ 2024-03-15 20/week @ 2024-03-22 20/week @ 2024-03-29 43/week @ 2024-04-05 7/week @ 2024-04-12

92 downloads per month

MIT license

17KB
380 lines

tailscale-localapi

This is a rust crate designed to interact with the Tailscale local API. On Linux and other Unix-like systems, this is through a unix socket. On macOS and Windows, this is through a local TCP port and a password. The Tailscale localapi is large but so far this crate does:

  1. Get the status of the node and the tailnet (similar to tailscale status)
  2. Get a certificate and key for the node (similar to tailscale cert)
  3. Get whois information for a given IP address in the tailnet

Limitations

This crate uses hyper and requires tokio and async rust.

Example

let socket_path = "/var/run/tailscale/tailscaled.sock";
let client = tailscale_localapi::LocalApi::new_with_socket_path(socket_path);
dbg!(client.status().await.unwrap());

Dependencies

~6–17MB
~203K SLoC