Skip to content

Commit 35e8ff7

Browse files
Merge pull request #799 from yggdrasil-network/develop
Version 0.4.0
2 parents 983dfdb + 2fc34bb commit 35e8ff7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2773
-11893
lines changed

.circleci/config.yml

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.31.0
1717
golangci-lint run
1818
19+
- run:
20+
name: Run Go tests
21+
command: |
22+
go test ./...
23+
1924
build-linux:
2025
docker:
2126
- image: circleci/golang:1.16
@@ -157,43 +162,6 @@ jobs:
157162
paths:
158163
- upload
159164

160-
build-windows:
161-
docker:
162-
- image: circleci/golang:1.16
163-
164-
steps:
165-
- checkout
166-
167-
- run:
168-
name: Create artifact upload directory and set variables
169-
command: |
170-
mkdir /tmp/upload
171-
echo 'export CINAME=$(sh contrib/semver/name.sh)' >> $BASH_ENV
172-
echo 'export CIVERSION=$(sh contrib/semver/version.sh --bare)' >> $BASH_ENV
173-
git config --global user.email "$(git log --format='%ae' HEAD -1)";
174-
git config --global user.name "$(git log --format='%an' HEAD -1)";
175-
176-
- run:
177-
name: Install tools
178-
command: |
179-
sudo apt-get update
180-
sudo apt-get -y install msitools wixl
181-
182-
- run:
183-
name: Build for Windows
184-
command: |
185-
rm -f {yggdrasil,yggdrasilctl}
186-
GOOS=windows GOARCH=amd64 ./build && mv yggdrasil.exe /tmp/upload/$CINAME-$CIVERSION-windows-amd64.exe && mv yggdrasilctl.exe /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-windows-amd64.exe;
187-
GOOS=windows GOARCH=386 ./build && mv yggdrasil.exe /tmp/upload/$CINAME-$CIVERSION-windows-i386.exe && mv yggdrasilctl.exe /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-windows-i386.exe;
188-
bash contrib/msi/build-msi.sh x64
189-
bash contrib/msi/build-msi.sh x86
190-
mv *.msi /tmp/upload
191-
192-
- persist_to_workspace:
193-
root: /tmp
194-
paths:
195-
- upload
196-
197165
build-other:
198166
docker:
199167
- image: circleci/golang:1.16
@@ -224,6 +192,13 @@ jobs:
224192
GOOS=freebsd GOARCH=amd64 ./build && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-freebsd-amd64 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-freebsd-amd64;
225193
GOOS=freebsd GOARCH=386 ./build && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-freebsd-i386 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-freebsd-i386;
226194
195+
- run:
196+
name: Build for Windows
197+
command: |
198+
rm -f {yggdrasil,yggdrasilctl}
199+
GOOS=windows GOARCH=amd64 ./build && mv yggdrasil.exe /tmp/upload/$CINAME-$CIVERSION-windows-amd64.exe && mv yggdrasilctl.exe /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-windows-amd64.exe;
200+
GOOS=windows GOARCH=386 ./build && mv yggdrasil.exe /tmp/upload/$CINAME-$CIVERSION-windows-i386.exe && mv yggdrasilctl.exe /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-windows-i386.exe;
201+
227202
- persist_to_workspace:
228203
root: /tmp
229204
paths:
@@ -247,11 +222,9 @@ workflows:
247222
- lint
248223
- build-linux
249224
- build-macos
250-
- build-windows
251225
- build-other
252226
- upload:
253227
requires:
254228
- build-linux
255229
- build-macos
256-
- build-windows
257230
- build-other

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,58 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2525
- in case of vulnerabilities.
2626
-->
2727

