changed names

This commit is contained in:
vadym 2021-09-09 10:30:55 +03:00
parent f4a4274967
commit 052fdd3edf
37 changed files with 240 additions and 240 deletions

View file

@ -37,9 +37,9 @@ jobs:
echo 'export CIVERSIONRPM=$(sh contrib/semver/version.sh --bare | tr "-" ".")' >> $BASH_ENV echo 'export CIVERSIONRPM=$(sh contrib/semver/version.sh --bare | tr "-" ".")' >> $BASH_ENV
echo 'export CIBRANCH=$(echo $CIRCLE_BRANCH | tr -d "/")' >> $BASH_ENV echo 'export CIBRANCH=$(echo $CIRCLE_BRANCH | tr -d "/")' >> $BASH_ENV
case "$CINAME" in \ case "$CINAME" in \
"yggdrasil") (echo 'export CICONFLICTS=yggdrasil-develop' >> $BASH_ENV) ;; \ "mesh") (echo 'export CICONFLICTS=mesh-develop' >> $BASH_ENV) ;; \
"yggdrasil-develop") (echo 'export CICONFLICTS=yggdrasil' >> $BASH_ENV) ;; \ "mesh-develop") (echo 'export CICONFLICTS=mesh' >> $BASH_ENV) ;; \
*) (echo 'export CICONFLICTS="yggdrasil yggdrasil-develop"' >> $BASH_ENV) ;; \ *) (echo 'export CICONFLICTS="mesh mesh-develop"' >> $BASH_ENV) ;; \
esac esac
git config --global user.email "$(git log --format='%ae' HEAD -1)"; git config --global user.email "$(git log --format='%ae' HEAD -1)";
git config --global user.name "$(git log --format='%an' HEAD -1)"; git config --global user.name "$(git log --format='%an' HEAD -1)";
@ -55,43 +55,43 @@ jobs:
name: Test debug builds name: Test debug builds
command: | command: |
./build -d ./build -d
test -f yggdrasil && test -f yggdrasilctl test -f mesh && test -f meshctl
- run: - run:
name: Build for Linux (including Debian packages) name: Build for Linux (including Debian packages)
command: | command: |
rm -f {yggdrasil,yggdrasilctl} rm -f {mesh,meshctl}
PKGARCH=amd64 sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-amd64 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-amd64; PKGARCH=amd64 sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-amd64 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-amd64;
PKGARCH=i386 sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-i386 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-i386; PKGARCH=i386 sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-i386 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-i386;
PKGARCH=mipsel sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-mipsel && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-mipsel; PKGARCH=mipsel sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-mipsel && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-mipsel;
PKGARCH=mips sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-mips && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-mips; PKGARCH=mips sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-mips && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-mips;
PKGARCH=armhf sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-armhf && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-armhf; PKGARCH=armhf sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-armhf && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-armhf;
PKGARCH=armel sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-armel && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-armel; PKGARCH=armel sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-armel && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-armel;
PKGARCH=arm64 sh contrib/deb/generate.sh && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-linux-arm64 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-linux-arm64; PKGARCH=arm64 sh contrib/deb/generate.sh && mv mesh /tmp/upload/$CINAME-$CIVERSION-linux-arm64 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-linux-arm64;
mv *.deb /tmp/upload/ mv *.deb /tmp/upload/
- run: - run:
name: Build for Linux (RPM packages) name: Build for Linux (RPM packages)
command: | command: |
git clone https://github.com/RiV-chain/yggdrasil-package-rpm ~/rpmbuild/SPECS git clone https://github.com/RiV-chain/mesh-package-rpm ~/rpmbuild/SPECS
cd ../ && tar -czvf ~/rpmbuild/SOURCES/v$CIVERSIONRPM --transform "s/project/RiV-mesh-$CIBRANCH-$CIVERSIONRPM/" project cd ../ && tar -czvf ~/rpmbuild/SOURCES/v$CIVERSIONRPM --transform "s/project/RiV-mesh-$CIBRANCH-$CIVERSIONRPM/" project
sed -i "s/RiV-mesh/RiV-mesh-$CIBRANCH/" ~/rpmbuild/SPECS/yggdrasil.spec sed -i "s/RiV-mesh/RiV-mesh-$CIBRANCH/" ~/rpmbuild/SPECS/mesh.spec
sed -i "s/^PKGNAME=yggdrasil/PKGNAME=yggdrasil-$CIBRANCH/" ~/rpmbuild/SPECS/yggdrasil.spec sed -i "s/^PKGNAME=mesh/PKGNAME=mesh-$CIBRANCH/" ~/rpmbuild/SPECS/mesh.spec
sed -i "s/^Name\:.*/Name\: $CINAME/" ~/rpmbuild/SPECS/yggdrasil.spec sed -i "s/^Name\:.*/Name\: $CINAME/" ~/rpmbuild/SPECS/mesh.spec
sed -i "s/^Version\:.*/Version\: $CIVERSIONRPM/" ~/rpmbuild/SPECS/yggdrasil.spec sed -i "s/^Version\:.*/Version\: $CIVERSIONRPM/" ~/rpmbuild/SPECS/mesh.spec
sed -i "s/^Conflicts\:.*/Conflicts\: $CICONFLICTS/" ~/rpmbuild/SPECS/yggdrasil.spec sed -i "s/^Conflicts\:.*/Conflicts\: $CICONFLICTS/" ~/rpmbuild/SPECS/mesh.spec
cat ~/rpmbuild/SPECS/yggdrasil.spec cat ~/rpmbuild/SPECS/mesh.spec
GOARCH=amd64 rpmbuild -v --nodeps --target=x86_64 -ba ~/rpmbuild/SPECS/yggdrasil.spec GOARCH=amd64 rpmbuild -v --nodeps --target=x86_64 -ba ~/rpmbuild/SPECS/mesh.spec
#GOARCH=386 rpmbuild -v --nodeps --target=i386 -bb ~/rpmbuild/SPECS/yggdrasil.spec #GOARCH=386 rpmbuild -v --nodeps --target=i386 -bb ~/rpmbuild/SPECS/mesh.spec
find ~/rpmbuild/RPMS/ -name '*.rpm' -exec mv {} /tmp/upload \; find ~/rpmbuild/RPMS/ -name '*.rpm' -exec mv {} /tmp/upload \;
find ~/rpmbuild/SRPMS/ -name '*.rpm' -exec mv {} /tmp/upload \; find ~/rpmbuild/SRPMS/ -name '*.rpm' -exec mv {} /tmp/upload \;
- run: - run:
name: Build for EdgeRouter and VyOS name: Build for EdgeRouter and VyOS
command: | command: |
rm -f {yggdrasil,yggdrasilctl} rm -f {mesh,meshctl}
git clone https://github.com/neilalexander/vyatta-yggdrasil /tmp/vyatta-yggdrasil; git clone https://github.com/neilalexander/vyatta-mesh /tmp/vyatta-mesh;
cd /tmp/vyatta-yggdrasil; cd /tmp/vyatta-mesh;
BUILDDIR_YGG=$CIRCLE_WORKING_DIRECTORY ./build-edgerouter-x $CIRCLE_BRANCH; BUILDDIR_YGG=$CIRCLE_WORKING_DIRECTORY ./build-edgerouter-x $CIRCLE_BRANCH;
BUILDDIR_YGG=$CIRCLE_WORKING_DIRECTORY ./build-edgerouter-lite $CIRCLE_BRANCH; BUILDDIR_YGG=$CIRCLE_WORKING_DIRECTORY ./build-edgerouter-lite $CIRCLE_BRANCH;
BUILDDIR_YGG=$CIRCLE_WORKING_DIRECTORY ./build-vyos-i386 $CIRCLE_BRANCH BUILDDIR_YGG=$CIRCLE_WORKING_DIRECTORY ./build-vyos-i386 $CIRCLE_BRANCH
@ -140,8 +140,8 @@ jobs:
name: Build for macOS name: Build for macOS
command: | command: |
GO111MODULE=on GOOS=darwin GOARCH=amd64 ./build GO111MODULE=on GOOS=darwin GOARCH=amd64 ./build
cp yggdrasil /tmp/upload/$CINAME-$CIVERSION-darwin-amd64 cp mesh /tmp/upload/$CINAME-$CIVERSION-darwin-amd64
cp yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-darwin-amd64; cp meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-darwin-amd64;
- run: - run:
name: Build for macOS (.pkg format) name: Build for macOS (.pkg format)
@ -181,23 +181,23 @@ jobs:
- run: - run:
name: Build for OpenBSD name: Build for OpenBSD
command: | command: |
rm -f {yggdrasil,yggdrasilctl} rm -f {mesh,meshctl}
GOOS=openbsd GOARCH=amd64 ./build && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-openbsd-amd64 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-openbsd-amd64; GOOS=openbsd GOARCH=amd64 ./build && mv mesh /tmp/upload/$CINAME-$CIVERSION-openbsd-amd64 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-openbsd-amd64;
GOOS=openbsd GOARCH=386 ./build && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-openbsd-i386 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-openbsd-i386; GOOS=openbsd GOARCH=386 ./build && mv mesh /tmp/upload/$CINAME-$CIVERSION-openbsd-i386 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-openbsd-i386;
- run: - run:
name: Build for FreeBSD name: Build for FreeBSD
command: | command: |
rm -f {yggdrasil,yggdrasilctl} rm -f {mesh,meshctl}
GOOS=freebsd GOARCH=amd64 ./build && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-freebsd-amd64 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-freebsd-amd64; GOOS=freebsd GOARCH=amd64 ./build && mv mesh /tmp/upload/$CINAME-$CIVERSION-freebsd-amd64 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-freebsd-amd64;
GOOS=freebsd GOARCH=386 ./build && mv yggdrasil /tmp/upload/$CINAME-$CIVERSION-freebsd-i386 && mv yggdrasilctl /tmp/upload/$CINAME-$CIVERSION-yggdrasilctl-freebsd-i386; GOOS=freebsd GOARCH=386 ./build && mv mesh /tmp/upload/$CINAME-$CIVERSION-freebsd-i386 && mv meshctl /tmp/upload/$CINAME-$CIVERSION-meshctl-freebsd-i386;
- run: - run:
name: Build for Windows name: Build for Windows
command: | command: |
rm -f {yggdrasil,yggdrasilctl} rm -f {mesh,meshctl}
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; GOOS=windows GOARCH=amd64 ./build && mv mesh.exe /tmp/upload/$CINAME-$CIVERSION-windows-amd64.exe && mv meshctl.exe /tmp/upload/$CINAME-$CIVERSION-meshctl-windows-amd64.exe;
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; GOOS=windows GOARCH=386 ./build && mv mesh.exe /tmp/upload/$CINAME-$CIVERSION-windows-i386.exe && mv meshctl.exe /tmp/upload/$CINAME-$CIVERSION-meshctl-windows-i386.exe;
- persist_to_workspace: - persist_to_workspace:
root: /tmp root: /tmp

