mirror of https://github.com/ntop/n2n.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
3.0 KiB
97 lines
3.0 KiB
4 years ago
|
# n2n on macOS
|
||
|
|
||
|
In order to use n2n on macOS, you first need to install support for TUN/TAP interfaces:
|
||
|
|
||
|
```bash
|
||
|
brew tap homebrew/cask
|
||
|
brew cask install tuntap
|
||
|
```
|
||
|
|
||
|
If you are on a modern version of macOS (i.e. Catalina), the commands above will ask you to enable the TUN/TAP kernel extension in System Preferences → Security & Privacy → General.
|
||
|
|
||
|
For more information refer to vendor documentation or the [Apple Technical Note](https://developer.apple.com/library/content/technotes/tn2459/_index.html).
|
||
|
|
||
|
|
||
5 years ago
|
# Build on Windows
|
||
6 years ago
|
|
||
5 years ago
|
## Requirements
|
||
6 years ago
|
|
||
5 years ago
|
In order to build on Windows the following tools should be installed:
|
||
6 years ago
|
|
||
5 years ago
|
- 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
|
||
|
- Cmake
|
||
|
- (optional) The OpenSSL library. Prebuild binaries can be downloaded from https://slproweb.com/products/Win32OpenSSL.html .
|
||
|
The full version is required (not the "Light" version). The Win32 version of it is usually required for a standard build.
|
||
6 years ago
|
|
||
5 years ago
|
NOTE: in order to skip OpenSSL compilation, edit CMakeLists.txt and replace
|
||
6 years ago
|
|
||
5 years ago
|
```plaintext
|
||
|
OPTION(N2N_OPTION_AES "USE AES" ON)
|
||
|
with
|
||
|
OPTION(N2N_OPTION_AES "USE AES" OFF)
|
||
|
```
|
||
6 years ago
|
|
||
5 years ago
|
NOTE: to static link OpenSSL, add the `-DOPENSSL_USE_STATIC_LIBS=true` option to the cmake command
|
||
6 years ago
|
|
||
6 years ago
|
In order to run n2n:
|
||
|
|
||
5 years ago
|
- 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
|
||
|
into the target computer
|
||
6 years ago
|
|
||
5 years ago
|
## Build (CLI)
|
||
6 years ago
|
|
||
|
In order to build from the command line, open a terminal window and run the following commands:
|
||
|
|
||
5 years ago
|
```batch
|
||
6 years ago
|
md build
|
||
|
cd build
|
||
|
cmake ..
|
||
|
|
||
|
MSBuild edge.vcxproj /t:Build /p:Configuration=Release
|
||
|
MSBuild supernode.vcxproj /t:Build /p:Configuration=Release
|
||
|
```
|
||
|
|
||
6 years ago
|
NOTE: if cmake has problems finding the installed OpenSSL library, try to download the official cmake and invoke it with:
|
||
5 years ago
|
`C:\Program Files\CMake\bin\cmake`
|
||
6 years ago
|
|
||
6 years ago
|
The compiled exe files should now be available under the Release directory.
|
||
5 years ago
|
|
||
5 years ago
|
## Run
|
||
5 years ago
|
|
||
|
The `edge.exe` program reads the `edge.conf` file located into the current directory if no option is provided.
|
||
|
|
||
|
Here is an example `edge.conf` file:
|
||
|
|
||
5 years ago
|
```plaintext
|
||
5 years ago
|
-c=mycommunity
|
||
|
-k=mysecretkey
|
||
|
|
||
|
# supernode IP address
|
||
|
-l=1.2.3.4:5678
|
||
|
|
||
|
# edge IP address
|
||
|
-a=192.168.100.1
|
||
|
```
|
||
|
|
||
|
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:
|
||
|
|
||
5 years ago
|
```plaintext
|
||
5 years ago
|
-l=5678
|
||
|
```
|
||
|
|
||
|
See `edge.exe --help` and `supernode.exe --help` for a list of supported options.
|
||
4 years ago
|
|
||
|
# General Building Options
|
||
|
|
||
|
## Low Memory Footprint
|
||
|
|
||
|
Some parts of the code (well, one for now: Pearson hashing) offer an optional low memory footprint if compiled using with the macro `LOW_MEM_FOOTPRINT`. GCC will make it happen with `-D LOW_MEM_FOOTPRINT` maybe specified along with other options of choice during configuration:
|
||
|
|
||
|
`./configure CFLAGS="-O3 -march=native -D LOW_MEM_FOOTPRINT"`
|
||
|
|