diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2ec4fb2..6d91c0c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,9 +24,9 @@ "serayuzgur.crates", "editorconfig.editorconfig", "swellaby.vscode-rust-test-adapter", - "matklad.rust-analyzer", "asciidoctor.asciidoctor-vscode", - "ms-vscode.test-adapter-converter" + "ms-vscode.test-adapter-converter", + "rust-lang.rust-analyzer" ], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], diff --git a/Cargo.lock b/Cargo.lock index 533cdd4..f74ddcb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1213,7 +1213,7 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "vpncloud" -version = "2.3.0" +version = "2.4.0" dependencies = [ "byteorder", "chrono", diff --git a/Cargo.toml b/Cargo.toml index b4f5421..e7c0fed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vpncloud" -version = "2.3.0" +version = "2.4.0" authors = ["Dennis Schwerdel "] build = "build.rs" license = "GPL-3.0" diff --git a/ROADMAP.md b/ROADMAP.md index 2a61af1..dfd4497 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -11,4 +11,21 @@ - [x] Fix Ctrl-C - [x] Fix auto-claim IP +## More threads + +- [ ] abstract socket + peers + traffic + table into one class + shared part +- [ ] management thread +- [ ] Send peer list +- [ ] Statsd +- [ ] Write out stats +- [ ] Port forwarding + +## VIA Feature + +- [ ] Implement message type VIA for relaying messages +- [ ] Advertize VIA addresses (optional) as claims from own peers +- [ ] Use VIA if no peer found +- [ ] Make sure VIA does not recurse +- [ ] Allow enabling VIA in config + ## REST API \ No newline at end of file diff --git a/src/engine/device_thread.rs b/src/engine/device_thread.rs index 46e85d6..fe22586 100644 --- a/src/engine/device_thread.rs +++ b/src/engine/device_thread.rs @@ -109,6 +109,7 @@ impl DeviceThread {}", dst, addr); self.send_msg(addr, MESSAGE_TYPE_DATA)?; } + //TODO: VIA: find relay peer and relay message None => { if self.broadcast { debug!("No destination for {} found, broadcasting", dst); diff --git a/src/engine/socket_thread.rs b/src/engine/socket_thread.rs index 79f2a4d..07d13e1 100644 --- a/src/engine/socket_thread.rs +++ b/src/engine/socket_thread.rs @@ -349,6 +349,7 @@ impl SocketThread match type_ { MESSAGE_TYPE_DATA => self.handle_payload_from(src)?, + //TODO: VIA: relay message MESSAGE_TYPE_NODE_INFO => { let info = match NodeInfo::decode(Cursor::new(self.buffer.message())) { Ok(val) => val, @@ -445,6 +446,7 @@ impl SocketThread SocketThread, pub addrs: AddrList, + //TODO: VIA: Add via ranges } impl NodeInfo {