$(info This code appears to have been bitrotted since 2019 - please let us know if you are using it)
if["$(TARGET_ARCHITECTURE)"="arm32v7"]||["$(TARGET_ARCHITECTURE)"=""];thenDOCKER_IMAGE_FILENAME="Dockerfile.arm32v7"DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)-arm32v7 make build;fi
if["$(TARGET_ARCHITECTURE)"="arm32v7"]||["$(TARGET_ARCHITECTURE)"=""];thenDOCKER_IMAGE_FILENAME="Dockerfile.arm32v7"DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)-arm32v7 make build;fi
if["$(TARGET_ARCHITECTURE)"="x86_64"]||["$(TARGET_ARCHITECTURE)"=""];thenDOCKER_IMAGE_FILENAME="Dockerfile.x86_64"DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)-x86_64 make build;fi
if["$(TARGET_ARCHITECTURE)"="x86_64"]||["$(TARGET_ARCHITECTURE)"=""];thenDOCKER_IMAGE_FILENAME="Dockerfile.x86_64"DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)-x86_64 make build;fi
@ -21,30 +21,22 @@ In order to build on Windows the following tools should be installed:
- Visual Studio. For a minimal install, the command line only build tools can be
- Visual Studio. For a minimal install, the command line only build tools can be
downloaded and installed from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017.
downloaded and installed from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017.
- CMake
- CMake (From https://cmake.org/download/)
- (optional) The OpenSSL library. Prebuild binaries can be downloaded from https://slproweb.com/products/Win32OpenSSL.html.
NOTE: You should always use the official cmake stable release as otherwise
The full version is required, i.e. not the "Light" version. The Win32 version of it is usually required for a standard build.
you may have issues finding libraries (e.g: the installed OpenSSL library).
If you still have problems, you can try invoking it with `C:\Program Files\CMake\bin\cmake`.
> NOTE: In order to skip OpenSSL compilation, edit `CMakeLists.txt` and replace **– is this still valid?**
- (optional) The OpenSSL library. Pre-built binaries can be downloaded from
>
https://slproweb.com/products/Win32OpenSSL.html.
> ```plaintext
The full version is required, i.e. not the "Light" version. The Win32
> OPTION(N2N_OPTION_AES "USE AES" ON)
version of it is usually required for a standard build.
> with
> OPTION(N2N_OPTION_AES "USE AES" OFF)
> ```
NOTE: To statically link OpenSSL, add the `-DOPENSSL_USE_STATIC_LIBS=true` option to the `cmake` command below.
NOTE: In order to enable OpenSSL compilation, add the option
`-DN2N_OPTION_USE_OPENSSL=ON` to the `cmake ..` command below.
- If compilation throws a "config.h: No such file or directory" error, an `include/config.h` file needs to be obtained from an already configured Linux compilation and put into the `include/` directory as discussed [here](https://github.com/ntop/n2n/issues/366).
NOTE: To statically link OpenSSL, add the option
`-DOPENSSL_USE_STATIC_LIBS=true` to the `cmake ..` command below.
In order to run n2n, you will need the following:
- The TAP drivers should be installed into the system. They can be installed from
http://build.openvpn.net/downloads/releases, search for "tap-windows".
- If OpenSSL has been linked dynamically, the corresponding `.dll` file should be available
onto the target computer.
NOTE: Sticking to this tool chain has historically meant that resulting
NOTE: Sticking to this tool chain has historically meant that resulting
executables are more likely to be able to communicate with Linux or other
executables are more likely to be able to communicate with Linux or other
@ -52,49 +44,38 @@ OS builds, however efforts are being made to address this concern.
## Build (CLI)
## Build (CLI)
In order to build from the command line, open a terminal window and run the following commands:
In order to build from the command line, open a terminal window change to
the directory where the git checkout of this repository is and run the
NOTE: If CMake has problems finding the installed OpenSSL library, try to download the official cmake and invoke it with
`C:\Program Files\CMake\bin\cmake`.
NOTE: Visual Studio might not add `MSBuild.exe`'s path to the environment variable %PATH% so you might have difficulties finding and executing it without giving the full path. Regular installations seem to have it reside at `"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe"`
The compiled `.exe` files should now be available in the `build\Release` directory.
The compiled `.exe` files should now be available in the `build\Release` directory.
## Run
## Run
The `edge.exe` program reads the `edge.conf` file located into the current directory if no option is provided.
In order to run n2n, you will need the following:
Here is an example `edge.conf` file:
```plaintext
- The TAP drivers should be installed into the system. They can be installed from
-c=mycommunity
http://build.openvpn.net/downloads/releases, search for "tap-windows".
-k=mysecretpass
# supernode IP address
- If OpenSSL has been linked dynamically, the corresponding `.dll` file should be available
-l=1.2.3.4:5678
onto the target computer.
# edge IP address
The `edge.exe` program reads the `edge.conf` file located into the current directory if no option is provided.
-a=192.168.100.1
```
The `supernode.exe` program reads the `supernode.conf` file located into the current directory if no option is provided.
The `supernode.exe` program reads the `supernode.conf` file located into the current directory if no option is provided.
Here is an example `supernode.conf` file:
Example [edge.conf](../packages/etc/n2n/edge.conf.sample)
and [supernode.conf](../packages/etc/n2n/supernode.conf.sample) are available.
```plaintext
-p=5678
```
See `edge.exe --help` and `supernode.exe --help` for a full list of supported options.
See `edge.exe --help` and `supernode.exe --help` for a full list of supported options.