Skip to content

Releases

Knoten v0.3.2-alpha

Knoten v0.3.2-alpha Pre-release
Pre-release

Choose a tag to compare

@Yacin1102 Yacin1102 released this 09 Nov 18:11

Self-assigned IPv6 addresses, in-memory coordination server

The coordination server no longer hands out addresses. Every machine works out its own IPv6 address from its mesh name, its subnet and its public key. The server is now a small in-memory service with no database. Several meshes can share one server, subnets decide which peers a machine accepts, and a new only mark limits the tunnel to the peers you choose.

New

IPv6 addresses each machine computes itself

  • Each address is built from three parts: the mesh name, the subnet and the public key.
  • Any machine can compute any peer's address from that peer's key and subnet. The server is not involved.
  • meshd logs the machine's address at startup, and meshd -setup prints it at the end.

Meshes

  • New required setting mesh. Machines in the same mesh share the first 48 bits of their addresses.
  • Several meshes can use the same coordination server: a machine ignores peers from any other mesh.

Subnets

  • New setting subnet: this machine's subnet. Setup uses global if you skip the question.
  • New setting accept_subnets: the subnets whose peers this machine uses. ["*"] accepts all of them, and leaving it empty accepts only the machine's own subnet.
  • Peers whose subnet isn't accepted are left out of the tunnel, and the log says so.

"only": true on peers

  • Put it on any static or synced peer. While at least one peer is marked, the tunnel contains only the marked peers. Every other peer stays in the file but out of the tunnel, and that includes new ones from the server.
  • Only you can set or clear the mark. The server can't. meshd keeps it on synced peers across server updates.
  • If the server drops a marked synced peer, its line and its mark go with it, and once no marked peer is left, every peer is back in the tunnel. For a limit that can't lift on its own, mark a static peer.
  • A blocked peer can't be marked.

synced peers work without a server

  • Without server_url, synced peers are now used as written instead of being ignored. Nothing updates them, so edits to their lines take effect.

Coordination server rebuilt, in memory

  • No database and no files. A restart loses nothing, because machines announce themselves again on their next sync.
  • A machine's first sync is how it joins. There is no separate registration step.
  • A machine that stays silent longer than -peer-timeout (default 90s) is dropped.

Changed

  • Setup asks for the mesh name and this machine's subnet instead of an IPv4 address. For each peer it asks for the subnet instead of AllowedIPs.
  • mtu must now be at least 1280, the IPv6 minimum.
  • Peers in meshd.json have a subnet instead of allowed_ips.

Removed

  • The address setting and the server-assigned IPv4 range 10.10.0.0/16.
  • The allowed_ips field on peers.
  • The /v1/register, /v1/sync and /v1/health endpoints. The only endpoint now is /v2/sync.
  • The coordserver -db flag and the SQLite database. This also removes modernc.org/sqlite.

Knoten_0.3.1-alpha

Knoten_0.3.1-alpha Pre-release
Pre-release

Choose a tag to compare

@Yacin1102 Yacin1102 released this 04 Nov 21:15

One config file, with peer memory

meshd now keeps everything in /etc/knoten/meshd.json: settings, private key, VPN address and peers. The state file is gone, and there are no more standalone and coordinated modes.

Peers from the coordination server are saved in that file, so after a restart the tunnel comes back with them, even if the server is down.

A coordination server is used when server_url is set. Peers you add yourself work with or without one.

Each peer has a source:

  • static: added by you, meshd never touches it
  • synced: from the server, kept up to date by meshd
  • blocked: never added to the tunnel, even if the server sends it

Each public key can only appear once. To keep a server peer, change it to static. To drop it, change it to blocked.

meshd checks the file every 5 seconds and applies your edits without a restart. Only changes to server_url, join_token, token_file, mtu and private_key need one. If the file has a mistake, meshd logs it, keeps running with the last working settings and doesn't write to the file until you fix it.

Other changes

  • -setup now creates the key and prints the public key, so -setup -force gives the machine a new identity.
  • Setup no longer asks whether to use a server. Leave the URL empty to run without one. You can add peers by hand either way.
  • -show-key reads the key from meshd.json.
  • -print-default-config is gone. The README explains every field.
  • Unknown fields and duplicate keys in meshd.json are now errors.

