Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 694 Bytes

File metadata and controls

20 lines (16 loc) · 694 Bytes

Tailscale

Experimental bindings to tailscale-rs in Elixir. Please see the warnings there: in short, this is early-days, unstable software containing unaudited cryptography. Do not build production code around this, and please understand that we may break the API as we iterate.

code sample

# Connect to tailscale:
{:ok, dev} = Tailscale.connect("tsrs_keys.json", auth_key: "YOUR_AUTH_KEY")
# Fetch our tailnet IPv4:
{:ok, ip} = Tailscale.ipv4_addr(dev)

# Bind a udp socket:
{:ok, sock} = Tailscale.Udp.bind(dev, ip, 1234)
# Send a udp message over the tailnet
:ok = Tailscale.Udp.send(sock, "100.64.0.1", 5678, "hello")