From c222ef525b00040d771b43382ac9a21350d707e4 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Wed, 18 Mar 2020 18:26:44 +0900 Subject: [PATCH 1/5] Update build requirements on Unix --- src/BUILD_UNIX.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/BUILD_UNIX.md b/src/BUILD_UNIX.md index 227d7350..4df16d5a 100644 --- a/src/BUILD_UNIX.md +++ b/src/BUILD_UNIX.md @@ -18,18 +18,15 @@ This document describes how to build SoftEtherVPN for UNIX based Operating syste You need to install the following software to build SoftEther VPN for UNIX. -- Linux, FreeBSD, Solaris or Mac OS X. -- GNU Compiler Collection (gcc) and binary utilities. *** -- GNU Make (gmake). -- GNU C Library (glibc). -- POSIX Threads (pthread). -- OpenSSL (crypto, ssl). -- libiconv. -- readline. -- ncurses. - -*It has been noted that clang is also supported as an alternative to gcc.* - +- [CMake](https://cmake.org) +- C compiler (GCC, Clang, etc) +- C Library (BSD libc, GNU libc, musl libc, etc) +- POSIX threads library (pthread) +- OpenSSL or LibreSSL (crypto, ssl) +- make (GNU make, BSD make, etc) +- libiconv +- readline +- ncurses ## Install requirements on Centos/RedHat From a6652fead2f6a1d36647141025c4082ecbf76d02 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Fri, 20 Mar 2020 18:56:56 +0900 Subject: [PATCH 2/5] configure: respect environment CMAKE_FLAGS --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0dc66511..77e7317f 100755 --- a/configure +++ b/configure @@ -21,8 +21,12 @@ if [ ! -d "tmp" ]; then mkdir tmp fi +if [ ! -z ${CMAKE_FLAGS+x} ]; then + CMAKE_FLAGS="${CMAKE_FLAGS}" +fi + if [ ! -z ${CMAKE_INSTALL_PREFIX+x} ]; then - CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" + CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ${CMAKE_FLAGS}" fi if [ -z ${OPENSSL_ROOT_DIR} ]; then From 78b0684dd4489b3896f9c38ca4deaa58fbdd554d Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Wed, 18 Mar 2020 19:29:56 +0900 Subject: [PATCH 3/5] Document additional CMake options Some CMake options are added by myself (#1047 #1079). So I should describe in document. --- src/BUILD_UNIX.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/BUILD_UNIX.md b/src/BUILD_UNIX.md index 4df16d5a..b9554209 100644 --- a/src/BUILD_UNIX.md +++ b/src/BUILD_UNIX.md @@ -5,6 +5,7 @@ This document describes how to build SoftEtherVPN for UNIX based Operating syste * [Install Requirements on Debian/Ubuntu](#install-requirements-on-debianubuntu) * [Install Requirements on macOS](#install-requirements-on-macos) - [Build from source code and install](#build-from-source-code-and-install) +- [Additional Build Options](#additional-build-options) - [How to Run SoftEther](#how-to-run-softether) * [Start/Stop SoftEther VPN Server](#startstop-softether-vpn-server) * [Start/Stop SoftEther VPN Bridge](#startstop-softether-vpn-bridge) @@ -63,7 +64,7 @@ This will compile and install SoftEther VPN Server, Bridge and Client binaries u If any error occurs, please check the above requirements. -# Build on musl-based linux +# Build on musl-based linux To build the programs from the source code when using musl as libc, run the following commands: @@ -79,6 +80,38 @@ make -C tmp install Building without USE_MUSL environment variable set compiles, but produced executables exhibit bad run-time behaviour. +# Additional Build Options + +There are some additional build options useful if you're a distro package maintainer and creating a package of SoftEther VPN. It is recommended that you only specify these options when you understand what happens. + +## Specify log, config, PID directories + +By default, SoftEther VPN writes out all files such as logs, config files, PID files under the same directory as `vpnserver`, `vpnbridge`, `vpnclient` executables. This behaviour is suitable when [using SoftEther without installation](#using-softether-without-installation) however not appropriate using with installation. +Usually PID files are to put in `/var/run` or `/run`. Logs are `/var/log`. Other variable state information files including config files are `/var/lib` or `/var/db`. + +These directories can be changed at compile-time by specifying via CMake variables. +* `SE_PIDDIR` - PID directory +* `SE_LOGDIR` - root log directory +* `SE_DBDIR` - config files and variable state directory + +To specify directories, perform `./configure` like below. + +```bash +CMAKE_FLAGS="-DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether" ./configure +``` + +Please note that these directories are not created automatically after installation. Make sure to create these directories before starting SoftEther VPN Server, Bridge or Client. + +## Build without [cpu_features](https://github.com/google/cpu_features) + +SoftEther VPN uses cpu_features library to retrieve CPU features such as available processor instructions. However, cpu_features is not available on some architectures. Whether to build with cpu_features is auto detected but autodetection is not so smart. + +If you want to build without cpu_features explicitly, perform `./configure` like below. + +```bash +CMAKE_FLAGS="-DSKIP_CPU_FEATURES" ./configure +``` + # How to Run SoftEther ## Start/Stop SoftEther VPN Server From e6b8e6eee30694784b15eff323c4fc09f0f928e3 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Fri, 20 Mar 2020 21:14:04 +0900 Subject: [PATCH 4/5] replace SoftEther project related http links with https Outside links such as http://www.openssl.org and http links appear in source code are untouched. --- AUTHORS.TXT | 4 ++-- src/BUILD_UNIX.md | 10 ++++------ src/BUILD_WINDOWS.md | 2 +- src/WARNING.TXT | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/AUTHORS.TXT b/AUTHORS.TXT index ca4088ad..2b49ec7b 100644 --- a/AUTHORS.TXT +++ b/AUTHORS.TXT @@ -1,5 +1,5 @@ SoftEther VPN is developed by SoftEther VPN Project at University of Tsukuba. -http://www.softether.org/ +https://www.softether.org/ AUTHORS OF SOFTETHER VPN ------------------------ @@ -134,5 +134,5 @@ JOIN THE SOFTETHER VPN DEVELOPMENT Want to become a contributor? Please send us a patch. See also: SoftEther VPN Patch Acceptance Policy -http://www.softether.org/5-download/src/9.patch +https://www.softether.org/5-download/src/9.patch diff --git a/src/BUILD_UNIX.md b/src/BUILD_UNIX.md index b9554209..0519592c 100644 --- a/src/BUILD_UNIX.md +++ b/src/BUILD_UNIX.md @@ -137,9 +137,7 @@ vpncmd Or you can also use VPN Server Manager GUI Tool on other Windows PC to connect to the VPN Server remotely. You can download the GUI Tool -from http://www.softether-download.com/. - - +from https://www.softether-download.com/. ## Start/Stop SoftEther VPN Bridge @@ -165,7 +163,7 @@ vpncmd Or you can also use VPN Server Manager GUI Tool on other Windows PC to connect to the VPN Bridge remotely. You can download the GUI Tool -from http://www.softether-download.com/. +from https://www.softether-download.com/. ## Start/Stop SoftEther VPN Client @@ -191,7 +189,7 @@ vpncmd Or you can also use VPN Client Manager GUI Tool on other Windows PC to connect to the VPN Client remotely. You can download the GUI Tool -from http://www.softether-download.com/. +from https://www.softether-download.com/. # About HTML5-based Modern Admin Console and JSON-RPC API Suite @@ -235,4 +233,4 @@ In this case please do not run the `make install` command after compiling the so ************************************ Thank You Using SoftEther VPN ! By SoftEther VPN Open-Source Project -http://www.softether.org/ +https://www.softether.org/ diff --git a/src/BUILD_WINDOWS.md b/src/BUILD_WINDOWS.md index 1ce328f8..ad0b13df 100644 --- a/src/BUILD_WINDOWS.md +++ b/src/BUILD_WINDOWS.md @@ -74,4 +74,4 @@ Download Links: ************************************ Thank You Using SoftEther VPN ! By SoftEther VPN Open-Source Project -http://www.softether.org/ +https://www.softether.org/ diff --git a/src/WARNING.TXT b/src/WARNING.TXT index 3fda535d..c61a4fda 100644 --- a/src/WARNING.TXT +++ b/src/WARNING.TXT @@ -332,7 +332,7 @@ VPN Gate Academic Experiment Project is an online service operated for just the academic research purpose at the graduate school of University of Tsukuba, Japan. The purpose of this research is to expend our knowledge about the "Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details, -please visit http://www.vpngate.net/. +please visit https://www.vpngate.net/. 5.2. About VPN Gate Service SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service" @@ -468,7 +468,7 @@ Gate Service's user illegally abused your VPN Gate Service and you have to decode the packet logs in order to comply the laws), contact the administrator of the VPN Gate Academic Experiment Service at Graduate School of University of Tsukuba, Japan. You can find the contact address at -http://www.vpngate.net/. The administrator of VPN Gate Service will respond to +https://www.vpngate.net/. The administrator of VPN Gate Service will respond to decode the packet logs if there is an appropriate and legal request from court or other judicial authorities, according to laws. From 5dde23cb552b7b813986e36cea4e71979e57a095 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Fri, 20 Mar 2020 21:44:09 +0900 Subject: [PATCH 5/5] add myself to AUTHORS --- AUTHORS.TXT | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.TXT b/AUTHORS.TXT index 2b49ec7b..11cf7b96 100644 --- a/AUTHORS.TXT +++ b/AUTHORS.TXT @@ -89,6 +89,7 @@ CONTRIBUTORS: - Johan de Vries - Josh Soref - Joshua Perry + - Koichiro Iwao - Luiz Eduardo Gava - macvk - Maks Naumov