View file

@ -56,7 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- 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 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](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 - 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
- Session MTUs may be slightly lower now, in order to accommodate large packet headers if required - 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 - Many of the admin functions available over `meshctl` 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 - 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 - The list of available functions will likely be expanded in future releases
- The configuration file format has been updated in response to the changed/removed features - The configuration file format has been updated in response to the changed/removed features
@ -79,7 +79,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.3.16] - 2021-03-18 ## [0.3.16] - 2021-03-18
### Added ### Added
- New simulation code under `cmd/yggdrasilsim` (work-in-progress) - New simulation code under `cmd/meshsim` (work-in-progress)
### Changed ### Changed
- Multi-threading in the switch - Multi-threading in the switch
@ -121,7 +121,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed ### Changed
- `DisconnectPeer` and `RemovePeer` have been separated and implemented properly now - `DisconnectPeer` and `RemovePeer` have been separated and implemented properly now
- Less nodes are stored in the DHT now, reducing ambient network traffic and possible instability - 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` - Default config file for FreeBSD is now at `/usr/local/etc/mesh.conf` instead of `/etc/mesh.conf`
## [0.3.14] - 2020-03-28 ## [0.3.14] - 2020-03-28
### Fixed ### Fixed
@ -180,9 +180,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed ### Changed
- Go 1.13 or later is now required for building Mesh - Go 1.13 or later is now required for building Mesh
- Some exported API functions have been updated to work with standard Go interfaces: - Some exported API functions have been updated to work with standard Go interfaces:
- `net.Conn` instead of `yggdrasil.Conn` - `net.Conn` instead of `mesh.Conn`
- `net.Dialer` (the interface it would satisfy if it wasn't a concrete type) instead of `yggdrasil.Dialer` - `net.Dialer` (the interface it would satisfy if it wasn't a concrete type) instead of `mesh.Dialer`
- `net.Listener` instead of `yggdrasil.Listener` - `net.Listener` instead of `mesh.Listener`
- Session metadata is now updated correctly when a search completes for a node to which we already have an open session - Session metadata is now updated correctly when a search completes for a node to which we already have an open session
- Multicast module reloading behaviour has been improved - Multicast module reloading behaviour has been improved
@ -192,14 +192,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.3.10] - 2019-10-10 ## [0.3.10] - 2019-10-10
### Added ### Added
- The core library now includes several unit tests for peering and `yggdrasil.Conn` connections - The core library now includes several unit tests for peering and `mesh.Conn` connections
### Changed ### Changed
- On recent Linux kernels, Mesh 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 - On recent Linux kernels, Mesh 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
- 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 Mesh to the `CAP_NET_ADMIN` capability for managing the TUN/TAP adapter, rather than letting it do whatever the (typically `root`) user can do - 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 Mesh to the `CAP_NET_ADMIN` capability for managing the TUN/TAP adapter, rather than letting it do whatever the (typically `root`) user can do
### Fixed ### Fixed
- The `yggdrasil.Conn.RemoteAddr()` function no longer blocks, fixing a deadlock when CKR is used while under heavy load - The `mesh.Conn.RemoteAddr()` function no longer blocks, fixing a deadlock when CKR is used while under heavy load
## [0.3.9] - 2019-09-27 ## [0.3.9] - 2019-09-27
### Added ### Added
@ -271,16 +271,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.3.6] - 2019-08-03 ## [0.3.6] - 2019-08-03
### Added ### Added
- Mesh now has a public API with interfaces such as `yggdrasil.ConnDialer`, `yggdrasil.ConnListener` and `yggdrasil.Conn` for using Mesh as a transport directly within applications - Mesh now has a public API with interfaces such as `mesh.ConnDialer`, `mesh.ConnListener` and `mesh.Conn` for using Mesh as a transport directly within applications
- 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) - 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)
- Support for logging to files or syslog (where supported) - Support for logging to files or syslog (where supported)
- Platform defaults now include the ability to set sane defaults for multicast interfaces - Platform defaults now include the ability to set sane defaults for multicast interfaces
### Changed ### Changed
- Following a massive refactoring exercise, Mesh's codebase has now been broken out into modules - Following a massive refactoring exercise, Mesh's codebase has now been broken out into modules
- Core node functionality in the `yggdrasil` package with a public API - Core node functionality in the `mesh` package with a public API
- This allows Mesh to be integrated directly into other applications and used as a transport - This allows Mesh to be integrated directly into other applications and used as a transport
- IP-specific code has now been moved out of the core `yggdrasil` package, making Mesh effectively protocol-agnostic - IP-specific code has now been moved out of the core `mesh` package, making Mesh effectively protocol-agnostic
- Multicast peer discovery functionality is now in the `multicast` package - Multicast peer discovery functionality is now in the `multicast` package
- Admin socket functionality is now in the `admin` package and uses the Mesh public API - Admin socket functionality is now in the `admin` package and uses the Mesh public API
- TUN/TAP, ICMPv6 and all IP-specific functionality is now in the `tuntap` package - TUN/TAP, ICMPv6 and all IP-specific functionality is now in the `tuntap` package
@ -328,7 +328,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed ### Fixed
- Admin socket `getTunTap` call now returns properly instead of claiming no interface is enabled in all cases - Admin socket `getTunTap` call now returns properly instead of claiming no interface is enabled in all cases
- Handling of `getRoutes` etc in `yggdrasilctl` is now working - Handling of `getRoutes` etc in `meshctl` is now working
- Local interface names are no longer leaked in multicast packets - Local interface names are no longer leaked in multicast packets
- Link-local TCP connections, particularly those initiated because of multicast beacons, are now always correctly scoped for the target interface - Link-local TCP connections, particularly those initiated because of multicast beacons, are now always correctly scoped for the target interface
- Mesh now correctly responds to multicast interfaces going up and down during runtime - Mesh now correctly responds to multicast interfaces going up and down during runtime
@ -380,14 +380,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Adds flags `-c`, `-l` and `-t` to `build` script for specifying `GCFLAGS`, `LDFLAGS` or whether to keep symbol/DWARF tables - Adds flags `-c`, `-l` and `-t` to `build` script for specifying `GCFLAGS`, `LDFLAGS` or whether to keep symbol/DWARF tables
### Changed ### Changed
- Default `AdminListen` in newly generated config is now `unix:///var/run/yggdrasil.sock` - Default `AdminListen` in newly generated config is now `unix:///var/run/mesh.sock`
- Formatting of `getRoutes` in the admin socket has been improved - Formatting of `getRoutes` in the admin socket has been improved
- Debian package now adds `yggdrasil` group to assist with `AF_UNIX` admin socket permissions - Debian package now adds `mesh` group to assist with `AF_UNIX` admin socket permissions
- Crypto, address and other utility code refactored into separate Go packages - Crypto, address and other utility code refactored into separate Go packages
### Fixed ### Fixed
- Switch peer convergence is now much faster again (previously it was taking up to a minute once the peering was established) - Switch peer convergence is now much faster again (previously it was taking up to a minute once the peering was established)
- `yggdrasilctl` is now less prone to crashing when parameters are specified incorrectly - `meshctl` is now less prone to crashing when parameters are specified incorrectly
- Panic fixed when `Peers` or `InterfacePeers` was commented out - Panic fixed when `Peers` or `InterfacePeers` was commented out
## [0.3.0] - 2018-12-12 ## [0.3.0] - 2018-12-12
@ -398,19 +398,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- New macOS .pkgs built automatically by CircleCI - New macOS .pkgs built automatically by CircleCI
- Add Dockerfile to repository for Docker support - Add Dockerfile to repository for Docker support
- Add `-json` command line flag for generating and normalising configuration in plain JSON instead of HJSON - Add `-json` command line flag for generating and normalising configuration in plain JSON instead of HJSON
- Build name and version numbers are now imprinted onto the build, accessible through `yggdrasil -version` and `yggdrasilctl getSelf` - Build name and version numbers are now imprinted onto the build, accessible through `mesh -version` and `meshctl getSelf`
- Add ability to disable admin socket by setting `AdminListen` to `"none"` - Add ability to disable admin socket by setting `AdminListen` to `"none"`
- `yggdrasilctl` now tries to look for the default configuration file to find `AdminListen` if `-endpoint` is not specified - `meshctl` now tries to look for the default configuration file to find `AdminListen` if `-endpoint` is not specified
- `yggdrasilctl` now returns more useful logging in the event of a fatal error - `meshctl` now returns more useful logging in the event of a fatal error
### Changed ### Changed
- Switched to Chord DHT (instead of Kademlia, although still compatible at the protocol level) - Switched to Chord DHT (instead of Kademlia, although still compatible at the protocol level)
- The `AdminListen` option and `yggdrasilctl` now default to `unix:///var/run/yggdrasil.sock` on BSDs, macOS and Linux - The `AdminListen` option and `meshctl` now default to `unix:///var/run/mesh.sock` on BSDs, macOS and Linux
- Cleaned up some of the parameter naming in the admin socket - Cleaned up some of the parameter naming in the admin socket
- Latency-based parent selection for the switch instead of uptime-based (should help to avoid high latency links somewhat) - Latency-based parent selection for the switch instead of uptime-based (should help to avoid high latency links somewhat)
- Real peering endpoints now shown in the admin socket `getPeers` call to help identify peerings - Real peering endpoints now shown in the admin socket `getPeers` call to help identify peerings
- Reuse the multicast port on supported platforms so that multiple Mesh processes can run - Reuse the multicast port on supported platforms so that multiple Mesh processes can run
- `yggdrasilctl` now has more useful help text (with `-help` or when no arguments passed) - `meshctl` now has more useful help text (with `-help` or when no arguments passed)
### Fixed ### Fixed
- Memory leaks in the DHT fixed - Memory leaks in the DHT fixed
@ -444,7 +444,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.2.5] - 2018-07-19 ## [0.2.5] - 2018-07-19
### Changed ### Changed
- Make `yggdrasilctl` less case sensitive - Make `meshctl` less case sensitive
- More verbose TCP disconnect messages - More verbose TCP disconnect messages
### Fixed ### Fixed
@ -475,7 +475,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.2.2] - 2018-06-21 ## [0.2.2] - 2018-06-21
### Added ### Added
- Add `yggdrasilconf` utility for testing with the `vyatta-yggdrasil` package. - Add `meshconf` utility for testing with the `vyatta-mesh` package.
- Add a randomized retry delay after TCP disconnects, to prevent synchronization livelocks. - Add a randomized retry delay after TCP disconnects, to prevent synchronization livelocks.
### Changed ### Changed

