tailscale-localapi 0.5.0

Client for the Tailscale local API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::env;

async fn run() {
    let socket_path = env::args()
        .nth(1)
        .unwrap_or_else(|| "/var/run/tailscale/tailscaled.sock".to_string());
    let client = tailscale_localapi::LocalApi::new_with_socket_path(socket_path);

    dbg!(client.status().await.unwrap());
}

fn main() {
    let rt = tokio::runtime::Builder::new_current_thread()
        .enable_all()
        .build()
        .unwrap();
    rt.block_on(run());
}