5
0
mirror of https://github.com/cwinfo/yggdrasil-network.github.io.git synced 2024-09-19 16:09:36 +00:00

Updates to macOS and Windows platform pages

This commit is contained in:
Neil Alexander 2018-04-22 13:41:08 +01:00
parent 02bdcb1b2d
commit 77b17fbb07
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944
3 changed files with 77 additions and 28 deletions

View File

@ -44,9 +44,9 @@ Alternatively, start Yggdrasil in auto-configuration mode:
sudo nohup yggdrasil -autoconf &
```
### Run as a system service
### Run as a background service
Running as a system service means that Yggdrasil will automatically start up in the background when your Mac boots. It also ensures that Yggdrasil will be restarted automatically if the process is terminated for some reason.
Running as a background system service means that Yggdrasil will automatically start up in the background when your Mac boots. It also ensures that Yggdrasil will be restarted automatically if the process is terminated for some reason.
Assuming that Yggdrasil is installed into `/usr/bin` and your configuration *already exists* in `/etc`, as above, then you can install Yggdrasil as a launchd service using the launchd scripts in the Git repository:
```

70
platform-windows.md Normal file
View File

@ -0,0 +1,70 @@
---
tags: dontlink
---
# Windows
Yggdrasil has been tested and is working on the following versions of Windows:
- Windows 7
- Windows 10
- Windows Server 2016
It may work on other versions of Windows too, although these are untested.
## TAP Driver
Yggdrasil depends on the OpenVPN TAP driver to work on Windows. There are two flavours of this driver:
- [NDIS 5](https://swupdate.openvpn.org/community/releases/tap-windows-9.9.2_3.exe) (`tap-windows-9.9.2_3`) - recommended
- [NDIS 6](https://swupdate.openvpn.org/community/releases/tap-windows-9.21.2.exe) (`tap-windows-9.21.2`) - functional
Yggdrasil works with either driver, although the performance is remarkably better with the older NDIS 5 driver, therefore it is recommended to use that instead of the NDIS 6 driver.
Please note that if you already have OpenVPN for Windows, you likely have one of the two drivers installed already and should not install it again.
## Notes
- TUN mode is not supported on Windows, and attempts to configure TUN mode will default to TAP mode automatically.
## Installation
Start by either [downloading the latest Yggdrasil binary](https://circleci.com/api/v1.1/project/github/yggdrasil-network/yggdrasil-go/latest/artifacts) and use Windows Explorer to copy it into a sensible location. The below examples assume `C:\Program Files\Yggdrasil`.
## Generate configuration
Before starting Yggdrasil, you should generate configuration. Open a Command Prompt as Administrator:
```
"C:\Program Files\Yggdrasil\yggdrasil.exe" > "C:\Program Files\Yggdrasil\yggdrasil.conf"
```
## Run Yggdrasil
### Run once
Open a Command Prompt as Administrator and start Yggdrasil using your generated configuration:
```
"C:\Program Files\Yggdrasil\yggdrasil.exe" -useconffile "C:\Program Files\Yggdrasil\yggdrasil.conf"
```
Alternatively, start Yggdrasil in auto-configuration mode:
```
"C:\Program Files\Yggdrasil\yggdrasil.exe" -autoconf
```
### Run as a background service
Running as a background system service means that Yggdrasil will automatically start up in the background when Windows boots.
Assuming that Yggdrasil is installed into `C:\Program Files\Yggdrasil` and your configuration *already exists* in `C:\Program Files\Yggdrasil\yggdrasil.conf`, as above, then you can install Yggdrasil as a Windows service. Open a Command Prompt as Administrator:
```
sc create yggdrasil binpath= "\"C:\Program Files\Yggdrasil\yggdrasil.exe\" -useconffile \"C:\Program Files\Yggdrasil\yggdrasil.conf\""
sc config yggdrasil displayname= "Yggdrasil Service"
sc config yggdrasil start= "auto"
sc start yggdrasil
```
Alternatively, if you want the service to autoconfigure instead of using an `yggdrasil.conf`, replace the `sc create` line from above with:
```
sc create yggdrasil binpath= "\"C:\Program Files\Yggdrasil\yggdrasil.exe\" -autoconf"
```
The Yggdrasil service can then be stopped and started using `services.msc`, or in more recent versions of Windows, the Task Manager.

View File

@ -16,9 +16,11 @@ journalctl -u yggdrasil
## macOS
- Tested and working out of the box on macOS 10.13 High Sierra.
- May work in theory on any macOS version with `utun` support (which was added in macOS 10.7 Lion), although this is untested at present.
- TAP mode is not supported on macOS.
- See the [platform-macos.md](macOS platform page).
## Windows
- See the [platform-windows.md](Windows platform page).
## FreeBSD, NetBSD
@ -32,29 +34,6 @@ journalctl -u yggdrasil
- OpenBSD is not capable of listening on both IPv4 and IPv6 at the same time on the same socket (unlike FreeBSD and NetBSD). This affects the `Listen` and `AdminListen` configuration options. You will need to set `Listen` and `AdminListen` to use either an IPv4 or an IPv6 address.
- You may consider using [relayd](https://man.openbsd.org/relayd.8) to allow incoming Yggdrasil connections on both IPv4 and IPv6 simultaneously.
## Windows
- Tested and working on Windows 7 and Windows 10, and should work on any recent versions of Windows, but it depends on the [OpenVPN TAP driver](https://openvpn.net/index.php/open-source/downloads.html) being installed first.
- Has been proven to work with both the [NDIS 5](https://swupdate.openvpn.org/community/releases/tap-windows-9.9.2_3.exe) (`tap-windows-9.9.2_3`) driver and the [NDIS 6](https://swupdate.openvpn.org/community/releases/tap-windows-9.21.2.exe) (`tap-windows-9.21.2`) driver, however there are substantial performance issues with the NDIS 6 driver therefore it is recommended to use the NDIS 5 driver instead.
- Be aware that connectivity issues can occur on Windows if multiple IPv6 addresses from the `fd00::/8` prefix are assigned to the TAP interface. If this happens, then you may need to manually remove the old/unused addresses from the interface (though the code has a workaround in place to do this automatically in some cases).
- TUN mode is not supported on Windows.
- Yggdrasil can be installed as a Windows service so that it runs automatically in the background. As an example, create the folder `C:\Program Files\Yggdrasil\` and copy `yggdrasil.exe` into it. Once done, open Command Prompt as Administrator and use the following commands (being careful to note the escaped `\"` quotemarks on the `sc create` line):
- Generate a configuration file, if you have not already:
```
"C:\Program Files\Yggdrasil\yggdrasil.exe" -genconf > "C:\Program Files\Yggdrasil\yggdrasil.conf"
```
- Install the Windows service:
```
sc create yggdrasil binpath= "\"C:\Program Files\Yggdrasil\yggdrasil.exe\" -useconffile \"C:\Program Files\Yggdrasil\yggdrasil.conf\""
sc config yggdrasil displayname= "Yggdrasil Service"
sc config yggdrasil start= "auto"
sc start yggdrasil
```
- Alternatively, if you want the service to autoconfigure instead of using an `yggdrasil.conf`, replace the `sc create` line from above with:
```
sc create yggdrasil binpath= "\"C:\Program Files\Yggdrasil\yggdrasil.exe\" -autoconf"
```
## EdgeRouter
- Tested and working on the EdgeRouter X, using the [vyatta-yggdrasil](https://github.com/neilalexander/vyatta-yggdrasil) wrapper package.