8
build
View file

@ -34,16 +34,16 @@ if [ $IOS ]; then
echo "Building framework for iOS" echo "Building framework for iOS"
go get golang.org/x/mobile/bind go get golang.org/x/mobile/bind
gomobile bind -target ios -tags mobile -o Mesh.framework -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \ gomobile bind -target ios -tags mobile -o Mesh.framework -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
github.com/RiV-chain/yggdrasil-extras/src/mobile \ github.com/RiV-chain/mesh-extras/src/mobile \
github.com/RiV-chain/RiV-mesh/src/config github.com/RiV-chain/RiV-mesh/src/config
elif [ $ANDROID ]; then elif [ $ANDROID ]; then
echo "Building aar for Android" echo "Building aar for Android"
go get golang.org/x/mobile/bind go get golang.org/x/mobile/bind
gomobile bind -target android -tags mobile -o yggdrasil.aar -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \ gomobile bind -target android -tags mobile -o mesh.aar -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
github.com/RiV-chain/yggdrasil-extras/src/mobile \ github.com/RiV-chain/mesh-extras/src/mobile \
github.com/RiV-chain/RiV-mesh/src/config github.com/RiV-chain/RiV-mesh/src/config
else else
for CMD in yggdrasil yggdrasilctl ; do for CMD in mesh meshctl ; do
echo "Building: $CMD" echo "Building: $CMD"
go build $ARGS -ldflags="$LDFLAGS" -gcflags="$GCFLAGS" ./cmd/$CMD go build $ARGS -ldflags="$LDFLAGS" -gcflags="$GCFLAGS" ./cmd/$CMD

View file

@ -1,6 +1,6 @@
/* /*
This file generates crypto keys for [ansible-yggdrasil](https://github.com/jcgruenhage/ansible-yggdrasil/) This file generates crypto keys for [ansible-mesh](https://github.com/jcgruenhage/ansible-mesh/)
*/ */
package main package main
@ -57,8 +57,8 @@ func main() {
return return
} }
defer file.Close() defer file.Close()
file.WriteString(fmt.Sprintf("yggdrasil_public_key: %v\n", hex.EncodeToString(keys[i].pub))) file.WriteString(fmt.Sprintf("mesh_public_key: %v\n", hex.EncodeToString(keys[i].pub)))
file.WriteString("yggdrasil_private_key: \"{{ vault_yggdrasil_private_key }}\"\n") file.WriteString("mesh_private_key: \"{{ vault_mesh_private_key }}\"\n")
file.WriteString(fmt.Sprintf("ansible_host: %v\n", keys[i].ip)) file.WriteString(fmt.Sprintf("ansible_host: %v\n", keys[i].ip))
file, err = os.Create(fmt.Sprintf("host_vars/%x/vault", i)) file, err = os.Create(fmt.Sprintf("host_vars/%x/vault", i))
@ -66,7 +66,7 @@ func main() {
return return
} }
defer file.Close() defer file.Close()
file.WriteString(fmt.Sprintf("vault_yggdrasil_private_key: %v\n", hex.EncodeToString(keys[i].priv))) file.WriteString(fmt.Sprintf("vault_mesh_private_key: %v\n", hex.EncodeToString(keys[i].priv)))
bar.Increment() bar.Increment()
} }
bar.Finish() bar.Finish()

View file

@ -1,7 +1,7 @@
# Last Modified: Fri Oct 30 11:33:31 2020 # Last Modified: Fri Oct 30 11:33:31 2020
#include <tunables/global> #include <tunables/global>
/usr/bin/yggdrasil { /usr/bin/mesh {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
@ -12,6 +12,6 @@
/proc/sys/net/core/somaxconn r, /proc/sys/net/core/somaxconn r,
/sys/kernel/mm/transparent_hugepage/hpage_pmd_size r, /sys/kernel/mm/transparent_hugepage/hpage_pmd_size r,
/etc/yggdrasil.conf rw, /etc/mesh.conf rw,
/run/yggdrasil.sock rw, /run/mesh.sock rw,
} }