28+
## [0.4.0] - 2021-07-04
29+
### Added
30+
- New routing scheme, which is backwards incompatible with previous versions of Yggdrasil
31+
- The wire protocol version number, exchanged as part of the peer setup handshake, has been increased to 0.4
32+
- Nodes running this new version **will not** be able to peer with earlier versions of Yggdrasil
33+
- Please note that **the network may be temporarily unstable** while infrastructure is being upgraded to the new release
34+
- TLS connections now use public key pinning
35+
- If no public key was already pinned, then the public key received as part of the TLS handshake is pinned to the connection
36+
- 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
37+
38+
### Changed
39+
- IP addresses are now derived from ed25519 public (signing) keys
40+
- Previously, addresses were derived from a hash of X25519 (Diffie-Hellman) keys
41+
- 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
42+
- It is now recommended to peer over TLS
43+
- Link-local peers from multicast peer discovery will now connect over TLS, with the key from the multicast beacon pinned to the connection
44+
- `socks://` peers now expect the destination endpoint to be a `tls://` listener, instead of a `tcp://` listener
45+
- Multicast peer discovery is now more configurable
46+
- 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)
47+
- Each configuration entry in the list specifies a regular expression to match against interface names
48+
- 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
49+
- The session and routing code has been entirely redesigned and rewritten
50+
- 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
51+
- 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
52+
- 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)
53+
- Source routing has been added. Under normal circumstances, this is what is used to forward session traffic (e.g. the user's IPv6 traffic)
54+
- 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
55+
- 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
56+
- 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)
57+
- 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
58+
- Session MTUs may be slightly lower now, in order to accommodate large packet headers if required
59+
- Many of the admin functions available over `yggdrasilctl` have been changed or removed as part of rewrites to the code
60+
- 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
61+
- The list of available functions will likely be expanded in future releases
62+
- The configuration file format has been updated in response to the changed/removed features
63+
64+
### Removed
65+
- Tunnel routing (a.k.a. crypto-key routing or "CKR") has been removed
66+
- It was far too easy to accidentally break routing altogether by capturing the route to peers with the TUN adapter
67+
- 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)
68+
- All `TunnelRouting` configuration options will no longer take effect
69+
- Session firewall has been removed
70+
- 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
71+
- 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
72+
- Users who want a firewall or other packet filter mechansim should configure something supported by their OS instead (e.g. `ip6tables`)
73+
- All `SessionFirewall` configuration options will no longer take effect
74+
- `SIGHUP` handling to reload the configuration at runtime has been removed
75+
- 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
76+
- Reloading the config without restarting was also a delicate and bug-prone process, and was distracting from more important developments
77+
- `SIGHUP` will be handled normally (i.e. by exiting)
78+
- `cmd/yggrasilsim` has been removed, and is unlikely to return to this repository
79+
2880
## [0.3.16] - 2021-03-18
2981
### Added
3082
- New simulation code under `cmd/yggdrasilsim` (work-in-progress)

README.md

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,14 @@ allows pretty much any IPv6-capable application to communicate securely with
1111
other Yggdrasil nodes. Yggdrasil does not require you to have IPv6 Internet
1212
connectivity - it also works over IPv4.
1313

