Releases: yggdrasil-network/yggdrasil-go
Version 0.4.1
Added
- TLS peerings now support Server Name Indication (SNI)
- The SNI is sent automatically if the peering URI contains a DNS name
- A custom SNI can be specified by adding the
?sni=domain.com
parameter to the peering URI
- A new
ipv6rwc
API package now implements the IPv6-specific logic separate from thetun
package
Fixed
- A crash when calculating the partial public key for very high IPv6 addresses has been fixed
- A crash due to a concurrent map write has been fixed
- A crash due to missing TUN configuration has been fixed
- A race condition in the keystore code has been fixed
Version 0.4.0
Added
- New routing scheme, which is backwards incompatible with previous versions of Yggdrasil
- The wire protocol version number, exchanged as part of the peer setup handshake, has been increased to 0.4
- Nodes running this new version will not be able to peer with earlier versions of Yggdrasil
- Please note that the network may be temporarily unstable while infrastructure is being upgraded to the new release
- TLS connections now use public key pinning
- If no public key was already pinned, then the public key received as part of the TLS handshake is pinned to the connection
- The public key received as part of the handshake is checked against the pinned keys, and if no match is found, the connection is rejected
Changed
- IP addresses are now derived from ed25519 public (signing) keys
- Previously, addresses were derived from a hash of X25519 (Diffie-Hellman) keys
- Importantly, this means that all internal IPv6 addresses will change with this release — this will affect anyone running public services or relying on Yggdrasil for remote access
- It is now recommended to peer over TLS
- Link-local peers from multicast peer discovery will now connect over TLS, with the key from the multicast beacon pinned to the connection
socks://
peers now expect the destination endpoint to be atls://
listener, instead of atcp://
listener
- Multicast peer discovery is now more configurable
- There are separate configuration options to control if beacons are sent, what port to listen on for incoming connections (if sending beacons), and whether or not to listen for beacons from other nodes (and open connections when receiving a beacon)
- Each configuration entry in the list specifies a regular expression to match against interface names
- If an interface matches multiple regex in the list, it will use the settings for the first entry in the list that it matches with
- The session and routing code has been entirely redesigned and rewritten
- This is still an early work-in-progress, so the code hasn't been as well tested or optimized as the old code base — please bear with us for these next few releases as we work through any bugs or issues
- Generally speaking, we expect to see reduced bandwidth use and improved reliability with the new design, especially in cases where nodes move around or change peerings frequently
- Cryptographic sessions no longer use a single shared (ephemeral) secret for the entire life of the session. Keys are now rotated regularly for ongoing sessions (currently rotated at least once per round trip exchange of traffic, subject to change in future releases)
- Source routing has been added. Under normal circumstances, this is what is used to forward session traffic (e.g. the user's IPv6 traffic)
- DHT-based routing has been added. This is used when the sender does not know a source route to the destination. Forwarding through the DHT is less efficient, but the only information that it requires the sender to know is the destination node's (static) key. This is primarily used during the key exchange at session setup, or as a temporary fallback when a source route fails due to changes in the network
- The new DHT design is no longer RPC-based, does not support crawling and does not inherently allow nodes to look up the owner of an arbitrary key. Responding to lookups is now implemented at the application level and a response is only sent if the destination key matches the node's
/128
IP or/64
prefix - The greedy routing scheme, used to forward all traffic in previous releases, is now only used for protocol traffic (i.e. DHT setup and source route discovery)
- The routing logic now lives in a standalone library. You are encouraged not to use it, as it's still considered pre-alpha, but it's available for those who want to experiment with the new routing algorithm in other contexts
- Session MTUs may be slightly lower now, in order to accommodate large packet headers if required
- Many of the admin functions available over
yggdrasilctl
have been changed or removed as part of rewrites to the code- Several remote
debug
functions have been added temporarily, to allow for crawling and census gathering during the transition to the new version, but we intend to remove this at some point in the (possibly distant) future - The list of available functions will likely be expanded in future releases
- Several remote
- The configuration file format has been updated in response to the changed/removed features
Removed
- Tunnel routing (a.k.a. crypto-key routing or "CKR") has been removed
- It was far too easy to accidentally break routing altogether by capturing the route to peers with the TUN adapter
- We recommend tunnelling an existing standard over Yggdrasil instead (e.g.
ip6gre
,ip6gretap
or other similar encapsulations, using Yggdrasil IPv6 addresses as the tunnel endpoints) - All
TunnelRouting
configuration options will no longer take effect
- Session firewall has been removed
- This was never a true firewall — it didn't behave like a stateful IP firewall, often allowed return traffic unexpectedly and was simply a way to prevent a node from being flooded with unwanted sessions, so the name could be misleading and usually lead to a false sense of security
- Due to design changes, the new code needs to address the possible memory exhaustion attacks in other ways and a single configurable list no longer makes sense
- Users who want a firewall or other packet filter mechansim should configure something supported by their OS instead (e.g.
ip6tables
) - All
SessionFirewall
configuration options will no longer take effect
SIGHUP
handling to reload the configuration at runtime has been removed- It was not obvious which parts of the configuration could be reloaded at runtime, and which required the application to be killed and restarted to take effect
- Reloading the config without restarting was also a delicate and bug-prone process, and was distracting from more important developments
SIGHUP
will be handled normally (i.e. by exiting)
cmd/yggrasilsim
has been removed, and is unlikely to return to this repository
Version 0.4.0rc4
This is the fourth, and hopefully final, release candidate build for Yggdrasil v0.4.
THIS BUILD CONTAINS A PROTOCOL BREAK AND IS NOT COMPATIBLE WITH PEERS RUNNING EARLIER RC OR NON-RC VERSIONS. MAKE SURE TO BACK UP YOUR CONFIGURATION FILE BEFORE INSTALLING!
Please note that your IPv6 address/subnet will change. Also note that tunnel routing and the session firewall are no longer supported.
Changes from RC3:
- Protocol version increased — will not connect to nodes running RC3 or lower anymore, but should connect to nodes running the eventual final v0.4 release version
- Multicast packet format changed
MulticastInterfaces
configuration option has a new format — sending and receiving multicast beacons are now configurable separately- SOCKS connections now connect to TLS listeners
- Protocol bugfixes
Version 0.4.0rc3
This is the third release candidate build for Yggdrasil v0.4.
THIS BUILD CONTAINS A PROTOCOL BREAK AND IS NOT COMPATIBLE WITH PEERS RUNNING EARLIER NON-RC VERSIONS. MAKE SURE TO BACK UP YOUR CONFIGURATION FILE BEFORE INSTALLING!
Please note that your IPv6 address/subnet will change. Also note that tunnel routing and the session firewall are no longer supported.
Changes from RC2:
- Memory leak fixed
- Multicast peerings are now TLS by default
- TLS sessions now pin keys to the certificate if no other key is specified
Version 0.4.0rc2
This is the second release candidate build for Yggdrasil v0.4.
THIS BUILD CONTAINS A PROTOCOL BREAK AND IS NOT COMPATIBLE WITH PEERS RUNNING EARLIER NON-RC VERSIONS. MAKE SURE TO BACK UP YOUR CONFIGURATION FILE BEFORE INSTALLING!
Please note that your IPv6 address/subnet will change. Also note that tunnel routing and the session firewall are no longer supported.
Changes from RC1:
- Peer public keys are now pinned with
?key=
instead of?ed25519=
- Peer connections are dialled using a cancellable context
- Dependencies updated
Version 0.4.0rc1
This is the first release candidate build for Yggdrasil v0.4.
THIS BUILD CONTAINS A PROTOCOL BREAK AND IS NOT COMPATIBLE WITH PEERS RUNNING EARLIER NON-RC VERSIONS. MAKE SURE TO BACK UP YOUR CONFIGURATION FILE BEFORE INSTALLING!
Please note that your IPv6 address/subnet will change. Also note that tunnel routing and the session firewall are no longer supported.
Version 0.3.16
Added
- New simulation code under
cmd/yggdrasilsim
(work-in-progress)
Changed
- Multi-threading in the switch
- Swich lookups happen independently for each (incoming) peer connection, instead of being funneled to a single dedicated switch worker
- Packets are queued for each (outgoing) peer connection, instead of being handled by a single dedicated switch worker
- Queue logic rewritten
- Heap structure per peer that traffic is routed to, with one FIFO queue per traffic flow
- The total size of each heap is configured automatically (we basically queue packets until we think we're blocked on a socket write)
- When adding to a full heap, the oldest packet from the largest queue is dropped
- Packets are popped from the queue in FIFO order (oldest packet from among all queues in the heap) to prevent packet reordering at the session level
- Removed global
sync.Pool
of[]byte
- Local
sync.Pool
s are used in the hot loops, but not exported, to avoid memory corruption if libraries are reused by other projects - This may increase allocations (and slightly reduce speed in CPU-bound benchmarks) when interacting with the tun/tap device, but traffic forwarded at the switch layer should be unaffected
- Local
- Upgrade dependencies
- Upgrade build to Go 1.16
Fixed
- Fixed a bug where the connection listener could exit prematurely due to resoruce exhaustion (if e.g. too many connections were opened)
- Fixed DefaultIfName for OpenBSD (
/dev/tun0
->tun0
) - Fixed an issue where a peer could sometimes never be added to the switch
- Fixed a goroutine leak that could occur if a peer with an open connection continued to spam additional connection attempts
Version 0.3.15
Added
- Support for pinning remote public keys in peering strings has been added, e.g.
- By signing public key:
tcp://host:port?ed25519=key
- By encryption public key:
tcp://host:port?curve25519=key
- By both:
tcp://host:port?ed25519=key&curve25519=key
- By multiple, in case of DNS round-robin or similar:
tcp://host:port?curve25519=key&curve25519=key&ed25519=key&ed25519=key
- By signing public key:
- Some checks to prevent Yggdrasil-over-Yggdrasil peerings have been added
- Added support for SOCKS proxy authentication, e.g.
socks://user@password:host/...
Fixed
- Some bugs in the multicast code that could cause unnecessary CPU usage have been fixed
- A possible multicast deadlock on macOS when enumerating interfaces has been fixed
- A deadlock in the connection code has been fixed
- Updated HJSON dependency that caused some build problems
Changed
DisconnectPeer
andRemovePeer
have been separated and implemented properly now- Less nodes are stored in the DHT now, reducing ambient network traffic and possible instability
- Default config file for FreeBSD is now at
/usr/local/etc/yggdrasil.conf
instead of/etc/yggdrasil.conf
Version 0.3.14
Fixed
- Fixes a memory leak that may occur if packets are incorrectly never removed from a switch queue
Changed
- Make DHT searches a bit more reliable by tracking the 16 most recently visited nodes
Version 0.3.13
Added
- Support for the Wireguard TUN driver, which now replaces Water and provides far better support and performance on Windows
- Windows
.msi
installer files are now supported (bundling the Wireguard TUN driver) - NodeInfo code is now actorised, should be more reliable
- The DHT now tries to store the two closest nodes in either direction instead of one, such that if a node goes offline, the replacement is already known
- The Yggdrasil API now supports dialing a remote node using the public key instead of the Node ID
Changed
- The
-loglevel
command line parameter is now cumulative and automatically includes all levels below the one specified - DHT search code has been significantly simplified and processes rumoured nodes in parallel, speeding up search time
- DHT search results are now sorted
- The systemd service now handles configuration generation in a different unit
- The Yggdrasil API now returns public keys instead of node IDs when querying for local and remote addresses
Fixed
- The multicast code no longer panics when shutting down the node
- A potential OOB error when calculating IPv4 flow labels (when tunnel routing is enabled) has been fixed
- A bug resulting in incorrect idle notifications in the switch should now be fixed
- MTUs are now using a common datatype throughout the codebase
Removed
- TAP mode has been removed entirely, since it is no longer supported with the Wireguard TUN package. Please note that if you are using TAP mode, you may need to revise your config!
- NetBSD support has been removed until the Wireguard TUN package supports NetBSD