View file

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
CONFFILE="/etc/yggdrasil.conf" CONFFILE="/etc/mesh.conf"
genconf() { genconf() {
/usr/bin/yggdrasil -genconf > "$1" /usr/bin/mesh -genconf > "$1"
return $? return $?
} }
@ -33,8 +33,8 @@ start() {
fi fi
fi fi
printf 'Starting yggdrasil: ' printf 'Starting mesh: '
if start-stop-daemon -S -q -b -x /usr/bin/yggdrasil \ if start-stop-daemon -S -q -b -x /usr/bin/mesh \
-- -useconffile "$CONFFILE"; then -- -useconffile "$CONFFILE"; then
echo "OK" echo "OK"
else else
@ -43,8 +43,8 @@ start() {
} }
stop() { stop() {
printf "Stopping yggdrasil: " printf "Stopping mesh: "
if start-stop-daemon -K -q -x /usr/bin/yggdrasil; then if start-stop-daemon -K -q -x /usr/bin/mesh; then
echo "OK" echo "OK"
else else
echo "FAIL" echo "FAIL"
@ -52,8 +52,8 @@ stop() {
} }
reload() { reload() {
printf "Reloading yggdrasil: " printf "Reloading mesh: "
if start-stop-daemon -K -q -s HUP -x /usr/bin/yggdrasil; then if start-stop-daemon -K -q -s HUP -x /usr/bin/mesh; then
echo "OK" echo "OK"
else else
echo "FAIL" echo "FAIL"

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# This is a lazy script to create a .deb for Debian/Ubuntu. It installs # This is a lazy script to create a .deb for Debian/Ubuntu. It installs
# yggdrasil and enables it in systemd. You can give it the PKGARCH= argument # mesh and enables it in systemd. You can give it the PKGARCH= argument
# i.e. PKGARCH=i386 sh contrib/deb/generate.sh # i.e. PKGARCH=i386 sh contrib/deb/generate.sh
if [ `pwd` != `git rev-parse --show-toplevel` ] if [ `pwd` != `git rev-parse --show-toplevel` ]
@ -15,10 +15,10 @@ PKGNAME=$(sh contrib/semver/name.sh)
PKGVERSION=$(sh contrib/semver/version.sh --bare) PKGVERSION=$(sh contrib/semver/version.sh --bare)
PKGARCH=${PKGARCH-amd64} PKGARCH=${PKGARCH-amd64}
PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb
PKGREPLACES=yggdrasil PKGREPLACES=mesh
if [ $PKGBRANCH = "master" ]; then if [ $PKGBRANCH = "master" ]; then
PKGREPLACES=yggdrasil-develop PKGREPLACES=mesh-develop
fi fi
if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build
@ -66,56 +66,56 @@ cat > /tmp/$PKGNAME/debian/docs << EOF
Please see https://github.com/RiV-chain/RiV-mesh/ Please see https://github.com/RiV-chain/RiV-mesh/
EOF EOF
cat > /tmp/$PKGNAME/debian/install << EOF cat > /tmp/$PKGNAME/debian/install << EOF
usr/bin/yggdrasil usr/bin usr/bin/mesh usr/bin
usr/bin/yggdrasilctl usr/bin usr/bin/meshctl usr/bin
etc/systemd/system/*.service etc/systemd/system etc/systemd/system/*.service etc/systemd/system
EOF EOF
cat > /tmp/$PKGNAME/debian/postinst << EOF cat > /tmp/$PKGNAME/debian/postinst << EOF
#!/bin/sh #!/bin/sh
if ! getent group yggdrasil 2>&1 > /dev/null; then if ! getent group mesh 2>&1 > /dev/null; then
groupadd --system --force yggdrasil || echo "Failed to create group 'yggdrasil' - please create it manually and reinstall" groupadd --system --force mesh || echo "Failed to create group 'mesh' - please create it manually and reinstall"
fi fi
if [ -f /etc/yggdrasil.conf ]; if [ -f /etc/mesh.conf ];
then then
mkdir -p /var/backups mkdir -p /var/backups
echo "Backing up configuration file to /var/backups/yggdrasil.conf.`date +%Y%m%d`" echo "Backing up configuration file to /var/backups/mesh.conf.`date +%Y%m%d`"
cp /etc/yggdrasil.conf /var/backups/yggdrasil.conf.`date +%Y%m%d` cp /etc/mesh.conf /var/backups/mesh.conf.`date +%Y%m%d`
echo "Normalising and updating /etc/yggdrasil.conf" echo "Normalising and updating /etc/mesh.conf"
/usr/bin/yggdrasil -useconf -normaliseconf < /var/backups/yggdrasil.conf.`date +%Y%m%d` > /etc/yggdrasil.conf /usr/bin/mesh -useconf -normaliseconf < /var/backups/mesh.conf.`date +%Y%m%d` > /etc/mesh.conf
chgrp yggdrasil /etc/yggdrasil.conf chgrp mesh /etc/mesh.conf
if command -v systemctl >/dev/null; then if command -v systemctl >/dev/null; then
systemctl daemon-reload >/dev/null || true systemctl daemon-reload >/dev/null || true
systemctl enable yggdrasil || true systemctl enable mesh || true
systemctl start yggdrasil || true systemctl start mesh || true
fi fi
else else
echo "Generating initial configuration file /etc/yggdrasil.conf" echo "Generating initial configuration file /etc/mesh.conf"
echo "Please familiarise yourself with this file before starting Mesh" echo "Please familiarise yourself with this file before starting Mesh"
sh -c 'umask 0027 && /usr/bin/yggdrasil -genconf > /etc/yggdrasil.conf' sh -c 'umask 0027 && /usr/bin/mesh -genconf > /etc/mesh.conf'
chgrp yggdrasil /etc/yggdrasil.conf chgrp mesh /etc/mesh.conf
fi fi
EOF EOF
cat > /tmp/$PKGNAME/debian/prerm << EOF cat > /tmp/$PKGNAME/debian/prerm << EOF
#!/bin/sh #!/bin/sh
if command -v systemctl >/dev/null; then if command -v systemctl >/dev/null; then
if systemctl is-active --quiet yggdrasil; then if systemctl is-active --quiet mesh; then
systemctl stop yggdrasil || true systemctl stop mesh || true
fi fi
systemctl disable yggdrasil || true systemctl disable mesh || true
fi fi
EOF EOF
cp yggdrasil /tmp/$PKGNAME/usr/bin/ cp mesh /tmp/$PKGNAME/usr/bin/
cp yggdrasilctl /tmp/$PKGNAME/usr/bin/ cp meshctl /tmp/$PKGNAME/usr/bin/
cp contrib/systemd/*.service /tmp/$PKGNAME/etc/systemd/system/ cp contrib/systemd/*.service /tmp/$PKGNAME/etc/systemd/system/
tar -czvf /tmp/$PKGNAME/data.tar.gz -C /tmp/$PKGNAME/ \ tar -czvf /tmp/$PKGNAME/data.tar.gz -C /tmp/$PKGNAME/ \
usr/bin/yggdrasil usr/bin/yggdrasilctl \ usr/bin/mesh usr/bin/meshctl \
etc/systemd/system/yggdrasil.service \ etc/systemd/system/mesh.service \
etc/systemd/system/yggdrasil-default-config.service etc/systemd/system/mesh-default-config.service
tar -czvf /tmp/$PKGNAME/control.tar.gz -C /tmp/$PKGNAME/debian . tar -czvf /tmp/$PKGNAME/control.tar.gz -C /tmp/$PKGNAME/debian .
echo 2.0 > /tmp/$PKGNAME/debian-binary echo 2.0 > /tmp/$PKGNAME/debian-binary

View file

@ -9,8 +9,8 @@ RUN apk add git && ./build && go build -o /src/genkeys cmd/genkeys/main.go
FROM docker.io/alpine FROM docker.io/alpine
COPY --from=builder /src/yggdrasil /usr/bin/yggdrasil COPY --from=builder /src/mesh /usr/bin/mesh
COPY --from=builder /src/yggdrasilctl /usr/bin/yggdrasilctl COPY --from=builder /src/meshctl /usr/bin/meshctl
COPY --from=builder /src/genkeys /usr/bin/genkeys COPY --from=builder /src/genkeys /usr/bin/genkeys
COPY contrib/docker/entrypoint.sh /usr/bin/entrypoint.sh COPY contrib/docker/entrypoint.sh /usr/bin/entrypoint.sh

View file

@ -6,8 +6,8 @@ CONF_DIR="/etc/RiV-chain"
if [ ! -f "$CONF_DIR/config.conf" ]; then if [ ! -f "$CONF_DIR/config.conf" ]; then
echo "generate $CONF_DIR/config.conf" echo "generate $CONF_DIR/config.conf"
yggdrasil --genconf > "$CONF_DIR/config.conf" mesh --genconf > "$CONF_DIR/config.conf"
fi fi
yggdrasil --useconf < "$CONF_DIR/config.conf" mesh --useconf < "$CONF_DIR/config.conf"
exit $? exit $?

View file

@ -1,72 +1,72 @@
#!/bin/sh #!/bin/sh
# #
# Put the yggdrasil and yggdrasilctl binaries into /usr/local/bin # Put the mesh and meshctl binaries into /usr/local/bin
# Then copy this script into /etc/rc.d/yggdrasil # Then copy this script into /etc/rc.d/mesh
# Finally, run: # Finally, run:
# 1. chmod +x /etc/rc.d/yggdrasil /usr/local/bin/{yggdrasil,yggdrasilctl} # 1. chmod +x /etc/rc.d/mesh /usr/local/bin/{mesh,meshctl}
# 2. echo "yggdrasil_enable=yes" >> /etc/rc.d # 2. echo "mesh_enable=yes" >> /etc/rc.d
# 3. service yggdrasil start # 3. service mesh start
# #
# PROVIDE: yggdrasil # PROVIDE: mesh
# REQUIRE: networking # REQUIRE: networking
# KEYWORD: # KEYWORD:
. /etc/rc.subr . /etc/rc.subr
name="yggdrasil" name="mesh"
rcvar="yggdrasil_enable" rcvar="mesh_enable"
start_cmd="${name}_start" start_cmd="${name}_start"
stop_cmd="${name}_stop" stop_cmd="${name}_stop"
pidfile="/var/run/yggdrasil/${name}.pid" pidfile="/var/run/mesh/${name}.pid"
command="/usr/sbin/daemon" command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -f ${yggdrasil_command}" command_args="-P ${pidfile} -r -f ${mesh_command}"
yggdrasil_start() mesh_start()
{ {
test ! -x /usr/local/bin/yggdrasil && ( test ! -x /usr/local/bin/mesh && (
logger -s -t yggdrasil "Warning: /usr/local/bin/yggdrasil is missing or not executable" logger -s -t mesh "Warning: /usr/local/bin/mesh is missing or not executable"
logger -s -t yggdrasil "Copy the yggdrasil binary into /usr/local/bin and then chmod +x /usr/local/bin/yggdrasil" logger -s -t mesh "Copy the mesh binary into /usr/local/bin and then chmod +x /usr/local/bin/mesh"
return 1 return 1
) )
test ! -f /etc/yggdrasil.conf && ( test ! -f /etc/mesh.conf && (
logger -s -t yggdrasil "Generating new configuration file into /etc/yggdrasil.conf" logger -s -t mesh "Generating new configuration file into /etc/mesh.conf"
/usr/local/bin/yggdrasil -genconf > /etc/yggdrasil.conf /usr/local/bin/mesh -genconf > /etc/mesh.conf
) )
tap_path="$(cat /etc/yggdrasil.conf | egrep -o '/dev/tap[0-9]{1,2}$')" tap_path="$(cat /etc/mesh.conf | egrep -o '/dev/tap[0-9]{1,2}$')"
tap_name="$(echo -n ${tap_path} | tr -d '/dev/')" tap_name="$(echo -n ${tap_path} | tr -d '/dev/')"
/sbin/ifconfig ${tap_name} >/dev/null 2>&1 || ( /sbin/ifconfig ${tap_name} >/dev/null 2>&1 || (
logger -s -t yggdrasil "Creating ${tap_name} adapter" logger -s -t mesh "Creating ${tap_name} adapter"
/sbin/ifconfig ${tap_name} create || logger -s -t yggdrasil "Failed to create ${tap_name} adapter" /sbin/ifconfig ${tap_name} create || logger -s -t mesh "Failed to create ${tap_name} adapter"
) )
test ! -d /var/run/yggdrasil && mkdir -p /var/run/yggdrasil test ! -d /var/run/mesh && mkdir -p /var/run/mesh
logger -s -t yggdrasil "Starting yggdrasil" logger -s -t mesh "Starting mesh"
${command} ${command_args} /usr/local/bin/yggdrasil -useconffile /etc/yggdrasil.conf \ ${command} ${command_args} /usr/local/bin/mesh -useconffile /etc/mesh.conf \
1>/var/log/yggdrasil.stdout.log \ 1>/var/log/mesh.stdout.log \
2>/var/log/yggdrasil.stderr.log & 2>/var/log/mesh.stderr.log &
} }
yggdrasil_stop() mesh_stop()
{ {
logger -s -t yggdrasil "Stopping yggdrasil" logger -s -t mesh "Stopping mesh"
test -f /var/run/yggdrasil/${name}.pid && kill -TERM $(cat /var/run/yggdrasil/${name}.pid) test -f /var/run/mesh/${name}.pid && kill -TERM $(cat /var/run/mesh/${name}.pid)
tap_path="$(cat /etc/yggdrasil.conf | grep /dev/tap | egrep -o '/dev/.*$')" tap_path="$(cat /etc/mesh.conf | grep /dev/tap | egrep -o '/dev/.*$')"
tap_name="$(echo -n ${tap_path} | tr -d '/dev/')" tap_name="$(echo -n ${tap_path} | tr -d '/dev/')"
/sbin/ifconfig ${tap_name} >/dev/null 2>&1 && ( /sbin/ifconfig ${tap_name} >/dev/null 2>&1 && (
logger -s -t yggdrasil "Destroying ${tap_name} adapter" logger -s -t mesh "Destroying ${tap_name} adapter"
/sbin/ifconfig ${tap_name} destroy || logger -s -t yggdrasil "Failed to destroy ${tap_name} adapter" /sbin/ifconfig ${tap_name} destroy || logger -s -t mesh "Failed to destroy ${tap_name} adapter"
) )
} }
load_rc_config $name load_rc_config $name
: ${yggdrasil_enable:=no} : ${mesh_enable:=no}
run_rc_command "$1" run_rc_command "$1"

View file

@ -18,9 +18,9 @@ command -v mkbom >/dev/null 2>&1 || (
# Check if we can find the files we need - they should # Check if we can find the files we need - they should
# exist if you are running this script from the root of # exist if you are running this script from the root of
# the RiV-mesh repo and you have ran ./build # the RiV-mesh repo and you have ran ./build
test -f yggdrasil || (echo "yggdrasil binary not found"; exit 1) test -f mesh || (echo "mesh binary not found"; exit 1)
test -f yggdrasilctl || (echo "yggdrasilctl binary not found"; exit 1) test -f meshctl || (echo "meshctl binary not found"; exit 1)
test -f contrib/macos/yggdrasil.plist || (echo "contrib/macos/yggdrasil.plist not found"; exit 1) test -f contrib/macos/mesh.plist || (echo "contrib/macos/mesh.plist not found"; exit 1)
test -f contrib/semver/version.sh || (echo "contrib/semver/version.sh not found"; exit 1) test -f contrib/semver/version.sh || (echo "contrib/semver/version.sh not found"; exit 1)
# Delete the pkgbuild folder if it already exists # Delete the pkgbuild folder if it already exists
@ -34,37 +34,37 @@ mkdir -p pkgbuild/root/usr/local/bin
mkdir -p pkgbuild/root/Library/LaunchDaemons mkdir -p pkgbuild/root/Library/LaunchDaemons
# Copy package contents into the pkgbuild root # Copy package contents into the pkgbuild root
cp yggdrasil pkgbuild/root/usr/local/bin cp mesh pkgbuild/root/usr/local/bin
cp yggdrasilctl pkgbuild/root/usr/local/bin cp meshctl pkgbuild/root/usr/local/bin
cp contrib/macos/yggdrasil.plist pkgbuild/root/Library/LaunchDaemons cp contrib/macos/mesh.plist pkgbuild/root/Library/LaunchDaemons
# Create the postinstall script # Create the postinstall script
cat > pkgbuild/scripts/postinstall << EOF cat > pkgbuild/scripts/postinstall << EOF
#!/bin/sh #!/bin/sh
# Normalise the config if it exists, generate it if it doesn't # Normalise the config if it exists, generate it if it doesn't
if [ -f /etc/yggdrasil.conf ]; if [ -f /etc/mesh.conf ];
then then
mkdir -p /Library/Preferences/Mesh mkdir -p /Library/Preferences/Mesh
echo "Backing up configuration file to /Library/Preferences/Mesh/yggdrasil.conf.`date +%Y%m%d`" echo "Backing up configuration file to /Library/Preferences/Mesh/mesh.conf.`date +%Y%m%d`"
cp /etc/yggdrasil.conf /Library/Preferences/Mesh/yggdrasil.conf.`date +%Y%m%d` cp /etc/mesh.conf /Library/Preferences/Mesh/mesh.conf.`date +%Y%m%d`
echo "Normalising /etc/yggdrasil.conf" echo "Normalising /etc/mesh.conf"
/usr/local/bin/yggdrasil -useconffile /Library/Preferences/Mesh/yggdrasil.conf.`date +%Y%m%d` -normaliseconf > /etc/yggdrasil.conf /usr/local/bin/mesh -useconffile /Library/Preferences/Mesh/mesh.conf.`date +%Y%m%d` -normaliseconf > /etc/mesh.conf
else else
/usr/local/bin/yggdrasil -genconf > /etc/yggdrasil.conf /usr/local/bin/mesh -genconf > /etc/mesh.conf
fi fi
# Unload existing Mesh launchd service, if possible # Unload existing Mesh launchd service, if possible
test -f /Library/LaunchDaemons/yggdrasil.plist && (launchctl unload /Library/LaunchDaemons/yggdrasil.plist || true) test -f /Library/LaunchDaemons/mesh.plist && (launchctl unload /Library/LaunchDaemons/mesh.plist || true)
# Load Mesh launchd service and start Mesh # Load Mesh launchd service and start Mesh
launchctl load /Library/LaunchDaemons/yggdrasil.plist launchctl load /Library/LaunchDaemons/mesh.plist
EOF EOF
# Set execution permissions # Set execution permissions
chmod +x pkgbuild/scripts/postinstall chmod +x pkgbuild/scripts/postinstall
chmod +x pkgbuild/root/usr/local/bin/yggdrasil chmod +x pkgbuild/root/usr/local/bin/mesh
chmod +x pkgbuild/root/usr/local/bin/yggdrasilctl chmod +x pkgbuild/root/usr/local/bin/meshctl
# Pack payload and scripts # Pack payload and scripts
( cd pkgbuild/scripts && find . | cpio -o --format odc --owner 0:80 | gzip -c ) > pkgbuild/flat/base.pkg/Scripts ( cd pkgbuild/scripts && find . | cpio -o --format odc --owner 0:80 | gzip -c ) > pkgbuild/flat/base.pkg/Scripts

View file

@ -3,12 +3,12 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>Label</key> <key>Label</key>
<string>yggdrasil</string> <string>mesh</string>
<key>ProgramArguments</key> <key>ProgramArguments</key>
<array> <array>
<string>sh</string> <string>sh</string>
<string>-c</string> <string>-c</string>
<string>/usr/local/bin/yggdrasil -useconffile /etc/yggdrasil.conf</string> <string>/usr/local/bin/mesh -useconffile /etc/mesh.conf</string>
</array> </array>
<key>KeepAlive</key> <key>KeepAlive</key>
<true/> <true/>
@ -17,8 +17,8 @@
<key>ProcessType</key> <key>ProcessType</key>
<string>Interactive</string> <string>Interactive</string>
<key>StandardOutPath</key> <key>StandardOutPath</key>
<string>/tmp/yggdrasil.stdout.log</string> <string>/tmp/mesh.stdout.log</string>
<key>StandardErrorPath</key> <key>StandardErrorPath</key>
<string>/tmp/yggdrasil.stderr.log</string> <string>/tmp/mesh.stderr.log</string>
</dict> </dict>
</plist> </plist>

View file

@ -58,9 +58,9 @@ cat > updateconfig.bat << EOF
if not exist %ALLUSERSPROFILE%\\Mesh ( if not exist %ALLUSERSPROFILE%\\Mesh (
mkdir %ALLUSERSPROFILE%\\Mesh mkdir %ALLUSERSPROFILE%\\Mesh
) )
if not exist %ALLUSERSPROFILE%\\Mesh\\yggdrasil.conf ( if not exist %ALLUSERSPROFILE%\\Mesh\\mesh.conf (
if exist yggdrasil.exe ( if exist mesh.exe (
yggdrasil.exe -genconf > %ALLUSERSPROFILE%\\Mesh\\yggdrasil.conf mesh.exe -genconf > %ALLUSERSPROFILE%\\Mesh\\mesh.conf
) )
) )
EOF EOF
@ -139,9 +139,9 @@ cat > wix.xml << EOF
<Component Id="MainExecutable" Guid="c2119231-2aa3-4962-867a-9759c87beb24"> <Component Id="MainExecutable" Guid="c2119231-2aa3-4962-867a-9759c87beb24">
<File <File
Id="Mesh" Id="Mesh"
Name="yggdrasil.exe" Name="mesh.exe"
DiskId="1" DiskId="1"
Source="yggdrasil.exe" Source="mesh.exe"
KeyPath="yes" /> KeyPath="yes" />
<File <File
@ -160,12 +160,12 @@ cat > wix.xml << EOF
Name="Mesh" Name="Mesh"
Start="auto" Start="auto"
Type="ownProcess" Type="ownProcess"
Arguments='-useconffile "%ALLUSERSPROFILE%\\Mesh\\yggdrasil.conf" -logto "%ALLUSERSPROFILE%\\Mesh\\yggdrasil.log"' Arguments='-useconffile "%ALLUSERSPROFILE%\\Mesh\\mesh.conf" -logto "%ALLUSERSPROFILE%\\Mesh\\mesh.log"'
Vital="yes" /> Vital="yes" />
<ServiceControl <ServiceControl
Id="ServiceControl" Id="ServiceControl"
Name="yggdrasil" Name="mesh"
Start="install" Start="install"
Stop="both" Stop="both"
Remove="uninstall" /> Remove="uninstall" />
@ -174,9 +174,9 @@ cat > wix.xml << EOF
<Component Id="CtrlExecutable" Guid="a916b730-974d-42a1-b687-d9d504cbb86a"> <Component Id="CtrlExecutable" Guid="a916b730-974d-42a1-b687-d9d504cbb86a">
<File <File
Id="Meshctl" Id="Meshctl"
Name="yggdrasilctl.exe" Name="meshctl.exe"
DiskId="1" DiskId="1"
Source="yggdrasilctl.exe" Source="meshctl.exe"
KeyPath="yes"/> KeyPath="yes"/>
</Component> </Component>

View file

@ -2,10 +2,10 @@
description="An experiment in scalable routing as an encrypted IPv6 overlay network." description="An experiment in scalable routing as an encrypted IPv6 overlay network."
CONFFILE="/etc/yggdrasil.conf" CONFFILE="/etc/mesh.conf"
pidfile="/run/${RC_SVCNAME}.pid" pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/yggdrasil" command="/usr/bin/mesh"
extra_started_commands="reload" extra_started_commands="reload"
depend() { depend() {
@ -36,8 +36,8 @@ start() {
--pidfile "${pidfile}" \ --pidfile "${pidfile}" \
--make-pidfile \ --make-pidfile \
--background \ --background \
--stdout /var/log/yggdrasil.stdout.log \ --stdout /var/log/mesh.stdout.log \
--stderr /var/log/yggdrasil.stderr.log \ --stderr /var/log/mesh.stderr.log \
--exec "${command}" -- -useconffile "${CONFFILE}" --exec "${command}" -- -useconffile "${CONFFILE}"
eend $? eend $?
} }

View file

@ -5,7 +5,7 @@ BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null)
# Complain if the git history is not available # Complain if the git history is not available
if [ $? != 0 ] || [ -z "$BRANCH" ]; then if [ $? != 0 ] || [ -z "$BRANCH" ]; then
printf "yggdrasil" printf "mesh"
exit 0 exit 0
fi fi
@ -14,9 +14,9 @@ BRANCH=$(echo $BRANCH | tr -d "/")
# Check if the branch name is not master # Check if the branch name is not master
if [ "$BRANCH" = "master" ]; then if [ "$BRANCH" = "master" ]; then
printf "yggdrasil" printf "mesh"
exit 0 exit 0
fi fi
# If it is something other than master, append it # If it is something other than master, append it
printf "yggdrasil-%s" "$BRANCH" printf "mesh-%s" "$BRANCH"

View file

@ -1,13 +1,13 @@
[Unit] [Unit]
Description=yggdrasil default config generator Description=mesh default config generator
ConditionPathExists=|!/etc/yggdrasil.conf ConditionPathExists=|!/etc/mesh.conf
ConditionFileNotEmpty=|!/etc/yggdrasil.conf ConditionFileNotEmpty=|!/etc/mesh.conf
Wants=local-fs.target Wants=local-fs.target
After=local-fs.target After=local-fs.target
[Service] [Service]
Type=oneshot Type=oneshot
Group=yggdrasil Group=mesh
StandardOutput=file:/etc/yggdrasil.conf StandardOutput=file:/etc/mesh.conf
ExecStart=/usr/bin/yggdrasil -genconf ExecStart=/usr/bin/mesh -genconf
ExecStartPost=/usr/bin/chmod 0640 /etc/yggdrasil.conf ExecStartPost=/usr/bin/chmod 0640 /etc/mesh.conf

View file

@ -1,18 +1,18 @@
[Unit] [Unit]
Description=yggdrasil Description=mesh
Wants=network.target Wants=network.target
Wants=yggdrasil-default-config.service Wants=mesh-default-config.service
After=network.target After=network.target
After=yggdrasil-default-config.service After=mesh-default-config.service
[Service] [Service]
Group=yggdrasil Group=mesh
ProtectHome=true ProtectHome=true
ProtectSystem=true ProtectSystem=true
SyslogIdentifier=yggdrasil SyslogIdentifier=mesh
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE
ExecStartPre=+-/sbin/modprobe tun ExecStartPre=+-/sbin/modprobe tun
ExecStart=/usr/bin/yggdrasil -useconffile /etc/yggdrasil.conf ExecStart=/usr/bin/mesh -useconffile /etc/mesh.conf
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
TimeoutStopSec=5 TimeoutStopSec=5

View file

@ -1,12 +1,12 @@
.PHONY: all .PHONY: all
all: util yggdrasil-brute-multi-curve25519 yggdrasil-brute-multi-ed25519 all: util mesh-brute-multi-curve25519 mesh-brute-multi-ed25519
util: util.c util: util.c
gcc -Wall -std=c89 -O3 -c -o util.o util.c gcc -Wall -std=c89 -O3 -c -o util.o util.c
yggdrasil-brute-multi-ed25519: yggdrasil-brute-multi-ed25519.c util.o mesh-brute-multi-ed25519: mesh-brute-multi-ed25519.c util.o
gcc -Wall -std=c89 -O3 -o yggdrasil-brute-multi-ed25519 -lsodium yggdrasil-brute-multi-ed25519.c util.o gcc -Wall -std=c89 -O3 -o mesh-brute-multi-ed25519 -lsodium mesh-brute-multi-ed25519.c util.o
yggdrasil-brute-multi-curve25519: yggdrasil-brute-multi-curve25519.c util.o mesh-brute-multi-curve25519: mesh-brute-multi-curve25519.c util.o
gcc -Wall -std=c89 -O3 -o yggdrasil-brute-multi-curve25519 -lsodium yggdrasil-brute-multi-curve25519.c util.o gcc -Wall -std=c89 -O3 -o mesh-brute-multi-curve25519 -lsodium mesh-brute-multi-curve25519.c util.o

View file

@ -1,4 +1,4 @@
# yggdrasil-brute-simple # mesh-brute-simple
Simple program for finding curve25519 and ed25519 public keys whose sha512 hash has many leading ones. Simple program for finding curve25519 and ed25519 public keys whose sha512 hash has many leading ones.
Because ed25519 private keys consist of a seed that is hashed to find the secret part of the keypair, Because ed25519 private keys consist of a seed that is hashed to find the secret part of the keypair,

View file

@ -1,4 +1,4 @@
#include "yggdrasil-brute.h" #include "mesh-brute.h"
int find_where(unsigned char hash[64], unsigned char besthashlist[NUMKEYS][64]) { int find_where(unsigned char hash[64], unsigned char besthashlist[NUMKEYS][64]) {
/* Where to insert hash into sorted hashlist */ /* Where to insert hash into sorted hashlist */
@ -28,7 +28,7 @@ void insert_32(unsigned char itemlist[NUMKEYS][32], unsigned char item[32], int
} }
void make_addr(unsigned char addr[32], unsigned char hash[64]) { void make_addr(unsigned char addr[32], unsigned char hash[64]) {
/* Public key hash to yggdrasil ipv6 address */ /* Public key hash to mesh ipv6 address */
int i; int i;
int offset; int offset;
unsigned char mask; unsigned char mask;

View file

@ -13,7 +13,7 @@ if besthash:
besthash = hash besthash = hash
*/ */
#include "yggdrasil-brute.h" #include "mesh-brute.h"
void seed(unsigned char sk[32]) { void seed(unsigned char sk[32]) {
@ -43,7 +43,7 @@ int main(int argc, char **argv) {
int where; int where;
if (argc != 2) { if (argc != 2) {
fprintf(stderr, "usage: ./yggdrasil-brute-multi-curve25519 <seconds>\n"); fprintf(stderr, "usage: ./mesh-brute-multi-curve25519 <seconds>\n");
return 1; return 1;
} }
@ -57,7 +57,7 @@ int main(int argc, char **argv) {
requestedtime = atoi(argv[1]); requestedtime = atoi(argv[1]);
if (requestedtime < 0) requestedtime = 0; if (requestedtime < 0) requestedtime = 0;
fprintf(stderr, "Searching for yggdrasil curve25519 keys (this will take slightly longer than %ld seconds)\n", requestedtime); fprintf(stderr, "Searching for mesh curve25519 keys (this will take slightly longer than %ld seconds)\n", requestedtime);
sodium_memzero(bestsklist, NUMKEYS * 32); sodium_memzero(bestsklist, NUMKEYS * 32);
sodium_memzero(bestpklist, NUMKEYS * 32); sodium_memzero(bestpklist, NUMKEYS * 32);

View file

@ -20,7 +20,7 @@ if besthash:
besthash = hash besthash = hash
*/ */
#include "yggdrasil-brute.h" #include "mesh-brute.h"
int main(int argc, char **argv) { int main(int argc, char **argv) {
@ -41,7 +41,7 @@ int main(int argc, char **argv) {
int where; int where;
if (argc != 2) { if (argc != 2) {
fprintf(stderr, "usage: ./yggdrasil-brute-multi-curve25519 <seconds>\n"); fprintf(stderr, "usage: ./mesh-brute-multi-curve25519 <seconds>\n");
return 1; return 1;
} }
@ -55,7 +55,7 @@ int main(int argc, char **argv) {
requestedtime = atoi(argv[1]); requestedtime = atoi(argv[1]);
if (requestedtime < 0) requestedtime = 0; if (requestedtime < 0) requestedtime = 0;
fprintf(stderr, "Searching for yggdrasil ed25519 keys (this will take slightly longer than %ld seconds)\n", requestedtime); fprintf(stderr, "Searching for mesh ed25519 keys (this will take slightly longer than %ld seconds)\n", requestedtime);
sodium_memzero(bestsklist, NUMKEYS * 64); sodium_memzero(bestsklist, NUMKEYS * 64);
sodium_memzero(besthashlist, NUMKEYS * 64); sodium_memzero(besthashlist, NUMKEYS * 64);

View file

@ -51,12 +51,12 @@ ip netns exec node4 ip link set lo up
ip netns exec node5 ip link set lo up ip netns exec node5 ip link set lo up
ip netns exec node6 ip link set lo up ip netns exec node6 ip link set lo up
echo '{AdminListen: "none"}' | ip netns exec node1 env PPROFLISTEN=localhost:6060 ./yggdrasil --useconf &> /dev/null & echo '{AdminListen: "none"}' | ip netns exec node1 env PPROFLISTEN=localhost:6060 ./mesh --useconf &> /dev/null &
echo '{AdminListen: "none"}' | ip netns exec node2 env PPROFLISTEN=localhost:6060 ./yggdrasil --useconf &> /dev/null & echo '{AdminListen: "none"}' | ip netns exec node2 env PPROFLISTEN=localhost:6060 ./mesh --useconf &> /dev/null &
echo '{AdminListen: "none"}' | ip netns exec node3 env PPROFLISTEN=localhost:6060 ./yggdrasil --useconf &> /dev/null & echo '{AdminListen: "none"}' | ip netns exec node3 env PPROFLISTEN=localhost:6060 ./mesh --useconf &> /dev/null &
echo '{AdminListen: "none"}' | ip netns exec node4 env PPROFLISTEN=localhost:6060 ./yggdrasil --useconf &> /dev/null & echo '{AdminListen: "none"}' | ip netns exec node4 env PPROFLISTEN=localhost:6060 ./mesh --useconf &> /dev/null &
echo '{AdminListen: "none"}' | ip netns exec node5 env PPROFLISTEN=localhost:6060 ./yggdrasil --useconf &> /dev/null & echo '{AdminListen: "none"}' | ip netns exec node5 env PPROFLISTEN=localhost:6060 ./mesh --useconf &> /dev/null &
echo '{AdminListen: "none"}' | ip netns exec node6 env PPROFLISTEN=localhost:6060 ./yggdrasil --useconf &> /dev/null & echo '{AdminListen: "none"}' | ip netns exec node6 env PPROFLISTEN=localhost:6060 ./mesh --useconf &> /dev/null &
echo "Started, to continue you should (possibly w/ sudo):" echo "Started, to continue you should (possibly w/ sudo):"
echo "kill" $(jobs -p) echo "kill" $(jobs -p)

View file

@ -19,8 +19,8 @@ ip netns exec node2 tc qdisc add dev veth21 root tbf rate 10mbit burst 8192 late
ip netns exec node1 tc qdisc add dev veth12 root tbf rate 100mbit burst 8192 latency 1ms ip netns exec node1 tc qdisc add dev veth12 root tbf rate 100mbit burst 8192 latency 1ms
ip netns exec node2 tc qdisc add dev veth22 root tbf rate 100mbit burst 8192 latency 1ms ip netns exec node2 tc qdisc add dev veth22 root tbf rate 100mbit burst 8192 latency 1ms
echo '{AdminListen: "unix://node1.sock"}' | ip netns exec node1 env PPROFLISTEN=localhost:6060 ./yggdrasil -logging "info,warn,error,debug" -useconf &> node1.log & echo '{AdminListen: "unix://node1.sock"}' | ip netns exec node1 env PPROFLISTEN=localhost:6060 ./mesh -logging "info,warn,error,debug" -useconf &> node1.log &
echo '{AdminListen: "unix://node2.sock"}' | ip netns exec node2 env PPROFLISTEN=localhost:6060 ./yggdrasil -logging "info,warn,error,debug" -useconf &> node2.log & echo '{AdminListen: "unix://node2.sock"}' | ip netns exec node2 env PPROFLISTEN=localhost:6060 ./mesh -logging "info,warn,error,debug" -useconf &> node2.log &
echo "Started, to continue you should (possibly w/ sudo):" echo "Started, to continue you should (possibly w/ sudo):"
echo "kill" $(jobs -p) echo "kill" $(jobs -p)

View file

@ -1,4 +1,4 @@
// Package address contains the types used by yggdrasil to represent IPv6 addresses or prefixes, as well as functions for working with these types. // Package address contains the types used by mesh to represent IPv6 addresses or prefixes, as well as functions for working with these types.
// Of particular importance are the functions used to derive addresses or subnets from a NodeID, or to get the NodeID and bitmask of the bits visible from an address, which is needed for DHT searches. // Of particular importance are the functions used to derive addresses or subnets from a NodeID, or to get the NodeID and bitmask of the bits visible from an address, which is needed for DHT searches.
package address package address
@ -6,13 +6,13 @@ import (
"crypto/ed25519" "crypto/ed25519"
) )
// Address represents an IPv6 address in the yggdrasil address range. // Address represents an IPv6 address in the mesh address range.
type Address [16]byte type Address [16]byte
// Subnet represents an IPv6 /64 subnet in the yggdrasil subnet range. // Subnet represents an IPv6 /64 subnet in the mesh subnet range.
type Subnet [8]byte type Subnet [8]byte
// GetPrefix returns the address prefix used by yggdrasil. // GetPrefix returns the address prefix used by mesh.
// The current implementation requires this to be a multiple of 8 bits + 7 bits. // The current implementation requires this to be a multiple of 8 bits + 7 bits.
// The 8th bit of the last byte is used to signal nodes (0) or /64 prefixes (1). // The 8th bit of the last byte is used to signal nodes (0) or /64 prefixes (1).
// Nodes that configure this differently will be unable to communicate with each other using IP packets, though routing and the DHT machinery *should* still work. // Nodes that configure this differently will be unable to communicate with each other using IP packets, though routing and the DHT machinery *should* still work.

View file

@ -30,7 +30,7 @@ type NodeConfig struct {
Peers []string `comment:"List of connection strings for outbound peer connections in URI format,\ne.g. tls://a.b.c.d:e or socks://a.b.c.d:e/f.g.h.i:j. These connections\nwill obey the operating system routing table, therefore you should\nuse this section when you may connect via different interfaces."` Peers []string `comment:"List of connection strings for outbound peer connections in URI format,\ne.g. tls://a.b.c.d:e or socks://a.b.c.d:e/f.g.h.i:j. These connections\nwill obey the operating system routing table, therefore you should\nuse this section when you may connect via different interfaces."`
InterfacePeers map[string][]string `comment:"List of connection strings for outbound peer connections in URI format,\narranged by source interface, e.g. { \"eth0\": [ tls://a.b.c.d:e ] }.\nNote that SOCKS peerings will NOT be affected by this option and should\ngo in the \"Peers\" section instead."` InterfacePeers map[string][]string `comment:"List of connection strings for outbound peer connections in URI format,\narranged by source interface, e.g. { \"eth0\": [ tls://a.b.c.d:e ] }.\nNote that SOCKS peerings will NOT be affected by this option and should\ngo in the \"Peers\" section instead."`
Listen []string `comment:"Listen addresses for incoming connections. You will need to add\nlisteners in order to accept incoming peerings from non-local nodes.\nMulticast peer discovery will work regardless of any listeners set\nhere. Each listener should be specified in URI format as above, e.g.\ntls://0.0.0.0:0 or tls://[::]:0 to listen on all interfaces."` Listen []string `comment:"Listen addresses for incoming connections. You will need to add\nlisteners in order to accept incoming peerings from non-local nodes.\nMulticast peer discovery will work regardless of any listeners set\nhere. Each listener should be specified in URI format as above, e.g.\ntls://0.0.0.0:0 or tls://[::]:0 to listen on all interfaces."`
AdminListen string `comment:"Listen address for admin connections. Default is to listen for local\nconnections either on TCP/9001 or a UNIX socket depending on your\nplatform. Use this value for yggdrasilctl -endpoint=X. To disable\nthe admin socket, use the value \"none\" instead."` AdminListen string `comment:"Listen address for admin connections. Default is to listen for local\nconnections either on TCP/9001 or a UNIX socket depending on your\nplatform. Use this value for meshctl -endpoint=X. To disable\nthe admin socket, use the value \"none\" instead."`
MulticastInterfaces []MulticastInterfaceConfig `comment:"Configuration for which interfaces multicast peer discovery should be\nenabled on. Each entry in the list should be a json object which may\ncontain Regex, Beacon, Listen, and Port. Regex is a regular expression\nwhich is matched against an interface name, and interfaces use the\nfirst configuration that they match gainst. Beacon configures whether\nor not the node should send link-local multicast beacons to advertise\ntheir presence, while listening for incoming connections on Port.\nListen controls whether or not the node listens for multicast beacons\nand opens outgoing connections."` MulticastInterfaces []MulticastInterfaceConfig `comment:"Configuration for which interfaces multicast peer discovery should be\nenabled on. Each entry in the list should be a json object which may\ncontain Regex, Beacon, Listen, and Port. Regex is a regular expression\nwhich is matched against an interface name, and interfaces use the\nfirst configuration that they match gainst. Beacon configures whether\nor not the node should send link-local multicast beacons to advertise\ntheir presence, while listening for incoming connections on Port.\nListen controls whether or not the node listens for multicast beacons\nand opens outgoing connections."`
AllowedPublicKeys []string `comment:"List of peer public keys to allow incoming peering connections\nfrom. If left empty/undefined then all connections will be allowed\nby default. This does not affect outgoing peerings, nor does it\naffect link-local peers discovered via multicast."` AllowedPublicKeys []string `comment:"List of peer public keys to allow incoming peering connections\nfrom. If left empty/undefined then all connections will be allowed\nby default. This does not affect outgoing peerings, nor does it\naffect link-local peers discovered via multicast."`
PublicKey string `comment:"Your public key. Your peers may ask you for this to put\ninto their AllowedPublicKeys configuration."` PublicKey string `comment:"Your public key. Your peers may ask you for this to put\ninto their AllowedPublicKeys configuration."`

View file

@ -11,7 +11,7 @@ type platformDefaultParameters struct {
// Admin socket // Admin socket
DefaultAdminListen string DefaultAdminListen string
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile string DefaultConfigFile string
// Multicast interfaces // Multicast interfaces

View file

@ -7,10 +7,10 @@ package defaults
func GetDefaults() platformDefaultParameters { func GetDefaults() platformDefaultParameters {
return platformDefaultParameters{ return platformDefaultParameters{
// Admin // Admin
DefaultAdminListen: "unix:///var/run/yggdrasil.sock", DefaultAdminListen: "unix:///var/run/mesh.sock",
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile: "/etc/yggdrasil.conf", DefaultConfigFile: "/etc/mesh.conf",
// Multicast interfaces // Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{ DefaultMulticastInterfaces: []MulticastInterfaceConfig{

View file

@ -7,10 +7,10 @@ package defaults
func GetDefaults() platformDefaultParameters { func GetDefaults() platformDefaultParameters {
return platformDefaultParameters{ return platformDefaultParameters{
// Admin // Admin
DefaultAdminListen: "unix:///var/run/yggdrasil.sock", DefaultAdminListen: "unix:///var/run/mesh.sock",
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile: "/usr/local/etc/yggdrasil.conf", DefaultConfigFile: "/usr/local/etc/mesh.conf",
// Multicast interfaces // Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{ DefaultMulticastInterfaces: []MulticastInterfaceConfig{

View file

@ -7,10 +7,10 @@ package defaults
func GetDefaults() platformDefaultParameters { func GetDefaults() platformDefaultParameters {
return platformDefaultParameters{ return platformDefaultParameters{
// Admin // Admin
DefaultAdminListen: "unix:///var/run/yggdrasil.sock", DefaultAdminListen: "unix:///var/run/mesh.sock",
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile: "/etc/yggdrasil.conf", DefaultConfigFile: "/etc/mesh.conf",
// Multicast interfaces // Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{ DefaultMulticastInterfaces: []MulticastInterfaceConfig{

View file

@ -7,10 +7,10 @@ package defaults
func GetDefaults() platformDefaultParameters { func GetDefaults() platformDefaultParameters {
return platformDefaultParameters{ return platformDefaultParameters{
// Admin // Admin
DefaultAdminListen: "unix:///var/run/yggdrasil.sock", DefaultAdminListen: "unix:///var/run/mesh.sock",
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile: "/etc/yggdrasil.conf", DefaultConfigFile: "/etc/mesh.conf",
// Multicast interfaces // Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{ DefaultMulticastInterfaces: []MulticastInterfaceConfig{

View file

@ -9,8 +9,8 @@ func GetDefaults() platformDefaultParameters {
// Admin // Admin
DefaultAdminListen: "tcp://localhost:9001", DefaultAdminListen: "tcp://localhost:9001",
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile: "/etc/yggdrasil.conf", DefaultConfigFile: "/etc/mesh.conf",
// Multicast interfaces // Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{ DefaultMulticastInterfaces: []MulticastInterfaceConfig{

View file

@ -9,8 +9,8 @@ func GetDefaults() platformDefaultParameters {
// Admin // Admin
DefaultAdminListen: "tcp://localhost:9001", DefaultAdminListen: "tcp://localhost:9001",
// Configuration (used for yggdrasilctl) // Configuration (used for meshctl)
DefaultConfigFile: "C:\\Program Files\\Mesh\\yggdrasil.conf", DefaultConfigFile: "C:\\Program Files\\Mesh\\mesh.conf",
// Multicast interfaces // Multicast interfaces
DefaultMulticastInterfaces: []MulticastInterfaceConfig{ DefaultMulticastInterfaces: []MulticastInterfaceConfig{

View file

@ -12,7 +12,7 @@ void StartAWDLBrowsing() {
serviceBrowser = [[NSNetServiceBrowser alloc] init]; serviceBrowser = [[NSNetServiceBrowser alloc] init];
serviceBrowser.includesPeerToPeer = YES; serviceBrowser.includesPeerToPeer = YES;
} }
[serviceBrowser searchForServicesOfType:@"_yggdrasil._tcp" inDomain:@""]; [serviceBrowser searchForServicesOfType:@"_mesh._tcp" inDomain:@""];
} }
void StopAWDLBrowsing() { void StopAWDLBrowsing() {
if (serviceBrowser == nil) { if (serviceBrowser == nil) {

View file

@ -9,7 +9,7 @@ import (
"github.com/Arceliar/phony" "github.com/Arceliar/phony"
"github.com/RiV-chain/RiV-mesh/src/address" "github.com/RiV-chain/RiV-mesh/src/address"
"github.com/RiV-chain/RiV-mesh/src/util" "github.com/RiV-chain/RiV-mesh/src/util"
"github.com/RiV-chain/RiV-mesh/src/yggdrasil" "github.com/RiV-chain/RiV-mesh/src/mesh"
"golang.org/x/net/icmp" "golang.org/x/net/icmp"
"golang.org/x/net/ipv6" "golang.org/x/net/ipv6"
) )
@ -19,7 +19,7 @@ const tunConnTimeout = 2 * time.Minute
type tunConn struct { type tunConn struct {
phony.Inbox phony.Inbox
tun *TunAdapter tun *TunAdapter
conn *yggdrasil.Conn conn *mesh.Conn
addr address.Address addr address.Address
snet address.Subnet snet address.Subnet
stop chan struct{} stop chan struct{}
@ -181,7 +181,7 @@ func (s *tunConn) _write(bs []byte) (err error) {
err = errors.New("address not allowed") err = errors.New("address not allowed")
return return
} }
msg := yggdrasil.FlowKeyMessage{ msg := mesh.FlowKeyMessage{
FlowKey: util.GetFlowKey(bs), FlowKey: util.GetFlowKey(bs),
Message: bs, Message: bs,
} }
@ -191,7 +191,7 @@ func (s *tunConn) _write(bs []byte) (err error) {
return return
} }
s.Act(s.conn, func() { s.Act(s.conn, func() {
if e, eok := err.(yggdrasil.ConnError); !eok { if e, eok := err.(mesh.ConnError); !eok {
if e.Closed() { if e.Closed() {
s.tun.log.Debugln(s.conn.String(), "TUN/TAP generic write debug:", err) s.tun.log.Debugln(s.conn.String(), "TUN/TAP generic write debug:", err)
} else { } else {

View file

@ -28,9 +28,9 @@ import (
type MTU uint16 type MTU uint16
// TunAdapter represents a running TUN interface and extends the // TunAdapter represents a running TUN interface and extends the
// yggdrasil.Adapter type. In order to use the TUN adapter with Mesh, you // mesh.Adapter type. In order to use the TUN adapter with Mesh, you
// should pass this object to the yggdrasil.SetRouterAdapter() function before // should pass this object to the mesh.SetRouterAdapter() function before
// calling yggdrasil.Start(). // calling mesh.Start().
type TunAdapter struct { type TunAdapter struct {
rwc *ipv6rwc.ReadWriteCloser rwc *ipv6rwc.ReadWriteCloser
config *config.NodeConfig config *config.NodeConfig

View file

@ -1,4 +1,4 @@
// Package util contains miscellaneous utilities used by yggdrasil. // Package util contains miscellaneous utilities used by mesh.
// In particular, this includes a crypto worker pool, Cancellation machinery, and a sync.Pool used to reuse []byte. // In particular, this includes a crypto worker pool, Cancellation machinery, and a sync.Pool used to reuse []byte.
package util package util