Knoten_with_embedded_WireGuard

Pre-release

Choose a tag to compare

@Yacin1102 Yacin1102 released this 03 Nov 15:43
a049593

WireGuard now runs inside meshd

meshd no longer writes a WireGuard config file and shells out to wg and wg-quick. It now embeds wireguard-go and runs the tunnel itself, creating the knoten-wg interface through /dev/net/tun and netlink.

  • No WireGuard install needed. The kernel module and wireguard-tools are no longer required on nodes.
  • Live, minimal updates. Each sync compares the new peer list with what the tunnel already has and sends only the difference. The log shows what changed: synced knoten-wg: 2 added, 0 updated, 0 removed.
  • wg show still works. meshd opens the standard control socket at /var/run/wireguard/knoten-wg.sock, so sudo wg show knoten-wg works if you have wireguard-tools installed.
  • Self-healing tunnel. If the interface or its socket is removed while meshd runs, meshd creates it again (coordinated mode).

Behavior changes

  • The tunnel lives as long as meshd. Stopping meshd removes the tunnel; starting it brings it back. Run meshd as a service (for example systemd with Restart=always).
  • Standalone mode keeps running. It used to write the config and exit; it now brings the tunnel up and stays running. Restart meshd after editing the peer list.
  • -setup only writes the config. It no longer performs a register-and-sync cycle. Start meshd afterwards.
  • -once was removed.
  • SIGINT / SIGTERM remove the tunnel. Before, they left it up.
  • New addresses start at 10.10.0.3. The coordination server now keeps the first two addresses of the range back. Machines that are already enrolled keep their address.

Upgrading from v0.2.0-alpha

  • Your identity is kept. Existing configs already point to /var/lib/knoten/meshd-state.json through state_path. Only new setups use the new default path, /var/lib/knoten/meshd-State_file.json.
  • /etc/wireguard/knoten-wg.conf is no longer used. Bring the old tunnel down once (sudo wg-quick down knoten-wg), then delete the file.
  • mtu is now a number. If you set it by hand as a string ("mtu": "1420"), change it to "mtu": 1420.
  • dns is no longer used and is ignored.

Under the hood

  • Addresses, ranges and endpoints are parsed with net/netip, for stricter validation in setup, the config and the coordination server.
  • New dependencies: golang.zx2c4.com/wireguard and github.com/vishvananda/netlink. Both binaries are still static Go builds.

Known limitation

meshd does not remember its peers yet. Every restart builds the tunnel with no peers until the next successful sync. If the coordination server is unreachable at that moment, the node stays cut off until it comes back. The next release adds peer memory and merges standalone and coordinated mode into one configuration file.

knoten_first_release

knoten_first_release Pre-release
Pre-release

Choose a tag to compare

@Yacin1102 Yacin1102 released this 01 Sep 18:21

v0.2.0-alpha

First working release of Knoten, a mesh VPN that creates direct, peer-to-peer WireGuard tunnels.

What's included

Coordination server (coordserver)

  • Machine registration with automatic VPN address assignment from 10.10.0.0/16
  • Peer sync endpoint, nodes poll for the latest peer list on a configurable interval
  • Health endpoint (/v1/health) reporting machine count, uptime, and fleet status
  • Join token authentication with constant-time comparison
  • Pure-Go SQLite storage (WAL mode, synchronous = FULL)
  • Defensive HTTP layer: bounded request bodies, strict JSON decoding, request timeouts, panic recovery

Node daemon (meshd)

  • Automatic X25519 key generation via crypto/ecdh — private keys never leave the machine
  • Register → sync → render → apply loop with live wg syncconf updates (zero tunnel downtime)
  • Exponential backoff with jitter (1s → 60s) when the coordination server is unreachable
  • Standalone mode for static peer lists, no server required
  • Interactive setup wizard (meshd -setup)
  • SIGHUP for immediate sync, SIGTERM/SIGINT for clean shutdown
  • Atomic config writes (temp → fsync → rename)

Requirements

  • Linux with wireguard-tools installed
  • One reachable host for coordserver (coordinated mode only)

Full Changelog: https://github.com/Yacin1102/Knoten/commits/0.2.0-alpha