14-
Although Yggdrasil shares many similarities with
15-
[cjdns](https://github.com/cjdelisle/cjdns), it employs a different routing
16-
algorithm based on a globally-agreed spanning tree and greedy routing in a
17-
metric space, and aims to implement some novel local backpressure routing
18-
techniques. In theory, Yggdrasil should scale well on networks with
19-
internet-like topologies.
20-
2114
## Supported Platforms
2215

23-
We actively support the following platforms, and packages are available for
24-
some of the below:
25-
26-
- Linux
27-
- `.deb` and `.rpm` packages are built by CI for Debian and Red Hat-based
28-
distributions
29-
- Arch, Nix, Void packages also available within their respective repositories
30-
- macOS
31-
- `.pkg` packages are built by CI
32-
- Ubiquiti EdgeOS
33-
- `.deb` Vyatta packages are built by CI
34-
- Windows
35-
- FreeBSD
36-
- OpenBSD
37-
- OpenWrt
38-
39-
Please see our [Platforms](https://yggdrasil-network.github.io/platforms.html) pages for more
40-
specific information about each of our supported platforms, including
41-
installation steps and caveats.
42-
43-
You may also find other platform-specific wrappers, scripts or tools in the
44-
`contrib` folder.
16+
Yggdrasil works on a number of platforms, including Linux, macOS, Ubiquiti
17+
EdgeRouter, VyOS, Windows, FreeBSD, OpenBSD and OpenWrt.
18+
19+
Please see our [Installation](https://yggdrasil-network.github.io/installation.html)
20+
page for more information. You may also find other platform-specific wrappers, scripts
21+
or tools in the `contrib` folder.
4522

4623
## Building
4724

@@ -97,21 +74,18 @@ by giving the Yggdrasil binary the `CAP_NET_ADMIN` capability.
9774

9875
## Documentation
9976

100-
Documentation is available on our [GitHub
101-
Pages](https://yggdrasil-network.github.io) site, or in the base submodule
102-
repository within `doc/yggdrasil-network.github.io`.
77+
Documentation is available [on our website](https://yggdrasil-network.github.io).
10378

104-
- [Configuration file options](https://yggdrasil-network.github.io/configuration.html)
105-
- [Platform-specific documentation](https://yggdrasil-network.github.io/platforms.html)
79+
- [Installing Yggdrasil](https://yggdrasil-network.github.io/installation.html)
80+
- [Configuring Yggdrasil](https://yggdrasil-network.github.io/configuration.html)
10681
- [Frequently asked questions](https://yggdrasil-network.github.io/faq.html)
107-
- [Admin API documentation](https://yggdrasil-network.github.io/admin.html)
10882
- [Version changelog](CHANGELOG.md)
10983

11084
## Community
11185

11286
Feel free to join us on our [Matrix
11387
channel](https://matrix.to/#/#yggdrasil:matrix.org) at `#yggdrasil:matrix.org`
114-
or in the `#yggdrasil` IRC channel on Freenode.
88+
or in the `#yggdrasil` IRC channel on [libera.chat](https://libera.chat).
11589

11690
## License
11791

appveyor.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: '{build}'
2+
pull_requests:
3+
do_not_increment_build_number: true
4+
os: Visual Studio 2019
5+
shallow_clone: false
6+
7+
environment:
8+
MSYS2_PATH_TYPE: inherit
9+
CHERE_INVOKING: enabled_from_arguments
10+
11+
build_script:
12+
- cmd: >-
13+
cd %APPVEYOR_BUILD_FOLDER%
14+
- c:\msys64\usr\bin\bash -lc "./contrib/msi/build-msi.sh x64"
15+
- c:\msys64\usr\bin\bash -lc "./contrib/msi/build-msi.sh x86"
16+
17+
test: off
18+
19+
artifacts:
20+
- path: '*.msi'

build

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@ fi
3232

3333
if [ $IOS ]; then
3434
echo "Building framework for iOS"
35-
gomobile bind -target ios -tags mobile -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
36-
github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil \
37-
github.com/yggdrasil-network/yggdrasil-go/src/config \
35+
go get golang.org/x/mobile/bind
36+
gomobile bind -target ios -tags mobile -o Yggdrasil.framework -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
3837
github.com/yggdrasil-network/yggdrasil-extras/src/mobile \
39-
github.com/yggdrasil-network/yggdrasil-extras/src/dummy
38+
github.com/yggdrasil-network/yggdrasil-go/src/config
4039
elif [ $ANDROID ]; then
4140
echo "Building aar for Android"
42-
gomobile bind -target android -tags mobile -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
43-
github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil \
44-
github.com/yggdrasil-network/yggdrasil-go/src/config \
41+
go get golang.org/x/mobile/bind
42+
gomobile bind -target android -tags mobile -o yggdrasil.aar -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
4543
github.com/yggdrasil-network/yggdrasil-extras/src/mobile \
46-
github.com/yggdrasil-network/yggdrasil-extras/src/dummy
44+
github.com/yggdrasil-network/yggdrasil-go/src/config
4745
else
4846
for CMD in yggdrasil yggdrasilctl ; do
4947
echo "Building: $CMD"

0 commit comments

Comments
 (0)