From 0d90f79ff60894ece54f3924fc9fe2cb67a3367a Mon Sep 17 00:00:00 2001 From: Tobias Punke Date: Thu, 19 Jul 2018 05:30:57 +0200 Subject: [PATCH] Add proper README.md --- README.md | 130 +++++++++++++++++- .../Properties/AssemblyInfo/AssemblyInfo.cs | 4 +- .../AssemblyInfo/AssemblyVersion.txt | 2 +- .../Properties/AssemblyInfo/AssemblyInfo.cs | 4 +- .../AssemblyInfo/AssemblyVersion.txt | 2 +- .../vpnclient.service | 2 +- 6 files changed, 135 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4d903bd..7ef355e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,131 @@ -## SoftEther VPN Client +[![Build Status](https://travis-ci.org/Gaulomatic/Logixware.SoftEther.Client.svg?branch=master)](https://travis-ci.org/Gaulomatic/Logixware.SoftEther.Client) +# Logixware SoftEther Client +A daemon for SoftEther VPN client. + +Since SoftEther is lacking a daemon for macOS and Linux, this is a wrapper around the client provided by SoftEther. +It starts the VPN client, handles IP address, static route management and `vpnclient` service & connection failures. + +## Features + +- Implemented in C# on .NET Core 2.1 +- Background service for macOS (10.13 or higher) +- Background daemon for Linux (Ubuntu 18.04 or higher) +- Automatic IP address assignment on virtual TAP devices +- Automatic assignment and release of static routes associated with a VPN connection +- Automatic restart of the `vpnclient` service in cases of failures +- Configuration via .NET Core `appsettings.json` file + +## Installation + +### Prerequisites + +#### macOS + +- `tuntaposx` is required. You can download it [here](http://tuntaposx.sourceforge.net) + +### Installer + +- The is a `.pkg` package [available](https://github.com/Gaulomatic/Logixware.SoftEther.Client/releases) for installation on macOS. + +### Manual installation on macOS + + 1. Compile the daemon by executing `./publish.sh` in the folder `src/Logixware.SoftEther.Client.Daemon`. + 2. Copy the output from `src/Logixware.SoftEther.Client.Daemon/bin/Release/netcoreapp2.1/osx.10.13-x64/publish` to + `/Library/Application Support/Logixware/Logixware.SoftEther.Client.Daemon` + 3. Copy `src/Logixware.SoftEther.Client.Daemon/de.logixware.SoftEther.Client.Daemon.plist` to `/Library/LaunchDaemons` + 4. Copy `src/Logixware.SoftEther.Client.Daemon/appsettings.example.macos.json` to + `/Library/Preferences/Logixware/Logixware.SoftEther.Client.Daemon` and rename to `appsettings.json` + 5. Download the official client from the [website](http://www.softether.org/5-download) + 6. Compile it and copy the output to `/Library/Application Support/Softether/vpnclient` + + ### Installation on Linux + + 1. Compile the daemon by executing `./publish.sh` in the folder `src/Logixware.SoftEther.Client.Daemon`. + 2. Copy the output from `src/Logixware.SoftEther.Client.Daemon/bin/Release/netcoreapp2.1/ubuntu.18.04-x64/publish` to + `/opt/logixware/Logixware.SoftEther.Client.Daemon` + 3. Copy `src/Logixware.SoftEther.Client.Daemon/vpnclient.service` to `/lib/systemd/system` + 4. Copy `src/Logixware.SoftEther.Client.Daemon/appsettings.example.linux.json` to + `/etc/logixware/Logixware.SoftEther.Client.Daemon` and rename to `appsettings.json` + 5. Download the official client from the [website](http://www.softether.org/5-download) + 6. Compile it and copy the output to `/opt/softether/vpnclient` + +## Configuration + +Open the config file in your favorite text editor and add configurations. The network name must match the connection +name in the `vpnclient` service. + +- The location on macOS is `/Library/Preferences/Logixware/Logixware.SoftEther.Client.Daemon/appsettings.json` +- The location on Linux is `/etc/logixware/Logixware.SoftEther.Client.Daemon/appsettings.json` + +### Sample configuration: + +```json5 + { + "Logging": + { + "LogLevel": + { + "Default": "Information" + } + }, + "AllowedHosts": "*", + "VPN": + { + "CommandLineInterface": + { + "PathToClient": "/Library/Application Support/SoftEther/vpnclient/vpnclient", + "PathToCli": "/Library/Application Support/SoftEther/vpnclient/vpncmd", + "CliPassword": "" + }, + + "Platform": + { + "Mac": + { + "TapKextIdentifier": "net.sf.tuntaposx.tap", + "PathToTapKext": "/Library/Extensions/tap.kext" + } + }, + + "ConnectionAttemptsBeforeClientRestart": 5, + + "Networks": + [ + { + "Name": "logixware", + "ConnectionTestHost": "192.168.0.254", + "AlwaysOn": true, + "IPv4": + { + "Address": "192.168.0.1", + "Mask": "255.255.255.0", + "Routes": + [ + { + "Network": "192.168.1.0", + "Prefix": "24", + "Gateway": "192.168.0.100" + } + ] + + }, + "IPv6": + { + "Address": "fdd3:82c4:f610:c08f:fdd3:82c4:f610:1", + "Prefix": 64 + } + } + ] + } + } +``` + +## Credits + +- Icons made by [Roundicons](https://www.flaticon.com/authors/roundicons). [Roundicons](https://www.flaticon.com/authors/roundicons) from [Flaticon](https://www.flaticon.com/) is licensed by [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/) + + +__Please feel free to download, fork and/or provide any feedback!__ -https://www.flaticon.com/free-icon/vpn_188120 diff --git a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs index 998250d..4cb4391 100755 --- a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs +++ b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: System.Reflection.AssemblyCopyright("Copyright © 2017 - 2018 Tobias Punke.")] [assembly: System.Reflection.AssemblyVersion("1.0.0.0")] -[assembly: System.Reflection.AssemblyFileVersion("1.0.0.11")] -[assembly: System.Reflection.AssemblyInformationalVersion("1.0.0.11")] +[assembly: System.Reflection.AssemblyFileVersion("1.0.0.12")] +[assembly: System.Reflection.AssemblyInformationalVersion("1.0.0.12")] diff --git a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt index 6cb4627..35f2a39 100755 --- a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt +++ b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt @@ -1 +1 @@ -1.0.0.11 \ No newline at end of file +1.0.0.12 \ No newline at end of file diff --git a/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyInfo.cs b/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyInfo.cs index 8cd93d2..7a02ea9 100755 --- a/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyInfo.cs +++ b/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: System.Reflection.AssemblyCopyright("Copyright © 2017 - 2018 Tobias Punke.")] [assembly: System.Reflection.AssemblyVersion("1.0.0.0")] -[assembly: System.Reflection.AssemblyFileVersion("1.0.0.8")] -[assembly: System.Reflection.AssemblyInformationalVersion("1.0.0.8")] +[assembly: System.Reflection.AssemblyFileVersion("1.0.0.19")] +[assembly: System.Reflection.AssemblyInformationalVersion("1.0.0.19")] diff --git a/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyVersion.txt b/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyVersion.txt index 904927c..98d07bc 100755 --- a/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyVersion.txt +++ b/src/Logixware.SoftEther.Client.Daemon/Properties/AssemblyInfo/AssemblyVersion.txt @@ -1 +1 @@ -1.0.1.18 \ No newline at end of file +1.0.1.19 \ No newline at end of file diff --git a/src/Logixware.SoftEther.Client.Daemon/vpnclient.service b/src/Logixware.SoftEther.Client.Daemon/vpnclient.service index 9779414..48654b8 100644 --- a/src/Logixware.SoftEther.Client.Daemon/vpnclient.service +++ b/src/Logixware.SoftEther.Client.Daemon/vpnclient.service @@ -8,7 +8,7 @@ Type=simple Restart=always RestartSec=10 User=root -ExecStart=/usr/bin/env /opt/logixware/Logixware.SoftEther.Client.Daemon +ExecStart=/usr/bin/env /opt/logixware/Logixware.SoftEther.Client.Daemon/Logixware.SoftEther.Client.Daemon WorkingDirectory=/opt/logixware/Logixware.SoftEther.Client.Daemon [Install]