github.com/yggdrasil-network/yggdrasil-go@v0.5.6/CHANGELOG.md (about)

     1  # Changelog
     2  
     3  All notable changes to this project will be documented in this file.
     4  
     5  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
     6  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
     7  
     8  <!-- Use this as a template
     9  ## [X.Y.Z] - YYYY-MM-DD
    10  ### Added
    11  - for new features.
    12  
    13  ### Changed
    14  - for changes in existing functionality.
    15  
    16  ### Deprecated
    17  - for soon-to-be removed features.
    18  
    19  ### Removed
    20  - for now removed features.
    21  
    22  ### Fixed
    23  - for any bug fixes.
    24  
    25  ### Security
    26  - in case of vulnerabilities.
    27  -->
    28  
    29  ## [0.5.6] - 2024-05-30
    30  
    31  * Go 1.21 is now required to build Yggdrasil
    32  
    33  ### Added
    34  
    35  * The `getPeers` endpoint now reports the RTT/latency of directly connected peers
    36  
    37  ### Changed
    38  
    39  * The tree parent selection algorithm now prefers the lowest latency peers instead of the most stable
    40  * Session key exchange logic has been changed to improve throughput and reduce occasional jitter
    41  
    42  ### Fixed
    43  
    44  * Bloom filter hashing now works correctly on big-endian architectures
    45  * Incorrect buffer pool usage has been fixed, reducing memory allocations
    46  * The multicast beacon interval now backs off correctly, reducing the number of beacons sent
    47  * A denial-of-service vulnerability in the QUIC library has been fixed with a dependency update
    48  
    49  ## [0.5.5] - 2024-01-27
    50  
    51  ### Added
    52  
    53  * A new peer option `?maxbackoff=X` has been added to control the maximum backoff time for a given peer, supports duration values like `5m`, `1h` etc
    54  
    55  ### Changed
    56  
    57  * The maximum backoff period for failing peer connections has been reduced to just over 1 hour, compared to 4.5 hours before
    58  * The `getPeers` endpoint now sorts peers in a more stable fashion
    59  * Upgrade dependencies
    60  
    61  ### Fixed
    62  
    63  * A bug where QUIC listeners could stop listening for incoming connections unexpectedly has been fixed
    64  * The priority tiebreak between multiple peerings to the same node has been fixed
    65  * Peer connection ordering is no longer sensitive to poor system time resolution
    66  * The admin socket now verifies the length of input public keys
    67  * The `PPROFLISTEN` environment variable has been fixed and now starts the pprof listener correctly
    68  * A panic in `getPeers` has been fixed when using abstract UNIX sockets on Linux
    69  
    70  ## [0.5.4] - 2023-11-27
    71  
    72  ### Fixed
    73  
    74  * Fixed a crash that could happen when calculating the size of bloom filters during encoding
    75  
    76  ## [0.5.3] - 2023-11-26
    77  
    78  ### Fixed
    79  
    80  * Fixed a data race from buffered pathfinder traffic
    81  * Fix a bug where the next-hop selection may not take shortcuts through treespace
    82  * Backoffs are now reset correctly when a successful handshake is completed
    83  * Backoffs will no longer exceed roughly 4.5 hours when peers are down for a long time
    84  * The `-normaliseconf` option will now work correctly with `PrivateKeyPath`
    85  * Improved the reliability of QUIC peering setup by disabling 0-RTT
    86  
    87  ## [0.5.2] - 2023-11-06
    88  
    89  ### Added
    90  
    91  * New `-publickey` command line option that prints the derived public key from a configuration file
    92  * Support for connecting to TLS peers via SOCKS with the new `sockstls://` link schema
    93  
    94  ### Changed
    95  
    96  * Stabilise tree parent selection algorithm
    97  * Improved logging when the TUN interface fails to set up
    98  
    99  ### Fixed
   100  
   101  * Fixed a panic that could occur when a connection reaches an inconsistent error state
   102  * The admin socket will now report more peering handshake error conditions in `getPeers`
   103  * Yggdrasil will no longer panic at startup when duplicate peers are configured
   104  * The `build` script will no longer incorrectly import `LDFLAGS` from the environment
   105  
   106  ## [0.5.1] - 2023-10-28
   107  
   108  ### Fixed
   109  
   110  * Fix the Debian package so that upgrades are handled more smoothly
   111  
   112  ## [0.5.0] - 2023-10-28
   113  
   114  ### Added
   115  
   116  * Authenticated peering handshake with optional password, i.e.
   117    * For listeners: `tls://[::]:12345?password=123456abcdef`
   118    * For peers: `tls://a.b.c.d:12345?password=123456abcdef`
   119    * For multicast interfaces with the new `Password` option in each `MulticastInterfaces` section
   120    * Maximum password length is 64 characters
   121  * QUIC support for peerings, by using the new `quic://` scheme in `Listen` and `Peers`
   122    * This has not been extensively tested and may perform worse than TCP or TLS peers
   123  * The private key can now be stored in PEM format separately to the main configuration file with the new `PrivateKeyPath` configuration file option
   124    * Use the `-exportkey` flag to export the key to a file from an existing config
   125  
   126  ### Changed
   127  
   128  * New routing scheme, which is backwards incompatible with previous versions of Yggdrasil
   129    * The wire protocol version number, exchanged as part of the peer setup handshake, has been increased to 0.5
   130    * Nodes running this new version **will not** be able to peer with earlier versions of Yggdrasil
   131    * A DHT is no longer used to map public keys and routes through treespace
   132    * Bloom filters are used to track on-tree links and nodes reachable via that link
   133    * Nodes now gossip separate per-link information which is tracked in CRDT structures, forcing local consistency and preventing unnecessary flapping when a route to the root node has changed or is broken
   134    * Greedy routing is once again used instead of source routing
   135    * Per-link keepalives have been replaced with periodic acknowledgements, reducing idle bandwidth
   136  * The link handshake and multicast beacon formats have been revised for better future extensibility
   137  * The link code has been refactored for more robust tracking of peering states
   138    * As a result, the admin socket is now able to report information about configured peerings that are down
   139    * Reconnect intervals are now tracked separately for each configured peer with exponential backoffs
   140  
   141  ### Removed
   142  
   143  * Yggdrasil will no longer request BBR congestion control for TCP and TLS peerings on Linux
   144  
   145  ## [0.4.7] - 2022-11-20
   146  
   147  ### Added
   148  
   149  * Dropped outbound peerings will now try to reconnect after a single second, rather than waiting up to 60 seconds for the normal peer timer
   150  
   151  ### Changed
   152  
   153  * Session encryption keys are now rotated at most once per minute, which reduces CPU usage and improves throughput on fast low latency links
   154  * Buffers are now reused in the session encryption handler, which improves session throughput and reduces memory allocations
   155  * Buffers are now reused in the router for DHT and path traffic, which improves overall routing throughput and reduces memory allocations
   156  
   157  ### Fixed
   158  
   159  * A bug in the admin socket where requests fail unless `arguments` is specified has been fixed
   160  * Certificates on TLS listeners will no longer expire after a year
   161  * The `-address` and `-subnet` command line options now return a useful warning when no configuration is specified
   162  
   163  ## [0.4.6] - 2022-10-25
   164  
   165  ### Added
   166  
   167  * Support for prioritising multiple peerings to the same node has been added, useful for nodes with multiple network interfaces
   168    * The priority can be configured by specifying `?priority=X` in a `Peers` or `Listen` URI, or by specifying `Priority` within a `MulticastInterfaces` configuration entry
   169    * Priorities are values between 0 and 254 (default is 0), lower numbers are prioritised and nodes will automatically negotiate the higher of the two values
   170  
   171  ### Changed
   172  
   173  * On Linux, `SO_REUSEADDR` is now used on the multicast port instead of `SO_REUSEPORT`, which should allow processes running under different users to run simultaneously
   174  
   175  ### Fixed
   176  
   177  * Adding peers using the `InterfacePeers` configuration option should now work correctly again
   178  * Multiple connections from the same remote IP address will no longer be incorrectly dropped
   179  * The admin socket will no longer incorrectly claim TCP connections as TLS
   180  * A panic that could occur when calling `GetPeers` while a peering link is being set up has been fixed
   181  
   182  ## [0.4.5] - 2022-10-15
   183  
   184  ### Added
   185  
   186  * Support for peering over UNIX sockets is now available, by configuring `Listen` and peering URIs in the `unix:///path/to/socket.sock` format
   187  
   188  ### Changed
   189  
   190  * `yggdrasilctl` has been refactored and now has cleaner output
   191  * It is now possible to `addPeer` and `removePeer` using the admin socket again
   192  * The `getSessions` admin socket call reports number of bytes received and transmitted again
   193  * The link setup code has been refactored, making it easier to support new peering types in the future
   194  * Yggdrasil now maintains configuration internally, rather than relying on a shared and potentially mutable structure
   195  
   196  ### Fixed
   197  
   198  * Tracking information about expired root nodes has been fixed, which should hopefully resolve issues with reparenting and connection failures when the root node disappears
   199  * A bug in the mobile framework code which caused a crash on Android when multicast failed to set up has been fixed
   200  * Yggdrasil should now shut down gracefully and clean up correctly when running as a Windows service
   201  
   202  ## [0.4.4] - 2022-07-07
   203  
   204  ### Fixed
   205  
   206  * ICMPv6 "Packet Too Big" payload size has been increased, which should fix Path MTU Discovery (PMTUD) when two nodes have different `IfMTU` values configured
   207  * A crash has been fixed when handling debug packet responses
   208  * `yggdrasilctl getSelf` should now report coordinates correctly again
   209  
   210  ### Changed
   211  
   212  * Go 1.20 is now required to build Yggdrasil
   213  
   214  ## [0.4.3] - 2022-02-06
   215  
   216  ### Added
   217  
   218  * `bytes_sent`, `bytes_recvd` and `uptime` have been added to `getPeers`
   219  * Clearer logging when connections are rejected due to incompatible peer versions
   220  
   221  ### Fixed
   222  
   223  * Latency-based parent selection tiebreak is now reliable on platforms even with low timer resolution
   224  * Tree distance calculation offsets have been corrected
   225  
   226  ## [0.4.2] - 2021-11-03
   227  
   228  ### Fixed
   229  
   230  * Reverted a dependency update which resulted in problems building with Go 1.16 and running on Windows
   231  
   232  ## [0.4.1] - 2021-11-03
   233  
   234  ### Added
   235  
   236  * TLS peerings now support Server Name Indication (SNI)
   237    * The SNI is sent automatically if the peering URI contains a DNS name
   238    * A custom SNI can be specified by adding the `?sni=domain.com` parameter to the peering URI
   239  * A new `ipv6rwc` API package now implements the IPv6-specific logic separate from the `tun` package
   240  
   241  ### Fixed
   242  
   243  * A crash when calculating the partial public key for very high IPv6 addresses has been fixed
   244  * A crash due to a concurrent map write has been fixed
   245  * A crash due to missing TUN configuration has been fixed
   246  * A race condition in the keystore code has been fixed
   247  
   248  ## [0.4.0] - 2021-07-04
   249  
   250  ### Added
   251  
   252  * New routing scheme, which is backwards incompatible with previous versions of Yggdrasil
   253    * The wire protocol version number, exchanged as part of the peer setup handshake, has been increased to 0.4
   254    * Nodes running this new version **will not** be able to peer with earlier versions of Yggdrasil
   255    * Please note that **the network may be temporarily unstable** while infrastructure is being upgraded to the new release
   256  * TLS connections now use public key pinning
   257    * If no public key was already pinned, then the public key received as part of the TLS handshake is pinned to the connection
   258    * 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
   259  
   260  ### Changed
   261  
   262  * IP addresses are now derived from ed25519 public (signing) keys
   263    * Previously, addresses were derived from a hash of X25519 (Diffie-Hellman) keys
   264    * 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
   265  * It is now recommended to peer over TLS
   266    * Link-local peers from multicast peer discovery will now connect over TLS, with the key from the multicast beacon pinned to the connection
   267    * `socks://` peers now expect the destination endpoint to be a `tls://` listener, instead of a `tcp://` listener
   268  * Multicast peer discovery is now more configurable
   269    * 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)
   270    * Each configuration entry in the list specifies a regular expression to match against interface names
   271    * 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
   272  * The session and routing code has been entirely redesigned and rewritten
   273    * 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
   274    * 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
   275    * 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)
   276    * Source routing has been added. Under normal circumstances, this is what is used to forward session traffic (e.g. the user's IPv6 traffic)
   277    * 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
   278    * 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
   279    * 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)
   280    * The routing logic now lives in a [standalone library](https://github.com/Arceliar/ironwood). 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
   281    * Session MTUs may be slightly lower now, in order to accommodate large packet headers if required
   282  * Many of the admin functions available over `yggdrasilctl` have been changed or removed as part of rewrites to the code
   283    * 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
   284    * The list of available functions will likely be expanded in future releases
   285  * The configuration file format has been updated in response to the changed/removed features
   286  
   287  ### Removed
   288  
   289  * Tunnel routing (a.k.a. crypto-key routing or "CKR") has been removed
   290    * It was far too easy to accidentally break routing altogether by capturing the route to peers with the TUN adapter
   291    * 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)
   292    * All `TunnelRouting` configuration options will no longer take effect
   293  * Session firewall has been removed
   294    * 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
   295    * 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
   296    * Users who want a firewall or other packet filter mechansim should configure something supported by their OS instead (e.g. `ip6tables`)
   297    * All `SessionFirewall` configuration options will no longer take effect
   298  * `SIGHUP` handling to reload the configuration at runtime has been removed
   299    * 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
   300    * Reloading the config without restarting was also a delicate and bug-prone process, and was distracting from more important developments
   301    * `SIGHUP` will be handled normally (i.e. by exiting)
   302  * `cmd/yggrasilsim` has been removed, and is unlikely to return to this repository
   303  
   304  ## [0.3.16] - 2021-03-18
   305  
   306  ### Added
   307  
   308  * New simulation code under `cmd/yggdrasilsim` (work-in-progress)
   309  
   310  ### Changed
   311  
   312  * Multi-threading in the switch
   313    * Swich lookups happen independently for each (incoming) peer connection, instead of being funneled to a single dedicated switch worker
   314    * Packets are queued for each (outgoing) peer connection, instead of being handled by a single dedicated switch worker
   315  * Queue logic rewritten
   316    * Heap structure per peer that traffic is routed to, with one FIFO queue per traffic flow
   317    * The total size of each heap is configured automatically (we basically queue packets until we think we're blocked on a socket write)
   318    * When adding to a full heap, the oldest packet from the largest queue is dropped
   319    * 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
   320  * Removed global `sync.Pool` of `[]byte`
   321    * Local `sync.Pool`s are used in the hot loops, but not exported, to avoid memory corruption if libraries are reused by other projects
   322    * 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
   323  * Upgrade dependencies
   324  * Upgrade build to Go 1.16
   325  
   326  ### Fixed
   327  
   328  * Fixed a bug where the connection listener could exit prematurely due to resoruce exhaustion (if e.g. too many connections were opened)
   329  * Fixed DefaultIfName for OpenBSD (`/dev/tun0` -> `tun0`)
   330  * Fixed an issue where a peer could sometimes never be added to the switch
   331  * Fixed a goroutine leak that could occur if a peer with an open connection continued to spam additional connection attempts
   332  
   333  ## [0.3.15] - 2020-09-27
   334  
   335  ### Added
   336  
   337  * Support for pinning remote public keys in peering strings has been added, e.g.
   338    * By signing public key: `tcp://host:port?ed25519=key`
   339    * By encryption public key: `tcp://host:port?curve25519=key`
   340    * By both: `tcp://host:port?ed25519=key&curve25519=key`
   341    * By multiple, in case of DNS round-robin or similar: `tcp://host:port?curve25519=key&curve25519=key&ed25519=key&ed25519=key`
   342  * Some checks to prevent Yggdrasil-over-Yggdrasil peerings have been added
   343  * Added support for SOCKS proxy authentication, e.g. `socks://user@password:host/...`
   344  
   345  ### Fixed
   346  
   347  * Some bugs in the multicast code that could cause unnecessary CPU usage have been fixed
   348  * A possible multicast deadlock on macOS when enumerating interfaces has been fixed
   349  * A deadlock in the connection code has been fixed
   350  * Updated HJSON dependency that caused some build problems
   351  
   352  ### Changed
   353  
   354  * `DisconnectPeer` and `RemovePeer` have been separated and implemented properly now
   355  * Less nodes are stored in the DHT now, reducing ambient network traffic and possible instability
   356  * Default config file for FreeBSD is now at `/usr/local/etc/yggdrasil.conf` instead of `/etc/yggdrasil.conf`
   357  
   358  ## [0.3.14] - 2020-03-28
   359  
   360  ### Fixed
   361  
   362  * Fixes a memory leak that may occur if packets are incorrectly never removed from a switch queue
   363  
   364  ### Changed
   365  
   366  * Make DHT searches a bit more reliable by tracking the 16 most recently visited nodes
   367  
   368  ## [0.3.13] - 2020-02-21
   369  
   370  ### Added
   371  
   372  * Support for the Wireguard TUN driver, which now replaces Water and provides far better support and performance on Windows
   373  * Windows `.msi` installer files are now supported (bundling the Wireguard TUN driver)
   374  * NodeInfo code is now actorised, should be more reliable
   375  * 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
   376  * The Yggdrasil API now supports dialing a remote node using the public key instead of the Node ID
   377  
   378  ### Changed
   379  
   380  * The `-loglevel` command line parameter is now cumulative and automatically includes all levels below the one specified
   381  * DHT search code has been significantly simplified and processes rumoured nodes in parallel, speeding up search time
   382  * DHT search results are now sorted
   383  * The systemd service now handles configuration generation in a different unit
   384  * The Yggdrasil API now returns public keys instead of node IDs when querying for local and remote addresses
   385  
   386  ### Fixed
   387  
   388  * The multicast code no longer panics when shutting down the node
   389  * A potential OOB error when calculating IPv4 flow labels (when tunnel routing is enabled) has been fixed
   390  * A bug resulting in incorrect idle notifications in the switch should now be fixed
   391  * MTUs are now using a common datatype throughout the codebase
   392  
   393  ### Removed
   394  
   395  * 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!
   396  * NetBSD support has been removed until the Wireguard TUN package supports NetBSD
   397  
   398  ## [0.3.12] - 2019-11-24
   399  
   400  ### Added
   401  
   402  * New API functions `SetMaximumSessionMTU` and `GetMaximumSessionMTU`
   403  * New command line parameters `-address` and `-subnet` for getting the address/subnet from the config file, for use with `-useconffile` or `-useconf`
   404  * A warning is now produced in the Yggdrasil output at startup when the MTU in the config is invalid or has been adjusted for some reason
   405  
   406  ### Changed
   407  
   408  * On Linux, outgoing `InterfacePeers` connections now use `SO_BINDTODEVICE` to prefer an outgoing interface
   409  * The `genkeys` utility is now in `cmd` rather than `misc`
   410  
   411  ### Fixed
   412  
   413  * A data race condition has been fixed when updating session coordinates
   414  * A crash when shutting down when no multicast interfaces are configured has been fixed
   415  * A deadlock when calling `AddPeer` multiple times has been fixed
   416  * A typo in the systemd unit file (for some Linux packages) has been fixed
   417  * The NodeInfo and admin socket now report `unknown` correctly when no build name/version is available in the environment at build time
   418  * The MTU calculation now correctly accounts for ethernet headers when running in TAP mode
   419  
   420  ## [0.3.11] - 2019-10-25
   421  
   422  ### Added
   423  
   424  * Support for TLS listeners and peers has been added, allowing the use of `tls://host:port` in `Peers`, `InterfacePeers` and `Listen` configuration settings - this allows hiding Yggdrasil peerings inside regular TLS connections
   425  
   426  ### Changed
   427  
   428  * Go 1.13 or later is now required for building Yggdrasil
   429  * Some exported API functions have been updated to work with standard Go interfaces:
   430    * `net.Conn` instead of `yggdrasil.Conn`
   431    * `net.Dialer` (the interface it would satisfy if it wasn't a concrete type) instead of `yggdrasil.Dialer`
   432    * `net.Listener` instead of `yggdrasil.Listener`
   433  * Session metadata is now updated correctly when a search completes for a node to which we already have an open session
   434  * Multicast module reloading behaviour has been improved
   435  
   436  ### Fixed
   437  
   438  * An incorrectly held mutex in the crypto-key routing code has been fixed
   439  * Multicast module no longer opens a listener socket if no multicast interfaces are configured
   440  
   441  ## [0.3.10] - 2019-10-10
   442  
   443  ### Added
   444  
   445  * The core library now includes several unit tests for peering and `yggdrasil.Conn` connections
   446  
   447  ### Changed
   448  
   449  * On recent Linux kernels, Yggdrasil will now set the `tcp_congestion_control` algorithm used for its own TCP sockets to [BBR](https://github.com/google/bbr), which reduces latency under load
   450  * The systemd service configuration in `contrib` (and, by extension, some of our packages) now attempts to load the `tun` module, in case TUN/TAP support is available but not loaded, and it restricts Yggdrasil to the `CAP_NET_ADMIN` capability for managing the TUN/TAP adapter, rather than letting it do whatever the (typically `root`) user can do
   451  
   452  ### Fixed
   453  
   454  * The `yggdrasil.Conn.RemoteAddr()` function no longer blocks, fixing a deadlock when CKR is used while under heavy load
   455  
   456  ## [0.3.9] - 2019-09-27
   457  
   458  ### Added
   459  
   460  * Yggdrasil will now complain more verbosely when a peer URI is incorrectly formatted
   461  * Soft-shutdown methods have been added, allowing a node to shut down gracefully when terminated
   462  * New multicast interval logic which sends multicast beacons more often when Yggdrasil is first started to increase the chance of finding nearby nodes quickly after startup
   463  
   464  ### Changed
   465  
   466  * The switch now buffers packets more eagerly in an attempt to give the best link a chance to send, which appears to reduce packet reordering when crossing aggregate sets of peerings
   467  * Substantial amounts of the codebase have been refactored to use the actor model, which should substantially reduce the chance of deadlocks
   468  * Nonce tracking in sessions has been modified so that memory usage is reduced whilst still only allowing duplicate packets within a small window
   469  * Soft-reconfiguration support has been simplified using new actor functions
   470  * The garbage collector threshold has been adjusted for mobile builds
   471  * The maximum queue size is now managed exclusively by the switch rather than by the core
   472  
   473  ### Fixed
   474  
   475  * The broken `hjson-go` dependency which affected builds of the previous version has now been resolved in the module manifest
   476  * Some minor memory leaks in the switch have been fixed, which improves memory usage on mobile builds
   477  * A memory leak in the add-peer loop has been fixed
   478  * The admin socket now reports the correct URI strings for SOCKS peers in `getPeers`
   479  * A race condition when dialing a remote node by both the node address and routed prefix simultaneously has been fixed
   480  * A race condition between the router and the dial code resulting in a panic has been fixed
   481  * A panic which could occur when the TUN/TAP interface disappears (e.g. during soft-shutdown) has been fixed
   482  * A bug in the semantic versioning script which accompanies Yggdrasil for builds has been fixed
   483  * A panic which could occur when the TUN/TAP interface reads an undersized/corrupted packet has been fixed
   484  
   485  ### Removed
   486  
   487  * A number of legacy debug functions have now been removed and a number of exported API functions are now better documented
   488  
   489  ## [0.3.8] - 2019-08-21
   490  
   491  ### Changed
   492  
   493  * Yggdrasil can now send multiple packets from the switch at once, which results in improved throughput with smaller packets or lower MTUs
   494  * Performance has been slightly improved by not allocating cancellations where not necessary
   495  * Crypto-key routing options have been renamed for clarity
   496    * `IPv4Sources` is now named `IPv4LocalSubnets`
   497    * `IPv6Sources` is now named `IPv6LocalSubnets`
   498    * `IPv4Destinations` is now named `IPv4RemoteSubnets`
   499    * `IPv6Destinations` is now named `IPv6RemoteSubnets`
   500    * The old option names will continue to be accepted by the configuration parser for now but may not be indefinitely
   501  * When presented with multiple paths between two nodes, the switch now prefers the most recently used port when possible instead of the least recently used, helping to reduce packet reordering
   502  * New nonce tracking should help to reduce the number of packets dropped as a result of multiple/aggregate paths or congestion control in the switch
   503  
   504  ### Fixed
   505  
   506  * A deadlock was fixed in the session code which could result in Yggdrasil failing to pass traffic after some time
   507  
   508  ### Security
   509  
   510  * Address verification was not strict enough, which could result in a malicious session sending traffic with unexpected or spoofed source or destination addresses which Yggdrasil could fail to reject
   511    * Versions `0.3.6` and `0.3.7` are vulnerable - users of these versions should upgrade as soon as possible
   512    * Versions `0.3.5` and earlier are not affected
   513  
   514  ## [0.3.7] - 2019-08-14
   515  
   516  ### Changed
   517  
   518  * The switch should now forward packets along a single path more consistently in cases where congestion is low and multiple equal-length paths exist, which should improve stability and result in fewer out-of-order packets
   519  * Sessions should now be more tolerant of out-of-order packets, by replacing a bitmask with a variable sized heap+map structure to track recently received nonces, which should reduce the number of packets dropped due to reordering when multiple paths are used or multiple independent flows are transmitted through the same session
   520  * The admin socket can no longer return a dotfile representation of the known parts of the network, this could be rebuilt by clients using information from `getSwitchPeers`,`getDHT` and `getSessions`
   521  
   522  ### Fixed
   523  
   524  * A number of significant performance regressions introduced in version 0.3.6 have been fixed, resulting in better performance
   525  * Flow labels are now used to prioritise traffic flows again correctly
   526  * In low-traffic scenarios where there are multiple peerings between a pair of nodes, Yggdrasil now prefers the most active peering instead of the least active, helping to reduce packet reordering
   527  * The `Listen` statement, when configured as a string rather than an array, will now be parsed correctly
   528  * The admin socket now returns `coords` as a correct array of unsigned 64-bit integers, rather than the internal representation
   529  * The admin socket now returns `box_pub_key` in string format again
   530  * Sessions no longer leak/block when no listener (e.g. TUN/TAP) is configured
   531  * Incoming session connections no longer block when a session already exists, which results in less leaked goroutines
   532  * Flooded sessions will no longer block other sessions
   533  * Searches are now cleaned up properly and a couple of edge-cases with duplicate searches have been fixed
   534  * A number of minor allocation and pointer fixes
   535  
   536  ## [0.3.6] - 2019-08-03
   537  
   538  ### Added
   539  
   540  * Yggdrasil now has a public API with interfaces such as `yggdrasil.ConnDialer`, `yggdrasil.ConnListener` and `yggdrasil.Conn` for using Yggdrasil as a transport directly within applications
   541  * Session gatekeeper functions, part of the API, which can be used to control whether to allow or reject incoming or outgoing sessions dynamically (compared to the previous fixed whitelist/blacklist approach)
   542  * Support for logging to files or syslog (where supported)
   543  * Platform defaults now include the ability to set sane defaults for multicast interfaces
   544  
   545  ### Changed
   546  
   547  * Following a massive refactoring exercise, Yggdrasil's codebase has now been broken out into modules
   548  * Core node functionality in the `yggdrasil` package with a public API
   549    * This allows Yggdrasil to be integrated directly into other applications and used as a transport
   550    * IP-specific code has now been moved out of the core `yggdrasil` package, making Yggdrasil effectively protocol-agnostic
   551  * Multicast peer discovery functionality is now in the `multicast` package
   552  * Admin socket functionality is now in the `admin` package and uses the Yggdrasil public API
   553  * TUN/TAP, ICMPv6 and all IP-specific functionality is now in the `tuntap` package
   554  * `PPROF` debug output is now sent to `stderr` instead of `stdout`
   555  * Node IPv6 addresses on macOS are now configured as `secured`
   556  * Upstream dependency references have been updated, which includes a number of fixes in the Water library
   557  
   558  ### Fixed
   559  
   560  * Multicast discovery is no longer disabled if the nominated interfaces aren't available on the system yet, e.g. during boot
   561  * Multicast interfaces are now re-evaluated more frequently so that Yggdrasil doesn't need to be restarted to use interfaces that have become available since startup
   562  * Admin socket error cases are now handled better
   563  * Various fixes in the TUN/TAP module, particularly surrounding Windows platform support
   564  * Invalid keys will now cause the node to fail to start, rather than starting but silently not working as before
   565  * Session MTUs are now always calculated correctly, in some cases they were incorrectly defaulting to 1280 before
   566  * Multiple searches now don't take place for a single connection
   567  * Concurrency bugs fixed
   568  * Fixed a number of bugs in the ICMPv6 neighbor solicitation in the TUN/TAP code
   569  * A case where peers weren't always added correctly if one or more peers were unreachable has been fixed
   570  * Searches which include the local node are now handled correctly
   571  * Lots of small bug tweaks and clean-ups throughout the codebase
   572  
   573  ## [0.3.5] - 2019-03-13
   574  
   575  ### Fixed
   576  
   577  * The `AllowedEncryptionPublicKeys` option has now been fixed to handle incoming connections properly and no longer blocks outgoing connections (this was broken in v0.3.4)
   578  * Multicast TCP listeners will now be stopped correctly when the link-local address on the interface changes or disappears altogether
   579  
   580  ## [0.3.4] - 2019-03-12
   581  
   582  ### Added
   583  
   584  * Support for multiple listeners (although currently only TCP listeners are supported)
   585  * New multicast behaviour where each multicast interface is given its own link-local listener and does not depend on the `Listen` configuration
   586  * Blocking detection in the switch to avoid parenting a blocked peer
   587  * Support for adding and removing listeners and multicast interfaces when reloading configuration during runtime
   588  * Yggdrasil will now attempt to clean up UNIX admin sockets on startup if left behind by a previous crash
   589  * Admin socket `getTunnelRouting` and `setTunnelRouting` calls for enabling and disabling crypto-key routing during runtime
   590  * On macOS, Yggdrasil will now try to wake up AWDL on start-up when `awdl0` is a configured multicast interface, to keep it awake after system sleep, and to stop waking it when no longer needed
   591  * Added `LinkLocalTCPPort` option for controlling the port number that link-local TCP listeners will listen on by default when setting up `MulticastInterfaces` (a node restart is currently required for changes to `LinkLocalTCPPort` to take effect - it cannot be updated by reloading config during runtime)
   592  
   593  ### Changed
   594  
   595  * The `Listen` configuration statement is now an array instead of a string
   596  * The `Listen` configuration statement should now conform to the same formatting as peers with the protocol prefix, e.g. `tcp://[::]:0`
   597  * Session workers are now non-blocking
   598  * Multicast interval is now fixed at every 15 seconds and network interfaces are reevaluated for eligibility on each interval (where before the interval depended upon the number of configured multicast interfaces and evaluation only took place at startup)
   599  * Dead connections are now closed in the link handler as opposed to the switch
   600  * Peer forwarding is now prioritised instead of randomised
   601  
   602  ### Fixed
   603  
   604  * Admin socket `getTunTap` call now returns properly instead of claiming no interface is enabled in all cases
   605  * Handling of `getRoutes` etc in `yggdrasilctl` is now working
   606  * Local interface names are no longer leaked in multicast packets
   607  * Link-local TCP connections, particularly those initiated because of multicast beacons, are now always correctly scoped for the target interface
   608  * Yggdrasil now correctly responds to multicast interfaces going up and down during runtime
   609  
   610  ## [0.3.3] - 2019-02-18
   611  
   612  ### Added
   613  
   614  * Dynamic reconfiguration, which allows reloading the configuration file to make changes during runtime by sending a `SIGHUP` signal (note: this only works with `-useconffile` and not `-useconf` and currently reconfiguring TUN/TAP is not supported)
   615  * Support for building Yggdrasil as an iOS or Android framework if the appropriate tools (e.g. `gomobile`/`gobind` + SDKs) are available
   616  * Connection contexts used for TCP connections which allow more exotic socket options to be set, e.g.
   617    * Reusing the multicast socket to allow multiple running Yggdrasil instances without having to disable multicast
   618    * Allowing supported Macs to peer with other nearby Macs that aren't even on the same Wi-Fi network using AWDL
   619  * Flexible logging support, which allows for logging at different levels of verbosity
   620  
   621  ### Changed
   622  
   623  * Switch changes to improve parent selection
   624  * Node configuration is now stored centrally, rather than having fragments/copies distributed at startup time
   625  * Significant refactoring in various areas, including for link types (TCP, AWDL etc), generic streams and adapters
   626  * macOS builds through CircleCI are now 64-bit only
   627  
   628  ### Fixed
   629  
   630  * Simplified `systemd` service now in `contrib`
   631  
   632  ### Removed
   633  
   634  * `ReadTimeout` option is now deprecated
   635  
   636  ## [0.3.2] - 2018-12-26
   637  
   638  ### Added
   639  
   640  * The admin socket is now multithreaded, greatly improving performance of the crawler and allowing concurrent lookups to take place
   641  * The ability to hide NodeInfo defaults through either setting the `NodeInfoPrivacy` option or through setting individual `NodeInfo` attributes to `null`
   642  
   643  ### Changed
   644  
   645  * The `armhf` build now targets ARMv6 instead of ARMv7, adding support for Raspberry Pi Zero and other older models, amongst others
   646  
   647  ### Fixed
   648  
   649  * DHT entries are now populated using a copy in memory to fix various potential DHT bugs
   650  * DHT traffic should now throttle back exponentially to reduce idle traffic
   651  * Adjust how nodes are inserted into the DHT which should help to reduce some incorrect DHT traffic
   652  * In TAP mode, the NDP target address is now correctly used when populating the peer MAC table. This fixes serious connectivity problems when in TAP mode, particularly on BSD
   653  * In TUN mode, ICMPv6 packets are now ignored whereas they were incorrectly processed before
   654  
   655  ## [0.3.1] - 2018-12-17
   656  
   657  ### Added
   658  
   659  * Build name and version is now imprinted onto the binaries if available/specified during build
   660  * Ability to disable admin socket with `AdminListen: none`
   661  * `AF_UNIX` domain sockets for the admin socket
   662  * Cache size restriction for crypto-key routes
   663  * `NodeInfo` support for specifying node information, e.g. node name or contact, which can be used in network crawls or surveys
   664  * `getNodeInfo` request added to admin socket
   665  * Adds flags `-c`, `-l` and `-t` to `build` script for specifying `GCFLAGS`, `LDFLAGS` or whether to keep symbol/DWARF tables
   666  
   667  ### Changed
   668  
   669  * Default `AdminListen` in newly generated config is now `unix:///var/run/yggdrasil.sock`
   670  * Formatting of `getRoutes` in the admin socket has been improved
   671  * Debian package now adds `yggdrasil` group to assist with `AF_UNIX` admin socket permissions
   672  * Crypto, address and other utility code refactored into separate Go packages
   673  
   674  ### Fixed
   675  
   676  * Switch peer convergence is now much faster again (previously it was taking up to a minute once the peering was established)
   677  * `yggdrasilctl` is now less prone to crashing when parameters are specified incorrectly
   678  * Panic fixed when `Peers` or `InterfacePeers` was commented out
   679  
   680  ## [0.3.0] - 2018-12-12
   681  
   682  ### Added
   683  
   684  * Crypto-key routing support for tunnelling both IPv4 and IPv6 over Yggdrasil
   685  * Add advanced `SwitchOptions` in configuration file for tuning the switch
   686  * Add `dhtPing` to the admin socket to aid in crawling the network
   687  * New macOS .pkgs built automatically by CircleCI
   688  * Add Dockerfile to repository for Docker support
   689  * Add `-json` command line flag for generating and normalising configuration in plain JSON instead of HJSON
   690  * Build name and version numbers are now imprinted onto the build, accessible through `yggdrasil -version` and `yggdrasilctl getSelf`
   691  * Add ability to disable admin socket by setting `AdminListen` to `"none"`
   692  * `yggdrasilctl` now tries to look for the default configuration file to find `AdminListen` if `-endpoint` is not specified
   693  * `yggdrasilctl` now returns more useful logging in the event of a fatal error
   694  
   695  ### Changed
   696  
   697  * Switched to Chord DHT (instead of Kademlia, although still compatible at the protocol level)
   698  * The `AdminListen` option and `yggdrasilctl` now default to `unix:///var/run/yggdrasil.sock` on BSDs, macOS and Linux
   699  * Cleaned up some of the parameter naming in the admin socket
   700  * Latency-based parent selection for the switch instead of uptime-based (should help to avoid high latency links somewhat)
   701  * Real peering endpoints now shown in the admin socket `getPeers` call to help identify peerings
   702  * Reuse the multicast port on supported platforms so that multiple Yggdrasil processes can run
   703  * `yggdrasilctl` now has more useful help text (with `-help` or when no arguments passed)
   704  
   705  ### Fixed
   706  
   707  * Memory leaks in the DHT fixed
   708  * Crash fixed where the ICMPv6 NDP goroutine would incorrectly start in TUN mode
   709  * Removing peers from the switch table if they stop sending switch messages but keep the TCP connection alive
   710  
   711  ## [0.2.7] - 2018-10-13
   712  
   713  ### Added
   714  
   715  * Session firewall, which makes it possible to control who can open sessions with your node
   716  * Add `getSwitchQueues` to admin socket
   717  * Add `InterfacePeers` for configuring static peerings via specific network interfaces
   718  * More output shown in `getSwitchPeers`
   719  * FreeBSD service script in `contrib`
   720  
   721  ## Changed
   722  
   723  * CircleCI builds are now built with Go 1.11 instead of Go 1.9
   724  
   725  ## Fixed
   726  
   727  * Race condition in the switch table, reported by trn
   728  * Debug builds are now tested by CircleCI as well as platform release builds
   729  * Port number fixed on admin graph from unknown nodes
   730  
   731  ## [0.2.6] - 2018-07-31
   732  
   733  ### Added
   734  
   735  * Configurable TCP timeouts to assist in peering over Tor/I2P
   736  * Prefer IPv6 flow label when extending coordinates to sort backpressure queues
   737  * `arm64` builds through CircleCI
   738  
   739  ### Changed
   740  
   741  * Sort dot graph links by integer value
   742  
   743  ## [0.2.5] - 2018-07-19
   744  
   745  ### Changed
   746  
   747  * Make `yggdrasilctl` less case sensitive
   748  * More verbose TCP disconnect messages
   749  
   750  ### Fixed
   751  
   752  * Fixed debug builds
   753  * Cap maximum MTU on Linux in TAP mode
   754  * Process successfully-read TCP traffic before checking for / handling errors (fixes EOF behavior)
   755  
   756  ## [0.2.4] - 2018-07-08
   757  
   758  ### Added
   759  
   760  * Support for UNIX domain sockets for the admin socket using `unix:///path/to/file.sock`
   761  * Centralised platform-specific defaults
   762  
   763  ### Changed
   764  
   765  * Backpressure tuning, including reducing resource consumption
   766  
   767  ### Fixed
   768  
   769  * macOS local ping bug, which previously prevented you from pinging your own `utun` adapter's IPv6 address
   770  
   771  ## [0.2.3] - 2018-06-29
   772  
   773  ### Added
   774  
   775  * Begin keeping changelog (incomplete and possibly inaccurate information before this point).
   776  * Build RPMs in CircleCI using alien. This provides package support for Fedora, Red Hat Enterprise Linux, CentOS and other RPM-based distributions.
   777  
   778  ### Changed
   779  
   780  * Local backpressure improvements.
   781  * Change `box_pub_key` to `key` in admin API for simplicity.
   782  * Session cleanup.
   783  
   784  ## [0.2.2] - 2018-06-21
   785  
   786  ### Added
   787  
   788  * Add `yggdrasilconf` utility for testing with the `vyatta-yggdrasil` package.
   789  * Add a randomized retry delay after TCP disconnects, to prevent synchronization livelocks.
   790  
   791  ### Changed
   792  
   793  * Update build script to strip by default, which significantly reduces the size of the binary.
   794  * Add debug `-d` and UPX `-u` flags to the `build` script.
   795  * Start pprof in debug builds based on an environment variable (e.g. `PPROFLISTEN=localhost:6060`), instead of a flag.
   796  
   797  ### Fixed
   798  
   799  * Fix typo in big-endian BOM so that both little-endian and big-endian UTF-16 files are detected correctly.
   800  
   801  ## [0.2.1] - 2018-06-15
   802  
   803  ### Changed
   804  
   805  * The address range was moved from `fd00::/8` to `200::/7`. This range was chosen as it is marked as deprecated. The change prevents overlap with other ULA privately assigned ranges.
   806  
   807  ### Fixed
   808  
   809  * UTF-16 detection conversion for configuration files, which can particularly be a problem on Windows 10 if a configuration file is generated from within PowerShell.
   810  * Fixes to the Debian package control file.
   811  * Fixes to the launchd service for macOS.
   812  * Fixes to the DHT and switch.
   813  
   814  ## [0.2.0] - 2018-06-13
   815  
   816  ### Added
   817  
   818  * Exchange version information during connection setup, to prevent connections with incompatible versions.
   819  
   820  ### Changed
   821  
   822  * Wire format changes (backwards incompatible).
   823  * Less maintenance traffic per peer.
   824  * Exponential back-off for DHT maintenance traffic (less maintenance traffic for known good peers).
   825  * Iterative DHT (added sometime between v0.1.0 and here).
   826  * Use local queue sizes for a sort of local-only backpressure routing, instead of the removed bandwidth estimates, when deciding where to send a packet.
   827  
   828  ### Removed
   829  
   830  * UDP peering, this may be added again if/when a better implementation appears.
   831  * Per peer bandwidth estimation, as this has been replaced with an early local backpressure implementation.
   832  
   833  ## [0.1.0] - 2018-02-01
   834  
   835  ### Added
   836  
   837  * Adopt semantic versioning.
   838  
   839  ### Changed
   840  
   841  * Wire format changes (backwards incompatible).
   842  * Many other undocumented changes leading up to this release and before the next one.
   843  
   844  ## [0.0.1] - 2017-12-28
   845  
   846  ### Added
   847  
   848  * First commit.
   849  * Initial public release.