2
0
mirror of https://github.com/n42n/n3n.git synced 2024-10-23 08:44:33 +08:00
Peer to Peer VPN
vpn
Go to file
2024-10-19 16:12:29 +11:00
.github/workflows Disable macos codecov reports 2024-10-19 14:12:20 +11:00
apps Attempt to clarify a warning message 2024-07-16 14:57:09 +10:00
debian Avoid as many generated files as possible 2024-04-30 20:38:38 +10:00
doc Add some simple documentation for the config used with multiple supernodes 2024-07-16 15:03:30 +10:00
include Remove duplicated packet type definitions 2024-10-19 13:10:59 +11:00
libs/connslot Fix bug in jsonrpc handling 2024-10-19 14:54:21 +11:00
LICENSES/preferred Take another stab at documenting some of the copyright requirements 2024-02-18 19:53:35 +11:00
packages Update OpenWrt Makefile 2024-08-02 10:16:43 +08:00
scripts Add automatic pagination to the CLI tool 2024-07-12 15:38:24 +10:00
src Check that the peer object is not too old to use 2024-10-19 15:53:39 +11:00
tests Allow specifying the mode for the unix socket 2024-04-26 15:59:22 +10:00
thirdparty re-enabled libnatpmp with CMake on Windows (#918) 2021-12-30 09:49:39 +01:00
tools Remove duplicated packet type definitions 2024-10-19 13:10:59 +11:00
wireshark The embedded packet is easier to use if it is shown appended to the top level tree 2024-03-09 17:15:30 +11:00
.gitignore More messing with autotools and dirty builds 2024-04-30 21:06:11 +10:00
.gitmodules added port forwarding (upnp and natpmp) (#905) 2021-12-23 12:27:55 +01:00
.yamllint.yml Linting for yaml files (#872) 2021-10-25 01:37:21 +05:45
autogen.sh More messing with autotools and dirty builds 2024-04-30 21:06:11 +10:00
config.mak.in Allow running on non modern root filesystems 2024-08-02 10:40:21 +10:00
configure.ac Build openwrt packages with correct rundir 2024-08-02 11:08:36 +10:00
Makefile Allow running on non modern root filesystems 2024-08-02 10:40:21 +10:00
n3n-edge.8 Provide a config file example matching the complex command line example 2024-03-29 16:03:08 +11:00
n3n-supernode.8 Rename applications to use the project name 2024-03-20 14:53:34 +11:00
n3n.7 Rename applications to use the project name 2024-03-20 14:53:34 +11:00
README.md Consolidate misc documents and simplify the main readme 2024-04-22 16:44:02 +10:00
uncrustify.cfg Switch code style to have close parenthesis indent to the brace level 2024-03-07 16:46:56 +11:00
VERSION Bump version file 2024-10-19 16:12:29 +11:00

n3n

n3n is a lightweight Peer-to-Peer VPN that creates virtual networks.

In order to start using n3n, two elements are required:

  • A supernode: it allows edge nodes to announce and discover other nodes. It must have a port publicly accessible on internet.
  • edge nodes: the nodes which will be a part of the virtual networks

A virtual network shared between multiple edge nodes in n3n is called a community. A single supernode can relay multiple communities and a single computer can be part of multiple communities at the same time (by running multiple edge daemons). An encryption key can be used by the edge nodes to encrypt the packets within their community.

n3n tries to establish a direct peer-to-peer connection via udp between the edge nodes when possible. When this is not possible (usually due to special NAT devices), the supernode is also used to relay the packets.

n3n was originally based on an older n2n project and hopes to keep protocol compatiblilty with that.

Note that some distributions have very old versions of n2n packaged that are incompatible with the protocol used by n3n. At the least, Debian has a n2n version 1.3.1 which uses a protocol from 2008 and has not been compatible with the stable releases of n2n for many years - thus will definitely not interoperate with n3n)

License

  • Any new self-contained tools or modules are licensed GPL-2.0-only.
  • Existing code is licensed GPL-3-only.
  • There are multiple distinct copyright holders throughout the codebase.
  • There is no Contributor Licence Agreement and thus there is no single body that can take ownership of the code and/or change the licensing.

Quick Start

For Debian, Ubuntu or similar dpkg based systems:

  • Download the package from the latest stable release.

  • Install the package

  • Create a config file - /etc/n3n/mynetwork.conf containing

    [community]
    name=mynetwork
    key=mypassword
    supernode=supernode.ntop.org:7777
    
  • Start the service: sudo systemctl start n3n-edge@mynetwork

  • Check the connection: sudo n3nctl -s mynetwork supernodes

  • List other nodes found: sudo n3nctl -s mynetwork edges

IMPORTANT: It is strongly advised to choose a custom community name (the community.name option) and a secret encryption key (the community.key option) in order to prevent other users from connecting to your computer.

It is also suggested that you setup your own supernode

See Also

Contribution

You can contribute to n3n in various ways:

  • Update an open issue or create a new one with detailed information
  • Propose new features
  • Improve the documentation
  • Provide pull requests with enhancements

(C) 2007-22 - ntop.org and contributors Copyright (C) 2023-24 Hamish Coleman