Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtdowney/tailscale-localapi
Rust client for the Tailscale Local API
https://github.com/jtdowney/tailscale-localapi
Last synced: 3 months ago
JSON representation
Rust client for the Tailscale Local API
- Host: GitHub
- URL: https://github.com/jtdowney/tailscale-localapi
- Owner: jtdowney
- License: mit
- Created: 2023-08-21T02:52:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-05T22:08:51.000Z (8 months ago)
- Last Synced: 2024-09-12T10:42:16.558Z (4 months ago)
- Language: Rust
- Size: 15.6 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tailscale-localapi
This is a rust crate designed to interact with the [Tailscale](https://tailscale.com) 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
```rust
let socket_path = "/var/run/tailscale/tailscaled.sock";
let client = tailscale_localapi::LocalApi::new_with_socket_path(socket_path);
dbg!(client.status().await.unwrap());
```