2547 Commits
Author SHA1 Message Date
Neil Alexander 422836eeb2 Yggdrasil 0.5.14 v0.5.14 2026-06-19 22:19:23 +01:00
Neil Alexander 0180dbe48e Update dependencies 2026-06-19 22:18:23 +01:00
Neil Alexander 32a8702b2e Yggdrasil 0.5.14-RC.1 v0.5.14-RC.1 2026-06-14 15:30:17 +01:00
Neil Alexander 6fedfd259e Update ironwood (packet queue size cap) 2026-06-14 15:23:25 +01:00
Neil Alexander 763db9a1dc Update dependencies 2026-06-10 22:18:04 +01:00
Neil Alexander 5b2647bc7e Update dependencies, minimum Go version is now 1.25 2026-06-02 13:18:06 +01:00
1b98dfe7d1 Implement group password for session auth (#1350)
This adds a new `GroupPassword` option to the configuration file. Only
nodes that share the same `GroupPassword` are able to exchange overlay
traffic with each other, allowing the formation of closed networks.

This does not affect peerings, nodes with different `GroupPassword` set
can still forward traffic for each other and act as routers in the wider
network.

If the `GroupPassword` is set, then it is not possible to access public
services or nodes on the public testnet. This is intentional.

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2026-06-01 22:17:11 +01:00
Alex MelanandGitHub dd056e006c fix: avoid panics on edge-case input across modules (#1343)
## Summary
- ipv6rwc: validate IPv6 packet length before reading the version nibble
in writePC
- config: guard the BOM check against configs shorter than two bytes
- admin: replace unchecked net.Error type assertion with errors.As;
tolerate empty unix socket paths
- multicast: log and continue on ReadFrom errors instead of panicking;
use checked type assertion on UDPAddr
- mobile: reject negative length in SendBuffer; nil-check AddrForKey in
GetPeersJSON and SummaryForConfig
- admin/get{tree,paths,sessions}: skip entries when AddrForKey returns
nil instead of dereferencing
- core/nodeinfo: validate the requested public key length in
nodeInfoAdminHandler, matching the other proto handlers
- add regression tests for the panic paths

## Why
A handful of error paths and platform-API edge cases reach fixed-size
indexing or unchecked type assertions before any length validation.
Most are reachable only locally (an empty config piped to -useconf,
a 0-byte packet from the mobile bindings, an admin DialTimeout error
that doesn't satisfy net.Error on some platforms), but they crash the
daemon hard. Have them return errors or skip the entry instead.

## Testing
- go test ./...
- go vet ./...
2026-05-12 21:42:57 +01:00
Ascii MothandGitHub 2cc8e7506e Allow WebSocket listeners to configure browser origins (#1342)
Adds an `origin` query option for `ws://` listener URLs so peer
operators can
explicitly allow browser-hosted WebSocket clients.

- `ws://host:port` keeps the existing same-origin behavior
- `ws://host:port?origin=demo.example.org` allows that origin host
- `ws://host:port?origin=https://demo.example.org` allows that scheme
and host
- repeated `origin=` parameters allow multiple origin patterns
- `origin=*` intentionally disables origin verification for public
WebSocket
  peer endpoints

## Problem
I've implemented a WASM based browser demo yggdrasil node to found that
it
cannot directly dial any existing public `ws://` or `wss://` peers.

Browsers always include an `Origin` header in WebSocket handshakes, and
the
JavaScript `WebSocket()` constructor does not allow applications to
override or
remove arbitrary handshake headers.  
This means a browser demo served from an origin such as
`http://127.0.0.1:8000` cannot connect to a public peer whose WebSocket
server
only accepts same-origin handshakes.
2026-05-12 21:40:59 +01:00
state-plumberandGitHub aaf263957b Change ownership of admin socket before dropping permissions (#1336)
This is to allow access to the socket by members of the group that
permissions are dropped to.
2026-05-12 21:39:55 +01:00
state-plumberandGitHub be5daeba7a Add -notifyfd flag for s6-style readiness notification (#1337)
Write a newline to the specified file-descriptor to signal that
yggdrasil is fully initialised and ready.

s6 service startup notifications are described
[here](https://skarnet.org/software/s6/notifywhenup.html).

Related: #1148
2026-04-11 18:10:59 +01:00
Alex MelanandGitHub bc72b106b7 fix: reject malformed network input in parsers (#1340)
## Summary
- validate handshake metadata field lengths before fixed-size reads
- reject truncated multicast advertisements before slicing the hash
payload
- add regression tests for malformed and truncated input

## Why
Both parsers currently trust length information from the incoming
payload a bit too much. Malformed network input can reach fixed-size
reads/slices and panic the process instead of being rejected cleanly.

## Testing
- go test ./...
2026-04-11 12:04:12 +01:00
SUNsungandGitHub 2527290bfd fix core.Logger (#1323)
Fixing typo
https://github.com/yggdrasil-network/yggdrasil-go/blob/50def9362f481eaae5ab299ed9b0cb1c51a7b87d/src/multicast/multicast.go#L64

I didn't find anywhere else in the project where gologme was mistakenly
used instead of core.Logger
2026-03-12 10:00:20 +00:00
RevertronandGitHub 50def9362f Update gomobile bind command for Android build (#1318)
Latest gomobile/ndk for some reason default to API 16, and this leads to
build error.
2026-03-09 09:57:00 +00:00
Neil Alexander dd1eb6ed92 Add vendored sources to CI packaging workflow 2026-03-01 14:29:41 +00:00
Neil Alexander b88fec63ff Yggdrasil 0.5.13 v0.5.13 2026-02-24 23:20:59 +00:00
Neil Alexander dc521be6ac Yggdrasil 0.5.13-RC.2 v0.5.13-RC.2 2026-02-23 22:58:51 +00:00
Neil Alexander 82df3ea9a5 Prevent adding empty peers at runtime
Fixes #1182
2026-02-23 22:55:06 +00:00
Neil Alexander a4b522288d Remove support for Windows 32-bit ARM
This is no longer supported by Go 1.26.
2026-02-23 22:44:01 +00:00
Neil Alexander 8a513680eb Run go mod tidy 2026-02-23 22:35:02 +00:00
Neil Alexander 2e50c21541 Fix lint issues 2026-02-19 18:00:48 +00:00
Neil Alexander 144235d23a Update dependencies, new tables in yggdrasilctl 2026-02-19 17:56:07 +00:00
Neil Alexander 36b6399bb7 Enable Go 1.26 in CI 2026-02-19 16:12:02 +00:00
Neil Alexander f3c4cdd89e Yggdrasil 0.5.13-RC.1 v0.5.13-RC.1 2026-01-19 16:36:32 +00:00
Andrei TregubovandGitHub 9184cd23e5 Fix outbound link-local connections on mobile (#1300) 2026-01-18 19:12:31 +00:00
20155a2081 Add windows build file (#1240)
bat file to build in windows

Co-authored-by: SadovovAlex <aasdvv@gmail.com>
2026-01-18 15:06:26 +00:00
Neil Alexander 9e781cc912 Fix lint error 2026-01-18 15:04:28 +00:00
Neil Alexander aad8c9a9cb Update GHA dependencies 2026-01-18 15:02:52 +00:00
mirefly42andGitHub df48ac2ada Fix default config permissions (#1253)
Currently, all init scripts, except for systemd, will generate a config
file with default permissions, which is usually `rw-r--r--`.
This is bad, because the config contains a private key.

The systemd service does `chmod 640` after creating the config, which is
much better than just leaving it readable for everyone forever, but
there is still a slight chance that some malicious program might steal
the private key during the time window between key creation and chmod.

For this reason, in this pull request I use `umask 037`, so the config
won't have read permission for others in the first place.

Note that I have only tested openrc and systemd services.

Also, I'm not sure what to do with the contrib/msi/build-msi.sh script,
which creates a bat file that generates a config. I don't know anything
about file permissions on windows, however, it seems that the bat file
generates the config into a user's personal directory, so maybe it's
already somewhat fine.
2026-01-18 14:58:00 +00:00
Neil Alexander fd46eab3b9 Linter update & fixes 2026-01-18 14:51:52 +00:00
Neil Alexander 24482b7dbe Run go fix, corrects mostly build tags 2026-01-18 14:47:18 +00:00
Neil Alexander f7c6c9e1c5 Revert tablewriter update as breaking 2026-01-18 12:03:07 +00:00
Sergey AlirzaevandNeil Alexander 33831f606f core: removed unused addPeerTimer code
Resolves #1279
2026-01-18 11:57:27 +00:00
RevertronandGitHub 962adc2994 Update yggdrasil.service.debian (#1290)
Can't start service without reading config.
Without explicit allow directive it can't read it.
2026-01-18 11:50:51 +00:00
Neil Alexander 84b1f4a96b Update dependencies 2026-01-18 11:48:43 +00:00
Neil AlexanderandArceliar 75e4c9287e Adjust how cost is used to behave more intuitively
Co-authored-by: Arceliar <Arceliar@users.noreply.github.com>
2026-01-18 11:42:00 +00:00
Neil Alexander ae405adf7c Update to Arceliar/ironwood@e1358f7905 to reduce heap allocations 2025-11-24 09:29:15 +00:00
Neil Alexander bde65aa239 Fix backpressure issue when TUN is disabled 2025-11-23 22:06:25 +00:00
Neil Alexander b43e213c32 Don't re-attempt connections when detecting a connection to self
Closes #1286.
2025-11-11 23:18:56 +00:00
Neil Alexander b920e17f24 Do not report error in getPeers before it has happened 2025-11-11 23:18:37 +00:00
Neil Alexander a2272a0216 Tweak lint step to checkout first 2025-11-10 19:53:22 +00:00
Neil Alexander aafe751545 Use go.mod-specified Go version for lint step 2025-11-10 19:52:00 +00:00
Neil Alexander 56044b822b Fix build issues from QUIC dependency update 2025-11-10 19:48:01 +00:00
Neil Alexander 1e48a4c4c9 Update to Go 1.24 minimum, update dependencies 2025-11-10 19:44:37 +00:00
Neil Alexander 306c4c624b Add sort= option to getPeers (uptime, cost or default if not specified)
Signed-off-by: Neil Alexander <neilalexander@users.noreply.github.com>
2025-11-09 23:39:22 +00:00
Neil Alexander d0b5352db3 Tweak Docker tags 2025-10-04 10:55:45 +01:00
Dmitriy PervinandGitHub 284894fe40 Add multi-arch Docker build & GHCR publishing (#1278)
# Summary
This PR addresses failures to run Yggdrasil on ARM systems. The root
cause was the lack of ARM artifacts/images, which led to exec format
error and similar issues.

## What’s added:
- ```Dockerfile.multiarch``` — multi-stage Go build that correctly
propagates GOOS/GOARCH for linux/amd64, linux/arm64, linux/armhf and
linux/armel platform.
- ```entrypoint.sh``` - Introduced ENV **ALLOW_IPV6_FORWARDING**. When
set to a truthy value (e.g., true), the entrypoint executes: ```sysctl
-w net.ipv6.conf.all.forwarding=1```.
- GitHub Action for multi-arch builds and publishing to GHCR — triggered
via ```workflow_dispatch```, push to ```master``` and release via tags
(with docker semantic tags e.g. v0.5.12 → 0.5.12, 0.5, 0).

Example published images:

[https://github.com/Forne/yggdrasil-go/pkgs/container/yggdrasil-go](https://github.com/Forne/yggdrasil-go/pkgs/container/yggdrasil-go)

## Testing
 Ubuntu (24.04, amd64) — image runs correctly.
 macOS (Apple Silicon, arm64) — image runs correctly.
 MikroTik RouterOS (arm64) — image runs under the RouterOS container
package.
2025-10-04 10:51:43 +01:00
Neil Alexander 89a3718d59 Add Go 1.25 to CI pipeline 2025-08-16 11:49:37 +01:00
Klemens NanniandGitHub 6d195c6de3 OpenBSD: Pledge full filesystem read for Go's resolv.conf polling (#1275)
sys/kern/kern_pledge.c r1.329[0] removed the unveil bypass for "dns",
so "rpath" is needed for Go's DNS to stat(2) it.

Since current "/ rwc" and "cpath" with the new "rpath" amount to full
read access, there is no point in unveiling anymore.

0:
https://github.com/openbsd/src/commit/8d49ad01ac8af306145a19ff67bb1f10cd3ef57f
2025-08-11 23:39:52 +01:00
Neil Alexander 429403aea5 Update CI workers for packaging pipeline 2025-06-22 23:00:44 +01:00