Rename the CLI package to tsunagi and its executable to tsng

The command line package is now `tsunagi` and builds the `tsng` executable,
which the packages, the unit, the installers and the workflows install and
run. The core library package becomes `tsunagi-core`, keeping the library name
`tsunagi`, so no code changes `use tsunagi::...`. Directories follow
(crates/tsunagi-core, crates/tsunagi). Every command shown to a person is now
`tsng ...`.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Aleksandr BogomiakovandClaude committed 2026-10-03 02:14:43 +01:00
1 parent bb38562b0a
commit 9966b50407
120 files changed
+631 -635

No files matched your search

+7 -7
View File
@@ -27,27 +27,27 @@ group, so after `sudo usermod -aG tsunagi "$USER"` (and logging in again) no
`sudo` is needed:
```sh
sudo tsunagi status
sudo tsunagi join <network-name> <tsn1…secret>
sudo tsng status
sudo tsng join <network-name> <tsn1…secret>
```
## As your own user — one capability, no service
```sh
sudo install -m 0755 tsunagi /usr/local/bin/tsunagi
sudo setcap cap_net_admin,cap_net_bind_service+p /usr/local/bin/tsunagi
sudo install -m 0755 tsunagi /usr/local/bin/tsng
sudo setcap cap_net_admin,cap_net_bind_service+p /usr/local/bin/tsng
sudo usermod -aG tsunagi "$USER" # so the resolver works; log in again after
tsunagi up
tsng up
```
Nothing runs as root. The capability is lost on every rebuild or copy of the
binary, so re-run `setcap` after replacing it. The agent uses your per-user
state directory and socket, so plain `tsunagi status` (no sudo) reaches it.
state directory and socket, so plain `tsng status` (no sudo) reaches it.
## Without touching the OS
```sh
tsunagi up --no-tun
tsng up --no-tun
```
Tunnels form and handshake between agents, but no interface, address or route is
+7 -7
View File
@@ -18,7 +18,7 @@ fi
echo "Installing tsunagi to ${PREFIX}/bin"
install -d "${PREFIX}/bin"
install -m 0755 "${here}/tsunagi" "${PREFIX}/bin/tsunagi"
install -m 0755 "${here}/tsng" "${PREFIX}/bin/tsng"
# The dedicated system user the service runs as (works with either shadow's
# useradd or Debian's adduser).
@@ -47,19 +47,19 @@ Done. Start the agent with:
Control it with sudo (the CLI finds the service's socket automatically):
sudo tsunagi status
sudo tsunagi join <network-name> <tsn1…secret>
sudo tsng status
sudo tsng join <network-name> <tsn1…secret>
EOF
else
cat <<EOF
Installed the binary; no systemd found, so no service was set up. Either:
* run it as root: sudo ${PREFIX}/bin/tsunagi up
* or as your own user: sudo setcap cap_net_admin,cap_net_bind_service+p ${PREFIX}/bin/tsunagi
tsunagi up
* run it as root: sudo ${PREFIX}/bin/tsng up
* or as your own user: sudo setcap cap_net_admin,cap_net_bind_service+p ${PREFIX}/bin/tsng
tsng up
(add yourself to the tsunagi group so the resolver works:
sudo usermod -aG tsunagi "\$USER")
* or without touching the OS: tsunagi up --no-tun
* or without touching the OS: tsng up --no-tun
EOF
fi
+1 -1
View File
@@ -30,7 +30,7 @@ Environment=TSUNAGI_CONTROL_GROUP=tsunagi
# The tarball installer puts the binary here; the deb and the Arch package
# rewrite this to /usr/bin where they install it.
ExecStart=/usr/local/bin/tsunagi up
ExecStart=/usr/local/bin/tsng up
Restart=on-failure
RestartSec=5