diff --git a/.gitignore b/.gitignore index 7cc2878..0f50a54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ target vpncloud-oldnodes ._* -vpncloud.1* -*sodium +deb/vpncloud/vpncloud* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e11a73b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libsodium"] + path = libsodium + url = https://github.com/jedisct1/libsodium diff --git a/Cargo.lock b/Cargo.lock index ae44b2b..5181d1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ dependencies = [ "gcc 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -132,7 +132,7 @@ dependencies = [ [[package]] name = "nix" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -180,7 +180,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/libsodium b/libsodium new file mode 160000 index 0000000..a84ae01 --- /dev/null +++ b/libsodium @@ -0,0 +1 @@ +Subproject commit a84ae0170c73641d9581780549a51abadbbb26eb diff --git a/vpncloud.md b/vpncloud.md index 32ce977..53db26b 100644 --- a/vpncloud.md +++ b/vpncloud.md @@ -301,8 +301,10 @@ field will follow: * **Initial message** (message type 2): This packet contains the following information: + - The stage of the initialization process - A random node id to distinguish different nodes - All the local subnets claimed by the nodes + Its first byte marks the stage of the initial handshake process. The next 16 bytes contain the unique node id. After that, the list of local subnets follows. @@ -319,12 +321,12 @@ field will follow: and the later 6 bytes are the MAC address. * **Closing message** (message type 3): - This packet does not contain any further data. + This packet does not contain any more data. Nodes are expected to send an **initial message** whenever they connect to a node they were not connected to before. As a reply to this message, another -initial should be sent if the node was not known before. Also a **peer list** -message should be sent as a reply. +initial should be sent with stage 2. Also a **peer list** message should be +sent as a reply. When connected, nodes should periodically send their **peer list** to all of their peers to spread this information and to avoid peer timeouts.